qt5
Last change
on this file since 05afe5f was
05afe5f,
checked in by pavelpa <pavelpa@…>, 13 years ago
|
implemented 'tab container' widget, which groups daynavigator with treeview
- moved functionality from mainwindow to tabcontainer
- TODO: 'search' tab not done yet
|
-
Property mode set to
100644
|
File size:
912 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 | |
---|
15 | QApplication a(argc, argv); |
---|
16 | QApplication::setWindowIcon(QIcon(":/icons/fosdem.png")); |
---|
17 | |
---|
18 | SqlEngine::initialize(); // creates DB connection |
---|
19 | |
---|
20 | QWidget *window; |
---|
21 | #ifdef MAEMO |
---|
22 | // if the app is run with two cmd-line arguments |
---|
23 | // an alarm dialog is to be displayed |
---|
24 | // Usage: $ ./fosdem eventId alarmId |
---|
25 | // Example: $ ./fosdem 521 13 |
---|
26 | if(argc==3) |
---|
27 | window = new AlarmDialog(argc,argv); |
---|
28 | else if(argc==2) // display Event dialog automatically |
---|
29 | window = new MainWindow(atoi(argv[1])); // eventId = argv[1] |
---|
30 | else |
---|
31 | window = new MainWindow; |
---|
32 | #else |
---|
33 | window = new MainWindow; |
---|
34 | #endif /* MAEMO */ |
---|
35 | window->show(); |
---|
36 | return a.exec(); |
---|
37 | } |
---|
38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.