/[qspeakers]/main.cpp
ViewVC logotype

Annotation of /main.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 75 - (hide annotations)
Sun Oct 26 01:24:10 2014 UTC (7 years, 1 month ago) by ben
File size: 803 byte(s)
use translation (not functionnal)
1 ben 1 #include "mainwindow.h"
2 ben 71 #include "importexport.h"
3 ben 1 #include <QApplication>
4 ben 75 #include <QTranslator>
5     #include <QLibraryInfo>
6     #include <QLocale>
7 ben 1
8     int main(int argc, char *argv[])
9     {
10 ben 3 QApplication a(argc, argv);
11     a.setOrganizationName("Herewe");
12     a.setOrganizationDomain("herewe");
13     a.setApplicationName("QSpeakers");
14 ben 72
15 ben 75
16     QTranslator qtTranslator;
17     qtTranslator.load("qt_" + QLocale::system().name(),
18     QLibraryInfo::location(QLibraryInfo::TranslationsPath));
19     a.installTranslator(&qtTranslator);
20    
21     QTranslator qspeakersTranslator;
22     qspeakersTranslator.load("qspeakers_" + QLocale::system().name());
23     a.installTranslator(&qspeakersTranslator);
24    
25 ben 72 if (argc > 1)
26     ImportExport::setSavePath(argv[argc - 1]);
27    
28 ben 1 MainWindow w;
29     w.show();
30    
31     return a.exec();
32     }

  ViewVC Help
Powered by ViewVC 1.1.26