From 6bd729b39f0bf6e49d9ea3ea08bcb969045acfb4 Mon Sep 17 00:00:00 2001 From: pavelpa Date: Tue, 19 Jan 2010 13:45:57 +0000 Subject: [PATCH] work on alarm --- src/alarm/alarm.cpp | 2 +- src/app/app.pro | 7 +++++++ src/app/main.cpp | 19 +++++++++++++++++-- src/gui/gui.pro | 2 +- src/mvc/mvc.pro | 7 +++++++ src/mvc/treeview.cpp | 16 ++++++++++++++++ src/schedule.en.xml | 36 ++++++++++++++++++------------------ 7 files changed, 67 insertions(+), 22 deletions(-) diff --git a/src/alarm/alarm.cpp b/src/alarm/alarm.cpp index 8355657..22c3060 100644 --- a/src/alarm/alarm.cpp +++ b/src/alarm/alarm.cpp @@ -18,7 +18,7 @@ int Alarm::addAlarm(int aEventId, const QDateTime &aDateTime) /* Add exec command action */ action = alarm_event_add_actions(event, 1); - QString command = QString("/home/maemo/work/alarm/bin/alarmdialog %1").arg(QString::number(aEventId)); + QString command = QString("/home/maemo/work/fosdem-maemo/bin/fosdem %1").arg(QString::number(aEventId)); alarm_action_set_exec_command(action, command.toLocal8Bit().data()); action->flags |= ALARM_ACTION_TYPE_EXEC; action->flags |= ALARM_ACTION_WHEN_TRIGGERED; diff --git a/src/app/app.pro b/src/app/app.pro index 188b2da..a9420ed 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -1,3 +1,4 @@ +include(../global.pri) TEMPLATE = app TARGET = fosdem DESTDIR = ../bin @@ -8,6 +9,12 @@ LIBS += -L$$DESTDIR -lgui -lmvc -lsql INCLUDEPATH += ../gui DEPENDPATH += . ../gui TARGETDEPS += $$DESTDIR/libmvc.a $$DESTDIR/libgui.a $$DESTDIR/libsql.a +maemo { + LIBS += -L$$DESTDIR -lqalarm -lalarm + INCLUDEPATH += ../alarm + DEPENDPATH += ../alarm + TARGETDEPS += $$DESTDIR/libqalarm.a +} SOURCES += main.cpp diff --git a/src/app/main.cpp b/src/app/main.cpp index f8ac9da..9505799 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1,6 +1,9 @@ #include #include +#ifdef MAEMO +#include +#endif /* MAEMO */ int main(int argc, char *argv[]) { @@ -11,8 +14,20 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); QApplication::setWindowIcon(QIcon(":/icons/fosdem.png")); - MainWindow w; - w.show(); + QWidget *window; +#ifdef MAEMO + // if the app is run with two cmd-line arguments + // an alarm dialog is to be displayed + // Usage: $ ./fosdem eventId alarmId + // Example: $ ./fosdem 521 13 + if(argc==3) + window = new AlarmDialog(argc,argv); + else + window = new MainWindow; +#else + window = new MainWindow; +#endif /* MAEMO */ + window->show(); return a.exec(); } diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 72cd959..a5389f2 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -1,4 +1,4 @@ -include(global.pri) +include(../global.pri) TEMPLATE = lib TARGET = gui DESTDIR = ../bin diff --git a/src/mvc/mvc.pro b/src/mvc/mvc.pro index 7ab7bb9..98d9e9b 100644 --- a/src/mvc/mvc.pro +++ b/src/mvc/mvc.pro @@ -1,3 +1,4 @@ +include(../global.pri) TEMPLATE = lib TARGET = mvc DESTDIR = ../bin @@ -9,6 +10,12 @@ LIBS += -L$$DESTDIR -lorm INCLUDEPATH += ../orm DEPENDPATH += . ../orm TARGETDEPS += $$DESTDIR/liborm.a +maemo { + LIBS += -L$$DESTDIR -lqalarm -lalarm + INCLUDEPATH += ../alarm + DEPENDPATH += ../alarm + TARGETDEPS += $$DESTDIR/libqalarm.a +} HEADERS += \ event.h \ diff --git a/src/mvc/treeview.cpp b/src/mvc/treeview.cpp index 89a57fb..2004973 100644 --- a/src/mvc/treeview.cpp +++ b/src/mvc/treeview.cpp @@ -5,6 +5,10 @@ #include "event.h" #include "eventmodel.h" +#ifdef MAEMO +#include +#endif + #include TreeView::TreeView(QWidget *aParent) @@ -62,11 +66,23 @@ void TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP { static_cast(aIndex.internalPointer())->setHasAlarm(false); // list of events event.setHasAlarm(false); // update DB +#ifdef MAEMO + // remove alarm from the 'alarmd' alrms list + Alarm alarm; + alarm.deleteAlarm(event.id()); + // TODO: test if removing was successfull +#endif /* MAEMO */ } else { static_cast(aIndex.internalPointer())->setHasAlarm(true); // list of events event.setHasAlarm(true); +#ifdef MAEMO + // add alarm to the 'alarmd' + Alarm alarm; + int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10)); + qDebug() << "cookie: " << cookie; +#endif /* MAEMO */ } qDebug() << " ALARM [" << qVariantValue(aIndex.data()) << "] -> " << event.hasAlarm(); event.update("alarm"); diff --git a/src/schedule.en.xml b/src/schedule.en.xml index 6f2b593..072ada8 100755 --- a/src/schedule.en.xml +++ b/src/schedule.en.xml @@ -1,17 +1,17 @@ - FOSDEM 2009 + FOSDEM 2010 Free and Opensource Software Developers European Meeting ULB (Campus Solbosch) Brussels - 2009-02-07 - 2009-02-08 + 2010-02-07 + 2010-02-08 2 08:00 00:15 - + 10:00 @@ -332,7 +332,7 @@ So we try to create: Lightning-Talk English The talk will show the main results of the FLOSSMetrics project. In particular, it will show how to obtain data about the history of software development of more than 2,000 FLOSS projects, which kind of data it is and how it can be used, and some results of using it in a research environment. - FLOSSMetrics is collecting data from the CVS/SVN repos, mailing lists and issue tracking systems of several thousands of FOSS projects, and collecting all of it into a database that is offerered to researchers and others for data mining. See http://melquiades.flossmetrics.org for the data currently been offered. The project will end in August 2009, and more data and more projects are expected in the meantime. + FLOSSMetrics is collecting data from the CVS/SVN repos, mailing lists and issue tracking systems of several thousands of FOSS projects, and collecting all of it into a database that is offerered to researchers and others for data mining. See http://melquiades.flossmetrics.org for the data currently been offered. The project will end in August 2010, and more data and more projects are expected in the meantime. Jesus M. Gonzalez Barahona @@ -422,7 +422,7 @@ Key Requirements and Functionality (2008.11 Release) Lightning Talks Lightning-Talk English - The past, present and future of the project. This talk will coincide with Opsview v3.0 release scheduled for early February 2009. + The past, present and future of the project. This talk will coincide with Opsview v3.0 release scheduled for early February 2010. Opsview is network monitoring software that significantly extends the functionality of Nagios and integrates tools such as MRTG, NMIS, RANCID and Net-SNMP. Opsview is developed using Catalyst web framework and MySQL database. James Peel @@ -719,7 +719,7 @@ PTXdist is a "make your own distribution" build system, based on Bash, Kconfig a KDE Other English - Welcome to the KDE developer room at FOSDEM 2009. + Welcome to the KDE developer room at FOSDEM 2010. Bart Coppens @@ -869,7 +869,7 @@ What are the issues? What is a repository? Can anyone contribute to repository c BSD+PostgreSQL Podium English - Keynote and welcome to the PostgreSQL and *BSD developer room at FOSDEM 2009. + Keynote and welcome to the PostgreSQL and *BSD developer room at FOSDEM 2010. Marc Balmer @@ -1000,7 +1000,7 @@ What are the issues? What is a repository? Can anyone contribute to repository c GNOME Other English - Welcome to the GNOME developer room at FOSDEM 2009. + Welcome to the GNOME developer room at FOSDEM 2010. Christophe Fergeau @@ -1457,7 +1457,7 @@ AUGEAS takes great care to preserve comments and other formatting details across openSUSE Other English - Welcome to the openSUSE developer room at FOSDEM 2009. + Welcome to the openSUSE developer room at FOSDEM 2010. Martin Lasarsch @@ -2490,7 +2490,7 @@ And if possible some demonstrations. OpenOffice.org Other English - Welcome to the OpenOffice.org developer room at FOSDEM 2009. + Welcome to the OpenOffice.org developer room at FOSDEM 2010. Jürgen Schmidt @@ -2635,7 +2635,7 @@ Canvas: the new OOo rendering subsystem, and what it can do; showing a prototype - + 10:00 @@ -2924,7 +2924,7 @@ changes that come with being an insanely popular user-written site. But the user interface hasn't changed much since 2003; if anything, packing in more features has made many aspects of the wiki harder to use over time. -In 2009, MediaWiki developers are turning their eye towards usability +In 2010, MediaWiki developers are turning their eye towards usability and design issues. As with the scaling problems we've tackled before, we have to be able to target anything from a tiny personal or intranet wiki to the massive Wikipedia sites, making a range of different use cases @@ -3112,7 +3112,7 @@ vde switches. 2.1.- Technologies involved 2.2.- Procedures: instalaltion, management, update, etc. 3.- ModularIT community project - ModularIT is a virtuliced and distributed modular services architecture based on free software. This project has been released for the spanish community at the beginning of 2008 and by January 2009 it will be translated to english. Right now it is downloadable and before the end of the year we will begin to develop the project through a public SVN. + ModularIT is a virtuliced and distributed modular services architecture based on free software. This project has been released for the spanish community at the beginning of 2008 and by January 2010 it will be translated to english. Right now it is downloadable and before the end of the year we will begin to develop the project through a public SVN. ModularIT is the result of 10 years of hard working from Grupo CPD (www.grupocpd.com) with free software systems and network services. we are a free software companies network from the Canary Islands, Spain. we are interested in presenting the project at FOSDEM. @@ -3160,7 +3160,7 @@ The primary design goal of Puppet is that it have an expressive enough language Podium English GPG/PGP and CAcert keysigning party - See [http://fosdem.org/2009/keysigning] for details. + See [http://fosdem.org/2010/keysigning] for details. Joost van Baal Theus Hagen @@ -3494,7 +3494,7 @@ This talk covers the limitations of Crush, the practical difficulties inherent i CrossDesktop Other English - Welcome to the Crossdesktop developer room at FOSDEM 2009. + Welcome to the Crossdesktop developer room at FOSDEM 2010. Christophe Fergeau @@ -3861,7 +3861,7 @@ This talk covers the limitations of Crush, the practical difficulties inherent i Drupal Other English - Welcome to the Drupal developer room at FOSDEM 2009. + Welcome to the Drupal developer room at FOSDEM 2010. Dries Buytaert @@ -4869,7 +4869,7 @@ Anyone with an interest in Groupware protocols is invited to join and discuss.Ruby and Rails Other English - Welcome to the Ruby and Rails developer room at FOSDEM 2009. + Welcome to the Ruby and Rails developer room at FOSDEM 2010. Peter Vandenabeele -- 2.39.5