- Timestamp:
- 02/01/10 16:43:00 (13 years ago)
- Branches:
- master, qt5
- Children:
- ba48d2f
- Parents:
- d7986a6
- Location:
- src/app
- Files:
-
- 2 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
src/app/app.pro
rd7986a6 ra7d8638 3 3 TARGET = fosdem-schedule 4 4 DESTDIR = ../bin 5 QT += sql xml network dbus 5 QT += sql xml network dbus 6 6 7 7 # module dependencies … … 17 17 } 18 18 19 HEADERS += appsettings.h 19 HEADERS += appsettings.h \ 20 alarmdbus.h \ 21 alarmdbusadaptorp.h 20 22 21 23 SOURCES += main.cpp \ 22 appsettings.cpp 24 appsettings.cpp \ 25 alarmdbus.cpp \ 26 alarmdbusadaptor.cpp 23 27 24 28 RESOURCES += ../icons.qrc \ -
src/app/main.cpp
rd7986a6 ra7d8638 2 2 3 3 #include <QtGui/QApplication> 4 #include <sqlengine.h> 5 6 #include "eventdialog.h" 7 4 8 #ifdef MAEMO 5 9 //#include <alarmdialog.h> … … 7 11 #include <alarmdbusadaptorp.h> 8 12 #endif /* MAEMO */ 9 10 #include <sqlengine.h>11 13 12 14 … … 23 25 24 26 QWidget *window; 25 #ifdef MAEMO 26 // if the app is run with two cmd-line arguments 27 // an alarm dialog is to be displayed 28 // Usage: $ ./fosdem eventId alarmId 29 // Example: $ ./fosdem 521 13 30 // if(argc==3) 31 // window = new AlarmDialog(argc,argv); 32 // else if(argc==2) // display Event dialog automatically 33 // window = new MainWindow(atoi(argv[1])); // eventId = argv[1] 34 // else 35 window = new MainWindow; 36 #else 27 37 28 window = new MainWindow; 38 #endif /* MAEMO */ 39 window->show(); 29 40 30 41 31 #ifdef MAEMO … … 43 33 CAlarmDBus *alarmDBus = new CAlarmDBus(window); 44 34 new AlarmDBusAdaptor(alarmDBus); 45 //QDBusConnection connection = QDBusConnection::sessionBus();46 35 QDBusConnection connection = QDBusConnection::sessionBus(); 47 36 … … 50 39 if( connection.registerService("org.fosdem.schedule") == false) 51 40 { 52 qDebug() << "dbus register service failed"; 41 if(argc>1) 42 { 43 QDBusInterface *interface = new QDBusInterface("org.fosdem.schedule", 44 "/Fosdem", 45 "org.fosdem.schedule.AlarmInterface", 46 connection); 47 interface->call("Alarm",atoi(argv[1])); 48 return 0; 49 } 53 50 } 54 51 } 52 53 if(argc > 1) 54 { 55 EventDialog dialog(atoi(argv[1]),window); 56 dialog.exec(); 57 } 55 58 #endif 59 60 window->show(); 56 61 57 62 return a.exec();
Note: See TracChangeset
for help on using the changeset viewer.