2 * Copyright (C) 2010 Ixonos Plc.
4 * This file is part of fosdem-schedule.
6 * fosdem-schedule is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 2 of the License, or (at your option)
11 * fosdem-schedule is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
19 #include <mainwindow.h>
21 #include <QtGui/QApplication>
22 #include <sqlengine.h>
24 #include "eventdialog.h"
27 //#include <alarmdialog.h>
28 #include <alarmdbus.h>
29 #include <alarmdbusadaptorp.h>
33 int main(int argc, char *argv[])
35 Q_INIT_RESOURCE(icons);
36 Q_INIT_RESOURCE(maps);
39 QApplication a(argc, argv);
40 QApplication::setWindowIcon(QIcon(":/icons/fosdem.png"));
42 SqlEngine::initialize(); // creates "SQLITE" DB connection
46 window = new MainWindow;
51 CAlarmDBus *alarmDBus = new CAlarmDBus(window);
52 new AlarmDBusAdaptor(alarmDBus);
53 QDBusConnection connection = QDBusConnection::sessionBus();
55 if(connection.registerObject("/Fosdem", alarmDBus) == true)
57 if( connection.registerService("org.fosdem.schedule") == false)
61 QDBusInterface *interface = new QDBusInterface("org.fosdem.schedule",
63 "org.fosdem.schedule.AlarmInterface",
65 interface->call("Alarm",atoi(argv[1]));
73 EventDialog dialog(atoi(argv[1]),window);