qt5
Last change
on this file since 979e5be was
979e5be,
checked in by pavelpa <pavelpa@…>, 13 years ago
|
created resource which contains parsed schedule,
so the user doesn't have to parse it by himself
|
-
Property mode set to
100644
|
File size:
946 bytes
|
Line | |
---|
1 | #include <mainwindow.h> |
---|
2 | |
---|
3 | #include <QtGui/QApplication> |
---|
4 | #ifdef MAEMO |
---|
5 | #include <alarmdialog.h> |
---|
6 | #endif /* MAEMO */ |
---|
7 | |
---|
8 | #include <sqlengine.h> |
---|
9 | |
---|
10 | int main(int argc, char *argv[]) |
---|
11 | { |
---|
12 | Q_INIT_RESOURCE(icons); |
---|
13 | Q_INIT_RESOURCE(maps); |
---|
14 | Q_INIT_RESOURCE(db); |
---|
15 | |
---|
16 | QApplication a(argc, argv); |
---|
17 | QApplication::setWindowIcon(QIcon(":/icons/fosdem.png")); |
---|
18 | |
---|
19 | SqlEngine::initialize(); // creates "SQLITE" DB connection |
---|
20 | |
---|
21 | QWidget *window; |
---|
22 | #ifdef MAEMO |
---|
23 | // if the app is run with two cmd-line arguments |
---|
24 | // an alarm dialog is to be displayed |
---|
25 | // Usage: $ ./fosdem eventId alarmId |
---|
26 | // Example: $ ./fosdem 521 13 |
---|
27 | if(argc==3) |
---|
28 | window = new AlarmDialog(argc,argv); |
---|
29 | else if(argc==2) // display Event dialog automatically |
---|
30 | window = new MainWindow(atoi(argv[1])); // eventId = argv[1] |
---|
31 | else |
---|
32 | window = new MainWindow; |
---|
33 | #else |
---|
34 | window = new MainWindow; |
---|
35 | #endif /* MAEMO */ |
---|
36 | window->show(); |
---|
37 | return a.exec(); |
---|
38 | } |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.