- Timestamp:
- 02/01/10 16:43:00 (13 years ago)
- Branches:
- master, qt5
- Children:
- ba48d2f
- Parents:
- d7986a6
- Location:
- src
- Files:
-
- 7 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
src/alarm/alarm.cpp
rd7986a6 ra7d8638 5 5 #include <QApplication> 6 6 #include <QDir> 7 #include <Q Debug>7 #include <QFileInfo> 8 8 9 9 #include <dbus-1.0/dbus/dbus-protocol.h> … … 30 30 alarm_action_set_label(act, "FOSDEM'10"); 31 31 32 // setup this action to be a "DBus command" 32 QFileInfo fi(*qApp->argv()); 33 QString name(fi.fileName()); 34 35 QString command = QDir::currentPath() + "/" + name + QString(" %1").arg(QString::number(aEventId)); 36 //QString command = *qApp->argv() + QString(" %1").arg(QString::number(aEventId)); 37 alarm_action_set_exec_command(act, command.toLocal8Bit().data()); 38 act->flags |= ALARM_ACTION_TYPE_EXEC; 33 39 act->flags |= ALARM_ACTION_WHEN_RESPONDED; 34 act->flags |= ALARM_ACTION_ TYPE_DBUS;40 act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; // adds assigned cookie at the end of command string 35 41 36 // DBus params for this action 37 alarm_action_set_dbus_interface(act, "org.fosdem.schedule.AlarmInterface"); 38 alarm_action_set_dbus_service(act, "org.fosdem.schedule"); 39 alarm_action_set_dbus_path(act, "/Fosdem"); 40 alarm_action_set_dbus_name(act, "Alarm"); 41 42 // DBus arguments for the action 43 alarm_action_set_dbus_args(act, DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID); 42 // // setup this action to be a "DBus command" 43 // act->flags |= ALARM_ACTION_WHEN_RESPONDED; 44 // act->flags |= ALARM_ACTION_TYPE_DBUS; 45 // 46 // // DBus params for this action 47 // alarm_action_set_dbus_interface(act, "org.fosdem.schedule.AlarmInterface"); 48 // alarm_action_set_dbus_service(act, "org.fosdem.schedule"); 49 // alarm_action_set_dbus_path(act, "/Fosdem"); 50 // alarm_action_set_dbus_name(act, "Alarm"); 51 // 52 // // DBus arguments for the action 53 // alarm_action_set_dbus_args(act, DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID); 44 54 45 55 // act->flags |= ALARM_ACTION_TYPE_EXEC; -
src/alarm/alarm.pro
rd7986a6 ra7d8638 10 10 11 11 HEADERS += alarm.h \ 12 alarmdbus.h \13 alarmdbusadaptorp.h14 12 15 13 SOURCES += alarm.cpp \ 16 alarmdbus.cpp \17 alarmdbusadaptor.cpp18 14 19 15 INCLUDEPATH += ../gui \ -
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(); -
src/mvc/mvc.pro
rd7986a6 ra7d8638 4 4 DESTDIR = ../bin 5 5 CONFIG += static 6 QT += sql 6 QT += sql 7 7 8 8 # module dependencies … … 27 27 eventmodel.h \ 28 28 treeview.h \ 29 room.h 29 room.h 30 30 SOURCES += event.cpp \ 31 31 conference.cpp \ … … 34 34 eventmodel.cpp \ 35 35 treeview.cpp \ 36 room.cpp 36 room.cpp -
src/mvc/treeview.cpp
rd7986a6 ra7d8638 98 98 // add alarm to the 'alarmd' 99 99 Alarm alarm; 100 //int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10)); // testing101 int cookie = alarm.addAlarm(event.id(),event.start().addSecs(-15*60)); // 15 minutes before real start100 int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10)); // testing 101 //int cookie = alarm.addAlarm(event.id(),event.start().addSecs(-15*60)); // 15 minutes before real start 102 102 qDebug() << "cookie: " << cookie; 103 103 #endif /* MAEMO */ -
src/src.pro
rd7986a6 ra7d8638 1 1 include(global.pri) 2 2 TEMPLATE = subdirs 3 SUBDIRS += orm mvc sql gui4 3 maemo : SUBDIRS += alarm 5 SUBDIRS += app4 SUBDIRS += orm sql mvc gui app 6 5 #SUBDIRS += test 7 6 CONFIG += ordered
Note: See TracChangeset
for help on using the changeset viewer.