3
3
/****************************************************************************
4
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved.
4
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5
Copyright (C) 2007, Christian Schoenebeck
6
7
This program is free software; you can redistribute it and/or
7
8
modify it under the terms of the GNU General Public License
13
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
15
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
You should have received a copy of the GNU General Public License along
18
with this program; if not, write to the Free Software Foundation, Inc.,
19
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21
*****************************************************************************/
22
#include <qapplication.h>
23
#include <qtextcodec.h>
25
23
#include "qsamplerAbout.h"
26
24
#include "qsamplerOptions.h"
27
25
#include "qsamplerMainForm.h"
27
#include <QApplication>
28
#include <QTranslator>
31
32
//-------------------------------------------------------------------------
32
33
// main - The main program trunk.
35
36
int main ( int argc, char **argv )
37
QApplication app(argc, argv);
39
// Load translation support.
40
QTranslator translator(0);
41
QString sLocale = QTextCodec::locale();
43
QString sLocName = "qsampler_" + sLocale;
44
if (!translator.load(sLocName, ".")) {
45
QString sLocPath = CONFIG_PREFIX "/share/locale";
46
if (!translator.load(sLocName, sLocPath))
47
fprintf(stderr, "Warning: no locale found: %s/%s.qm\n", sLocPath.latin1(), sLocName.latin1());
49
app.installTranslator(&translator);
52
// Construct default settings; override with command line arguments.
53
qsamplerOptions options;
54
if (!options.parse_args(app.argc(), app.argv())) {
59
// Construct, setup and show the main form.
64
// Register the quit signal/slot.
65
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
38
QApplication app(argc, argv);
40
// Load translation support.
41
QTranslator translator(0);
43
if (loc.language() != QLocale::C) {
44
QString sLocName = "qsampler_" + loc.name();
45
if (!translator.load(sLocName, ".")) {
46
QString sLocPath = CONFIG_PREFIX "/share/locale";
47
if (!translator.load(sLocName, sLocPath))
48
fprintf(stderr, "Warning: no locale found: %s/%s.qm\n",
49
sLocPath.toUtf8().constData(),
50
sLocName.toUtf8().constData());
52
app.installTranslator(&translator);
55
// Construct default settings; override with command line arguments.
56
QSampler::Options options;
57
if (!options.parse_args(app.argc(), app.argv())) {
62
// Construct, setup and show the main form.
67
// Register the quit signal/slot.
68
// app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));