-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmain.cpp
36 lines (26 loc) · 944 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "RedTimer.h"
#include <QApplication>
#include <QCommandLineParser>
#include <memory>
using namespace redtimer;
using namespace std;
int main(int argc, char* argv[])
{
QApplication app( argc, argv );
QApplication::setApplicationName( "RedTimer" );
QApplication::setApplicationVersion( "0.0.5" );
// Command line options
QCommandLineParser parser;
parser.setApplicationDescription( "Redmine Time Tracker" );
parser.addHelpOption();
parser.addVersionOption();
// Disable tray icon
QCommandLineOption noTrayOption( QStringList() << "no-tray-icon",
QApplication::translate("main", "Do not provide a tray icon.") );
parser.addOption( noTrayOption );
// Process command line options
parser.process( app );
app.setWindowIcon( QIcon(":/icons/clock_red.svg") );
new RedTimer( &app, !parser.isSet(noTrayOption) );
return app.exec();
}