Changeset 6831c6a in confclerk_git
- Timestamp:
- 02/01/10 14:05:49 (13 years ago)
- Branches:
- master, qt5
- Children:
- 927eac4
- Parents:
- 8c4d4f7
- Location:
- src
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/alarm/alarm.cpp
r8c4d4f7 r6831c6a 5 5 #include <QApplication> 6 6 #include <QDir> 7 #include <QDebug> 8 9 #include <dbus-1.0/dbus/dbus-protocol.h> 7 10 8 11 int Alarm::addAlarm(int aEventId, const QDateTime &aDateTime) … … 17 20 18 21 /* for Deleting purposes */ 19 alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data()); 22 alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data()); 20 23 21 24 /* Use absolute time triggering */ 22 25 eve->alarm_time = time(0) + 5; //aDateTime.toTime_t(); 23 26 eve->flags = ALARM_EVENT_BOOT; 24 25 QString command = QDir::currentPath() + "/" + *qApp->argv() +26 QString(" %1").arg(QString::number(aEventId));27 27 28 28 /* Add exec command action */ … … 33 33 act->flags |= ALARM_ACTION_WHEN_RESPONDED; 34 34 act->flags |= ALARM_ACTION_TYPE_DBUS; 35 36 // DBus params for this action 37 alarm_action_set_dbus_interface(act, "org.f reedesktop.Notifications");38 alarm_action_set_dbus_service(act, "org.f reedesktop.Notifications");39 alarm_action_set_dbus_path(act, "/ org/freedesktop/Notifications");40 alarm_action_set_dbus_name(act, " SystemNoteDialog");41 35 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 42 // DBus arguments for the action 43 alarm_action_set_dbus_args(act, aEventId);43 alarm_action_set_dbus_args(act, DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID); 44 44 45 45 // act->flags |= ALARM_ACTION_TYPE_EXEC; … … 47 47 // alarm_event_set_icon(eve, "fosdem"); 48 48 // alarm_event_set_title(eve, "FOSDEM'10"); 49 // adds assigned cookie at the end of command string 50 // act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; 49 // adds assigned cookie at the end of command string 50 // act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; 51 51 52 52 /* Add stop button action */ … … 56 56 act->flags |= ALARM_ACTION_WHEN_RESPONDED; 57 57 act->flags |= ALARM_ACTION_TYPE_NOP; 58 58 59 59 /* Add snooze button action */ 60 60 act = alarm_event_add_actions(eve, 1); -
src/alarm/alarm.pro
r8c4d4f7 r6831c6a 2 2 TARGET = qalarm 3 3 DESTDIR = ../bin 4 CONFIG += static 4 CONFIG += static qdbus 5 QT += sql dbus 5 6 6 7 # module dependencies … … 8 9 DEPENDPATH += . 9 10 10 HEADERS += alarm.h 11 HEADERS += alarm.h \ 12 alarmdbus.h \ 13 alarmdbusadaptorp.h 11 14 12 SOURCES += alarm.cpp 15 SOURCES += alarm.cpp \ 16 alarmdbus.cpp \ 17 alarmdbusadaptor.cpp 13 18 19 INCLUDEPATH += ../gui \ 20 ../mvc \ 21 ../orm \ 22 ../sql 23 24 25 -
src/app/app.pro
r8c4d4f7 r6831c6a 3 3 TARGET = fosdem-schedule 4 4 DESTDIR = ../bin 5 QT += sql xml network 5 QT += sql xml network dbus 6 6 7 7 # module dependencies -
src/app/main.cpp
r8c4d4f7 r6831c6a 2 2 3 3 #include <QtGui/QApplication> 4 #ifdef MAEMO5 #include <alarmdialog.h>6 #endif /* MAEMO */4 //#ifdef MAEMO 5 //#include <alarmdialog.h> 6 //#endif /* MAEMO */ 7 7 8 8 #include <sqlengine.h> 9 10 #include "alarmdbus.h" 11 #include "alarmdbusadaptorp.h" 9 12 10 13 int main(int argc, char *argv[]) … … 25 28 // Usage: $ ./fosdem eventId alarmId 26 29 // Example: $ ./fosdem 521 13 27 if(argc==3) 28 window = new AlarmDialog(argc,argv);29 else if(argc==2) // display Event dialog automatically30 window = new MainWindow(atoi(argv[1])); // eventId = argv[1]31 else30 // 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 32 35 window = new MainWindow; 33 36 #else … … 35 38 #endif /* MAEMO */ 36 39 window->show(); 40 41 // Alarm Dbus 42 43 CAlarmDBus *alarmDBus = new CAlarmDBus(window); 44 new AlarmDBusAdaptor(alarmDBus); 45 //QDBusConnection connection = QDBusConnection::sessionBus(); 46 QDBusConnection connection = QDBusConnection::sessionBus(); 47 48 if(connection.registerObject("/Fosdem", alarmDBus) == true) 49 { 50 if( connection.registerService("org.fosdem.schedule") == false) 51 { 52 qDebug() << "dbus register service failed"; 53 } 54 } 55 37 56 return a.exec(); 38 57 } -
src/gui/gui.pro
r8c4d4f7 r6831c6a 84 84 proxysettingsdialog.cpp 85 85 86 maemo {87 FORMS += alarmdialog.ui88 HEADERS += alarmdialog.h89 SOURCES += alarmdialog.cpp90 }86 #maemo { 87 # FORMS += alarmdialog.ui 88 # HEADERS += alarmdialog.h 89 # SOURCES += alarmdialog.cpp 90 #} -
src/mvc/treeview.cpp
r8c4d4f7 r6831c6a 33 33 34 34 // returns bool if some Control was clicked 35 bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint) 35 bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint) 36 36 { 37 37 bool handled = false; … … 69 69 for(int i=0; i<conflicts.count(); i++) 70 70 emit(eventHasChanged(conflicts[i].id())); 71 71 72 72 // since the Favourite icon has changed, update TreeViews accordingly 73 73 // all TreeViews have to listen on this signal … … 142 142 if(!index.parent().isValid()) // time-group 143 143 { 144 if(isExpanded(index)) 144 if(isExpanded(index)) 145 145 setExpanded(index, false); 146 146 else -
src/src.pro
r8c4d4f7 r6831c6a 1 1 include(global.pri) 2 2 TEMPLATE = subdirs 3 SUBDIRS += orm mvc sql gui app 3 4 maemo : SUBDIRS += alarm 4 SUBDIRS += orm mvc sql gui app5 5 #SUBDIRS += test 6 6 CONFIG += ordered
Note: See TracChangeset
for help on using the changeset viewer.