Imported Upstream version 0.5.5 upstream/0.5.5
authorgregor herrmann <gregoa@debian.org>
Wed, 13 Jun 2012 15:21:40 +0000 (17:21 +0200)
committergregor herrmann <gregoa@debian.org>
Wed, 13 Jun 2012 15:21:40 +0000 (17:21 +0200)
107 files changed:
ChangeLog
NEWS
README
TODO
confclerk.pro.user.2.3pre1 [new file with mode: 0644]
data/confclerk.1
data/confclerk.png
data/confclerk.pod
src/alarm/alarm.cpp
src/alarm/alarm.h
src/alarm/calendar.cpp [deleted file]
src/alarm/calendar.h [deleted file]
src/app/alarmdbus.cpp
src/app/alarmdbus.h
src/app/alarmdbusadaptor.cpp
src/app/alarmdbusadaptorp.h
src/app/application.cpp
src/app/application.h
src/app/appsettings.cpp
src/app/appsettings.h
src/app/main.cpp
src/create_tables.sql
src/global.pri
src/gui/about.ui
src/gui/alarmdialog.cpp [deleted file]
src/gui/alarmdialog.h [deleted file]
src/gui/alarmdialog.ui [deleted file]
src/gui/conferenceeditor.cpp
src/gui/conferenceeditor.h
src/gui/conflictdialogcontainer.cpp
src/gui/conflictdialogcontainer.h
src/gui/conflictsdialog.cpp
src/gui/conflictsdialog.h
src/gui/daynavigatorwidget.cpp
src/gui/daynavigatorwidget.h
src/gui/daynavigatorwidget.ui
src/gui/dayviewtabcontainer.cpp
src/gui/dayviewtabcontainer.h
src/gui/errormessage.cpp
src/gui/errormessage.h
src/gui/eventdialog.cpp
src/gui/eventdialog.h
src/gui/eventdialog.ui
src/gui/favtabcontainer.cpp
src/gui/favtabcontainer.h
src/gui/gui.pro
src/gui/mainwindow.cpp
src/gui/mainwindow.h
src/gui/mainwindow.ui
src/gui/nowtabcontainer.cpp [deleted file]
src/gui/nowtabcontainer.h [deleted file]
src/gui/roomstabcontainer.cpp
src/gui/roomstabcontainer.h
src/gui/searchhead.cpp
src/gui/searchhead.h
src/gui/searchhead.ui
src/gui/searchtabcontainer.cpp
src/gui/searchtabcontainer.h
src/gui/settingsdialog.cpp
src/gui/settingsdialog.h
src/gui/tabcontainer.cpp
src/gui/tabcontainer.h
src/gui/tabcontainer.ui
src/gui/trackstabcontainer.cpp
src/gui/trackstabcontainer.h
src/gui/urlinputdialog.cpp
src/gui/urlinputdialog.h
src/icons.qrc
src/icons/alarm-off.png [new file with mode: 0644]
src/icons/alarm-on.png [new file with mode: 0644]
src/icons/alarm.blend [new file with mode: 0644]
src/icons/appointment-soon-off.png [deleted file]
src/icons/appointment-soon.png [deleted file]
src/icons/collapse.png [new file with mode: 0644]
src/icons/collapse.svg [new file with mode: 0644]
src/icons/emblem-new-off.png [deleted file]
src/icons/emblem-new.blend [deleted file]
src/icons/emblem-new.png [deleted file]
src/icons/expand.png [new file with mode: 0644]
src/icons/expand.svg [new file with mode: 0644]
src/icons/favourite-off.png [new file with mode: 0644]
src/icons/favourite-on.png [new file with mode: 0644]
src/icons/favourite.blend [new file with mode: 0644]
src/mvc/conference.cpp
src/mvc/conference.h
src/mvc/conferencemodel.cpp
src/mvc/conferencemodel.h
src/mvc/delegate.cpp
src/mvc/delegate.h
src/mvc/event.cpp
src/mvc/event.h
src/mvc/eventmodel.cpp
src/mvc/eventmodel.h
src/mvc/room.cpp
src/mvc/room.h
src/mvc/track.cpp
src/mvc/track.h
src/mvc/treeview.cpp
src/mvc/treeview.h
src/orm/ormrecord.h
src/sql/schedulexmlparser.cpp
src/sql/schedulexmlparser.h
src/sql/sqlengine.cpp
src/sql/sqlengine.h
src/test/main.cpp
src/test/mvc/eventtest.cpp
src/test/mvc/eventtest.h

index 214de1cfec7904e4c62501194f40dbe93ed77284..941f3fedfef556811941e411a71c18f15e0daf88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,276 @@
+2012-06-12  gregoa
+
+       * NEWS: Add release date in NEWS.
+       * TODO: remove TODO item (expand/collapse)
+       * NEWS: Add more items to NEWS.
+       * NEWS: Add items to NEWS.
+       * src/alarm/alarm.cpp, src/alarm/alarm.h, src/app/alarmdbus.cpp,
+         src/app/alarmdbus.h, src/app/alarmdbusadaptor.cpp,
+         src/app/alarmdbusadaptorp.h, src/app/application.cpp,
+         src/app/application.h, src/app/appsettings.cpp,
+         src/app/appsettings.h, src/app/main.cpp,
+         src/gui/conferenceeditor.cpp, src/gui/conferenceeditor.h,
+         src/gui/conflictdialogcontainer.cpp,
+         src/gui/conflictdialogcontainer.h, src/gui/conflictsdialog.cpp,
+         src/gui/conflictsdialog.h, src/gui/daynavigatorwidget.cpp,
+         src/gui/daynavigatorwidget.h, src/gui/dayviewtabcontainer.cpp,
+         src/gui/dayviewtabcontainer.h, src/gui/errormessage.cpp,
+         src/gui/errormessage.h, src/gui/eventdialog.cpp,
+         src/gui/eventdialog.h, src/gui/favtabcontainer.cpp,
+         src/gui/favtabcontainer.h, src/gui/mainwindow.cpp,
+         src/gui/mainwindow.h, src/gui/roomstabcontainer.cpp,
+         src/gui/roomstabcontainer.h, src/gui/searchhead.cpp,
+         src/gui/searchhead.h, src/gui/searchtabcontainer.cpp,
+         src/gui/searchtabcontainer.h, src/gui/settingsdialog.cpp,
+         src/gui/settingsdialog.h, src/gui/tabcontainer.cpp,
+         src/gui/tabcontainer.h, src/gui/trackstabcontainer.cpp,
+         src/gui/trackstabcontainer.h, src/gui/urlinputdialog.cpp,
+         src/gui/urlinputdialog.h, src/mvc/conference.cpp,
+         src/mvc/conference.h, src/mvc/conferencemodel.cpp,
+         src/mvc/conferencemodel.h, src/mvc/delegate.cpp,
+         src/mvc/delegate.h, src/mvc/event.cpp, src/mvc/event.h,
+         src/mvc/eventmodel.cpp, src/mvc/eventmodel.h, src/mvc/room.cpp,
+         src/mvc/room.h, src/mvc/track.cpp, src/mvc/track.h,
+         src/mvc/treeview.cpp, src/mvc/treeview.h, src/orm/ormrecord.h,
+         src/sql/schedulexmlparser.cpp, src/sql/schedulexmlparser.h,
+         src/sql/sqlengine.cpp, src/sql/sqlengine.h, src/test/main.cpp,
+         src/test/mvc/eventtest.cpp, src/test/mvc/eventtest.h: Add Stefan
+         as a copyright holder to source files, too.
+       * README, data/confclerk.pod: sync copyright notices between README
+         and confclerk.pod
+
+2012-06-12  philipp
+
+       * src/gui/mainwindow.cpp: Implemented expand/collapse of the event
+         groups. Resolves ticket #31.
+       * src/mvc/eventmodel.cpp: The groups starts at full hours again.
+       * src/mvc/eventmodel.cpp: Philipp's comments to r1444.
+       * README, src/gui/mainwindow.ui, src/icons.qrc,
+         src/icons/collapse.png, src/icons/collapse.svg,
+         src/icons/expand.png, src/icons/expand.svg: Created icons
+         collapse and expand.
+
+2012-05-03  gregoa
+
+       * src/mvc/eventmodel.cpp: createTimeGroups(): use QDateTime instead
+         of QTime to avoid "midnight overflow". Cf. #42
+
+2012-05-02  philipp
+
+       * src/orm/ormrecord.h: This at least partly fixes #42 ("fun with
+         time zones").
+
+2012-05-02  stefan
+
+       * src/icons/favourite-off.png, src/icons/favourite.blend: Changed
+         inactive favourite icon to match alarm icon style
+
+2012-04-22  gregoa
+
+       * src/mvc/delegate.cpp: Show the AlarmOff icon in the timegroup
+         header when the group has no alarms set.
+
+2012-04-19  gregoa
+
+       * README: Update copyright information in README for new icons.
+
+2012-04-19  philipp
+
+       * src/gui/eventdialog.cpp, src/gui/eventdialog.ui, src/icons.qrc,
+         src/icons/alarm-off.png, src/icons/alarm-on.png,
+         src/icons/alarm.blend, src/icons/appointment-soon-off.png,
+         src/icons/appointment-soon.png, src/mvc/delegate.cpp: Changed the
+         alarm icon due to ticket #40. I haven't tried it because I don't
+         have an N900 device.
+
+2012-04-19  gregoa
+
+       * NEWS: Update NEWS with recent bug fixes.
+       * README: Update copyright in README for changed icons.
+
+2012-04-19  philipp
+
+       * src/gui/eventdialog.cpp, src/gui/eventdialog.ui, src/icons,
+         src/icons.qrc, src/icons/add.png,
+         src/icons/appointment-soon-off.png,
+         src/icons/appointment-soon.png, src/icons/dialog-warning.png,
+         src/icons/emblem-new-off.png, src/icons/emblem-new.blend,
+         src/icons/emblem-new.png, src/icons/favourite-off.png,
+         src/icons/favourite-on.png, src/icons/favourite.blend,
+         src/icons/reload.png, src/icons/remove.png, src/icons/search.png,
+         src/icons/today.png, src/mvc/delegate.cpp: Changed favourite
+         icons as a response to ticket #40.
+
+2012-04-18  gregoa
+
+       * src/gui/mainwindow.cpp: Handle redirects when importing schedules
+         over the network.
+         
+         Fixes: #39
+
+2012-04-06  gregoa
+
+       * src/sql/schedulexmlparser.cpp: More output on errors.
+
+2012-04-05  gregoa
+
+       * README, data/confclerk.pod, src/gui/about.ui: Fix typo in docs.
+       * README: Update exmple URLs in README.
+
+2012-03-21  gregoa
+
+       * README, data/confclerk.pod, src/alarm/alarm.cpp,
+         src/alarm/alarm.h, src/app/alarmdbus.cpp, src/app/alarmdbus.h,
+         src/app/alarmdbusadaptor.cpp, src/app/alarmdbusadaptorp.h,
+         src/app/application.cpp, src/app/application.h,
+         src/app/appsettings.cpp, src/app/appsettings.h, src/app/main.cpp,
+         src/gui/about.ui, src/gui/conferenceeditor.cpp,
+         src/gui/conferenceeditor.h, src/gui/conflictdialogcontainer.cpp,
+         src/gui/conflictdialogcontainer.h, src/gui/conflictsdialog.cpp,
+         src/gui/conflictsdialog.h, src/gui/daynavigatorwidget.cpp,
+         src/gui/daynavigatorwidget.h, src/gui/dayviewtabcontainer.cpp,
+         src/gui/dayviewtabcontainer.h, src/gui/errormessage.cpp,
+         src/gui/errormessage.h, src/gui/eventdialog.cpp,
+         src/gui/eventdialog.h, src/gui/favtabcontainer.cpp,
+         src/gui/favtabcontainer.h, src/gui/mainwindow.cpp,
+         src/gui/mainwindow.h, src/gui/roomstabcontainer.cpp,
+         src/gui/roomstabcontainer.h, src/gui/searchhead.cpp,
+         src/gui/searchhead.h, src/gui/searchtabcontainer.cpp,
+         src/gui/searchtabcontainer.h, src/gui/settingsdialog.cpp,
+         src/gui/settingsdialog.h, src/gui/tabcontainer.cpp,
+         src/gui/tabcontainer.h, src/gui/trackstabcontainer.cpp,
+         src/gui/trackstabcontainer.h, src/gui/urlinputdialog.cpp,
+         src/gui/urlinputdialog.h, src/mvc/conference.cpp,
+         src/mvc/conference.h, src/mvc/conferencemodel.cpp,
+         src/mvc/conferencemodel.h, src/mvc/delegate.cpp,
+         src/mvc/delegate.h, src/mvc/event.cpp, src/mvc/event.h,
+         src/mvc/eventmodel.cpp, src/mvc/eventmodel.h, src/mvc/room.cpp,
+         src/mvc/room.h, src/mvc/track.cpp, src/mvc/track.h,
+         src/mvc/treeview.cpp, src/mvc/treeview.h, src/orm/ormrecord.h,
+         src/sql/schedulexmlparser.cpp, src/sql/schedulexmlparser.h,
+         src/sql/sqlengine.cpp, src/sql/sqlengine.h, src/test/main.cpp,
+         src/test/mvc/eventtest.cpp, src/test/mvc/eventtest.h: Update
+         copyright years.
+       * NEWS: Add note about fixed bug to NEWS.
+
+2012-03-21  philipp
+
+       * src/alarm/alarm.cpp, src/alarm/alarm.h,
+         src/gui/conflictdialogcontainer.cpp, src/gui/eventdialog.cpp,
+         src/mvc/treeview.cpp: Hopefully fixed bug #38: As the alarm
+         message was used to identify the event by setting it to the
+         eventId and in r1359 the alarm message was changed to show the
+         event title, alarms could not be deleted anymore. Therefore, two
+         alarm attributes (int values) were introduced with this commit:
+         "conferenceId" and "eventId" to identify the event and therefore,
+         deleting alarms should work again. Additionally a second (not
+         reported) bug was fixed: Activating an alarm in the treeview set
+         the alarm to the current time plus 10 seconds.
+         
+         However, I don't know for sure whether this commit fixed bug #38
+         becaus I don't have a maemo device to test it.
+
+2012-03-20  gregoa
+
+       * src/gui/gui.pro: Removed commented out reference to removed
+         files.
+
+2012-03-20  philipp
+
+       * src/alarm/calendar.cpp, src/alarm/calendar.h: Deleted calendar.h
+         and calendar.cpp as they are not used.
+       * src/gui/alarmdialog.cpp, src/gui/alarmdialog.h,
+         src/gui/alarmdialog.ui: Deleted files that don't seem to be used.
+
+2012-03-10  gregoa
+
+       * README, data/confclerk.pod: typo in docs
+
+2011-12-12  philipp
+
+       * TODO: Updated the TODO list.
+       * src/gui/mainwindow.cpp, src/gui/searchtabcontainer.cpp,
+         src/gui/searchtabcontainer.h: When the search toolbox button is
+         clicked when the search dialog is already open, it is closed.
+       * src/gui/mainwindow.cpp, src/gui/mainwindow.h,
+         src/gui/mainwindow.ui: Implemented stub for expand/collape all.
+       * src/gui/daynavigatorwidget.ui: Another layout study.
+       * src/gui/daynavigatorwidget.ui: Changed layout details to study
+         the effect in Maemo.
+       * src/gui/daynavigatorwidget.cpp: Better calculation of the day
+         navigator date position.
+       * src/sql/sqlengine.cpp: Fixed by gregoa: Searching for titles
+         where the events had no person did not find anything.
+       * src/gui/daynavigatorwidget.h, src/gui/mainwindow.cpp,
+         src/gui/mainwindow.h, src/gui/searchtabcontainer.cpp,
+         src/gui/searchtabcontainer.h: The search result is now synced
+         with the daynavigator. When the search result is not on the
+         current date, the date is changed.
+
+2011-11-27  gregoa
+
+       * README: Update URL list in README.
+
+2011-10-17  philipp
+
+       * src/gui/searchtabcontainer.cpp, src/mvc/event.cpp,
+         src/mvc/eventmodel.cpp: Sorted by duration additionally to start.
+       * src/create_tables.sql, src/gui/daynavigatorwidget.cpp,
+         src/gui/daynavigatorwidget.h, src/gui/daynavigatorwidget.ui,
+         src/gui/dayviewtabcontainer.cpp, src/gui/dayviewtabcontainer.h,
+         src/gui/mainwindow.cpp, src/mvc/event.h: Implemented "now" action
+         and removed the "now" button from the day navigator.
+       * src/mvc/event.cpp, src/mvc/event.h, src/mvc/eventmodel.cpp,
+         src/mvc/eventmodel.h: Removed unused nowEvent functions.
+       * src/gui/mainwindow.cpp, src/gui/mainwindow.ui: Implemented the
+         reload button functionality. Closes: #34
+       * src/gui/conflictdialogcontainer.cpp,
+         src/gui/conflictdialogcontainer.h, src/gui/conflictsdialog.cpp,
+         src/gui/conflictsdialog.h, src/gui/eventdialog.cpp,
+         src/gui/eventdialog.h, src/gui/tabcontainer.cpp: The conflict
+         editor works again.
+       * src/gui/mainwindow.cpp, src/gui/mainwindow.h,
+         src/gui/tabcontainer.cpp, src/gui/tabcontainer.h,
+         src/mvc/treeview.cpp, src/mvc/treeview.h: The favorite tab gets
+         updated again after changing the favorite state.
+
+2011-10-04  philipp
+
+       * src/gui/conflictdialogcontainer.cpp, src/gui/conflictsdialog.cpp,
+         src/gui/gui.pro, src/gui/mainwindow.cpp, src/gui/mainwindow.h,
+         src/gui/mainwindow.ui, src/gui/nowtabcontainer.cpp,
+         src/gui/nowtabcontainer.h, src/gui/searchtabcontainer.cpp,
+         src/gui/searchtabcontainer.h, src/gui/tabcontainer.cpp,
+         src/gui/tabcontainer.h, src/gui/tabcontainer.ui: Removed the
+         "Now" tab. Removed the day navigator inside tabs. Added a search
+         button in the button bar.
+         
+         Right now, at least the following does not work: * update of
+         favorites * conflict editor * setting favorite in the event
+         dialog
+
+2011-09-21  gregoa
+
+       * src/gui/searchhead.ui: Search dialog: less width, more lines.
+       * src/gui/mainwindow.ui: Tabs: elide tabtexts.
+
+2011-09-21  philipp
+
+       * src/gui/daynavigatorwidget.cpp, src/gui/daynavigatorwidget.h,
+         src/gui/mainwindow.cpp, src/gui/tabcontainer.cpp: Implemented
+         "unset dates" in the date navigator.
+       * src/gui/daynavigatorwidget.cpp, src/gui/mainwindow.cpp,
+         src/gui/tabcontainer.cpp, src/gui/tabcontainer.h: The dateChanged
+         signal is transmitted to the tabcontainers now.
+       * src/gui/mainwindow.ui: Introduced a toobar. Added a new global
+         date navigator instance (the "old" ones are not removed yet).
+       * src/gui/daynavigatorwidget.cpp, src/gui/daynavigatorwidget.h:
+         Cleanup daynavigatorwidget.
+
 2011-09-14  gregoa
 
+       * NEWS: Fix typo in NEWS.
+       * NEWS, src/global.pri: bump version after release
        * NEWS: Add date to NEWS before release.
 
 2011-09-12  gregoa
diff --git a/NEWS b/NEWS
index ba960b0b91a1bb0007ab9d3e362719e25d59180c..e4d25c58d93cc07423edf70dda58f5537e3c25fa 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,32 @@
 This is the NEWS file for ConfClerk. ConfClerk is the successor of
 fosdem-schedule; cf. docs/fosdem-schedule for the historic documentation.
 
+version 0.5.5, 2012-06-12
+* UI changes:
+  - button bar on the right side
+  - shared "day navigator"
+  - "Now" tab removed, function integrated into former "today" button
+* Add "reload schedule" button.
+  Fixes: #34
+* Alarms are actually removed now.
+  Thanks to Axel Beckert for the bug report.
+  Fixes: #38
+* Handle redirects when importing schedules over the network.
+  Thanks to Axel Beckert for the bug report.
+  Fixes: #39
+* Update some icons.
+  Thanks to Axel Beckert for the bug report.
+  Fixes: #40
+* Improve timezone handling.
+  Fixes: #42
+* Add expand/collapse buttons/actions.
+  Fixes: #31  
+* Update example URLs in README.
+
 version 0.5.4, 2011-09-14
 * Change displaying events a bit, use system colours (#13).
 * Fix display of conflict and alarm icon on maemo (#35).
-* Improve logic of grouping events into timeslits (#22).
+* Improve logic of grouping events into timeslots (#22).
 * Remove warnings without a database or with an empty one (#20).
 * Import/update: show progressbar immediately (#25).
 * Update dates and text for day navigator widget when switching 
diff --git a/README b/README
index 52fb6014a7a45167a50a806702df7a154413c5fc..31ae446a8bd2693a90784504558c1e3c6417a997 100644 (file)
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ Description:
 
 ConfClerk is an application written in Qt, which makes conference
 schedules available offline.  It displays the conference schedule
-from various views, support searches on various items (speaker, speech topic,
+from various views, supports searches on various items (speaker, speech topic,
 location, etc.) and enables you to select favorite events and create your own
 schedule.
 
@@ -14,7 +14,7 @@ At the moment ConfClerk is able to import schedules in XML format created by
 the PentaBarf conference management system (or frab) used by e.g. FOSDEM,
 DebConf, FrOSCon, Grazer Linuxtage, and the CCC.
 
-ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
+ConfClerk is targeted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
 
 See the file ./INSTALL for building and installation instructions, and
@@ -24,7 +24,7 @@ See the file ./INSTALL for building and installation instructions, and
 Copyright and License:
 
   Copyright (C) 2010 Ixonos Plc.
-  Copyright (C) 2011, Philipp Spitzer, gregor herrmann
+  Copyright (C) 2011-2012, Philipp Spitzer, gregor herrmann, Stefan Strahl
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -58,8 +58,26 @@ data/confclerk.*:
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:
+
+  Copyright (C) 2012, Philipp Spitzer, Stefan Strahl
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
 src/icons/*:
-All icons are taken from the Debian package gnome-icon-theme, which contains
+All other icons are taken from the Debian package gnome-icon-theme, which contains
 the following notice (as of 2011-06-24):
 
   Copyright © 2002-2008:
@@ -78,28 +96,10 @@ the following notice (as of 2011-06-24):
   GNOME icon theme is distributed under the terms of either
   GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
 
-src/icons/emblem-new*:
-
-  Copyright (C) 2011, Philipp Spitzer
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along
-  with this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
 
 History:
 
-ConfClerk started as fosdem-schedule, targetted at Maemo as an operating
+ConfClerk started as fosdem-schedule, targeted at Maemo as an operating
 system and the FOSDEM conference.
 fosdem-schedule was written by Ixonos Plc., maintained at
 http://sourceforge.net/projects/fosdem-maemo/ , and released under the GNU GPL
@@ -122,10 +122,10 @@ Toastfreeware
 http://www.toastfreeware.priv.at/confclerk/
 
 
-Tested pentabarf instances:
+Tested pentabarf (or frab) instances:
 
-- FOSDEM (2011): http://fosdem.org/schedule/xml
-- DebConf (2010): http://penta.debconf.org/dc10_schedule/schedule.en.xml
+- FOSDEM (2012): http://fosdem.org/schedule/xml
+- Grazer Linuxtage (2012): http://glt12-programm.linuxtage.at/schedule.de.xml
 - DebConf (2011): http://penta.debconf.org/dc11_schedule/schedule.en.xml
-- 27C3: http://events.ccc.de/congress/2010/Fahrplan/schedule.en.xml
+- 28C3: http://events.ccc.de/congress/2011/Fahrplan/schedule.en.xml
 - FrOSCon (2011): http://programm.froscon.org/2011/schedule.xml
diff --git a/TODO b/TODO
index 4eed0534b0e2caa8b30dcd730213a1cb4c886dc4..6dd4b5e20375e4601837c90b1d0baa31f0fb2c4c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,2 +1,3 @@
 - .pro: maybe add an install target
 - explore src/alarm/calendar*
+- if toolbar is turned off, it can not be turned on anymore.
diff --git a/confclerk.pro.user.2.3pre1 b/confclerk.pro.user.2.3pre1
new file mode 100644 (file)
index 0000000..a4dd0d7
--- /dev/null
@@ -0,0 +1,207 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value key="EditorConfiguration.AutoIndent" type="bool">true</value>
+   <value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
+   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+   <value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
+   <value key="EditorConfiguration.IndentBraces" type="bool">false</value>
+   <value key="EditorConfiguration.IndentSize" type="int">4</value>
+   <value key="EditorConfiguration.MouseNavigation" type="bool">true</value>
+   <value key="EditorConfiguration.PaddingMode" type="int">1</value>
+   <value key="EditorConfiguration.ScrollWheelZooming" type="bool">true</value>
+   <value key="EditorConfiguration.SmartBackspace" type="bool">true</value>
+   <value key="EditorConfiguration.SpacesForTabs" type="bool">true</value>
+   <value key="EditorConfiguration.TabKeyBehavior" type="int">2</value>
+   <value key="EditorConfiguration.TabSize" type="int">4</value>
+   <value key="EditorConfiguration.UseGlobal" type="bool">true</value>
+   <value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
+   <value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
+   <value key="EditorConfiguration.cleanIndentation" type="bool">true</value>
+   <value key="EditorConfiguration.cleanWhitespace" type="bool">true</value>
+   <value key="EditorConfiguration.inEntireDocument" type="bool">false</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+   <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-64bit.</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+      <value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
+      <value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
+      <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+     </valuemap>
+     <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
+      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt in PATH Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/gregoa/src/toastfreeware/confclerk</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-64bit.</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-64bit.</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+      <value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
+      <value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
+      <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+     </valuemap>
+     <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
+      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
+      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt in PATH Debug</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/gregoa/src/toastfreeware/confclerk</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/lib/ccache/g++.x86-linux-generic-elf-64bit.</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
+    <value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
+    <valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
+    <value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
+    <valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">app</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QString"></value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">src/app/app.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+    <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+    <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+    <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
+  <value type="QString">{2789a944-937d-44bc-b81f-9092f03d1885}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">9</value>
+ </data>
+</qtcreator>
index 0928b7667bfdfcb0b6876b14c6106fc6d8b86274..13ba763ebf8c81c84f418c52534e3aa0c4c79054 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.19)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -62,7 +62,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONFCLERK 1"
-.TH CONFCLERK 1 "2011-09-07" "Version 0.5.4" "Offlince conference scheduler"
+.TH CONFCLERK 1 "2012-06-12" "Version 0.5.5" "Offlince conference scheduler"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -76,7 +76,7 @@ ConfClerk \- offline conference schedule application
 .IX Header "DESCRIPTION"
 \&\fBConfClerk\fR is an application written in Qt, which makes conference
 schedules available offline.  It displays the conference schedule
-from various views, support searches on various items (speaker, speech topic,
+from various views, supports searches on various items (speaker, speech topic,
 location, etc.) and enables you to select favorite events and create your own
 schedule.
 .PP
@@ -84,7 +84,7 @@ At the moment \fBConfClerk\fR is able to import schedules in \s-1XML\s0 format c
 by the PentaBarf conference management system (or frab) used by e.g. \s-1FOSDEM\s0,
 DebConf, FrOSCon, Grazer Linuxtage, and the \s-1CCC\s0.
 .PP
-ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
+ConfClerk is targeted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
 .SH "OPTIONS"
 .IX Header "OPTIONS"
@@ -117,10 +117,11 @@ So the configuration (see \*(L"\s-1CONFIGURATION\s0\*(R") is stored at
 .IX Header "COPYRIGHT AND LICENSE"
 .SS "Main code"
 .IX Subsection "Main code"
-.Vb 3
+.Vb 4
 \&    Copyright (C) 2010 Ixonos Plc.
-\&    Copyright (C) 2011, Philipp Spitzer <philipp@toastfreeware.priv.at>
-\&    Copyright (C) 2011, gregor herrmann <gregor@toastfreeware.priv.at>
+\&    Copyright (C) 2011\-2012, Philipp Spitzer <philipp@toastfreeware.priv.at>
+\&    Copyright (C) 2011\-2012, gregor herrmann <gregor@toastfreeware.priv.at>
+\&    Copyright (C) 2011\-2012, Stefan Strahl <stefan@toastfreeware.priv.at>
 \&
 \&    This program is free software; you can redistribute it and/or modify
 \&    it under the terms of the GNU General Public License as published by
@@ -170,10 +171,11 @@ the following notice (as of 2011\-06\-24):
 \&    GNOME icon theme is distributed under the terms of either
 \&    GNU LGPL v.3 or Creative Commons BY\-SA 3.0 license.
 .Ve
-.IP "src/icons/emblem\-new*" 4
-.IX Item "src/icons/emblem-new*"
-.Vb 1
-\&    Copyright (C) 2011, Philipp Spitzer <philipp@toastfreeware.priv.at>
+.IP "src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:" 4
+.IX Item "src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:"
+.Vb 2
+\&    Copyright (C) 2012, Philipp Spitzer <philipp@toastfreeware.priv.at>
+\&    Copyright (C) 2012, Stefan Strahl <stefan@toastfreeware.priv.at>
 \&
 \&    This program is free software; you can redistribute it and/or modify
 \&    it under the terms of the GNU General Public License as published by
index 605f7cd5aaa698f4a6a1b6cb2e4bb1d88947a6fa..995fa68f0599e90dce0e2fbd481dc97baf439ac7 100644 (file)
Binary files a/data/confclerk.png and b/data/confclerk.png differ
index f47e7a741922f500b006192d86ff194e2c614527..4704905b4491c4f71bcb518dcfdf5a082e5c3edc 100644 (file)
@@ -12,7 +12,7 @@ B<confclerk>
 
 B<ConfClerk> is an application written in Qt, which makes conference
 schedules available offline.  It displays the conference schedule
-from various views, support searches on various items (speaker, speech topic,
+from various views, supports searches on various items (speaker, speech topic,
 location, etc.) and enables you to select favorite events and create your own
 schedule.
 
@@ -20,7 +20,7 @@ At the moment B<ConfClerk> is able to import schedules in XML format created
 by the PentaBarf conference management system (or frab) used by e.g. FOSDEM,
 DebConf, FrOSCon, Grazer Linuxtage, and the CCC.
 
-ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
+ConfClerk is targeted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
 
 =head1 OPTIONS
@@ -65,8 +65,9 @@ F<~/.local/share/data/Toastfreeware/ConfClerk/ConfClerk.sqlite>.
 =head2 Main code
 
     Copyright (C) 2010 Ixonos Plc.
-    Copyright (C) 2011, Philipp Spitzer <philipp@toastfreeware.priv.at>
-    Copyright (C) 2011, gregor herrmann <gregor@toastfreeware.priv.at>
+    Copyright (C) 2011-2012, Philipp Spitzer <philipp@toastfreeware.priv.at>
+    Copyright (C) 2011-2012, gregor herrmann <gregor@toastfreeware.priv.at>
+    Copyright (C) 2011-2012, Stefan Strahl <stefan@toastfreeware.priv.at>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -116,9 +117,10 @@ the following notice (as of 2011-06-24):
     GNOME icon theme is distributed under the terms of either
     GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
 
-=item src/icons/emblem-new*
+=item src/icons/favourite*, src/icons/alarm*, src/icons/collapse*, src/icons/expand*:
 
-    Copyright (C) 2011, Philipp Spitzer <philipp@toastfreeware.priv.at>
+    Copyright (C) 2012, Philipp Spitzer <philipp@toastfreeware.priv.at>
+    Copyright (C) 2012, Stefan Strahl <stefan@toastfreeware.priv.at>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 07c503b2ff9963dc1f640dbe44625dd12f8ddacc..e41984f9da85ddf343eae6f9dd1afd8ab44095e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 
 //#include <dbus-1.0/dbus/dbus-protocol.h>
 
-int Alarm::addAlarm(int aEventId, QString aEventTitle, const QDateTime &aDateTime)
-{
-    cookie_t cookie = 0;
-    alarm_event_t *eve = 0;
-    alarm_action_t *act = 0;
+int Alarm::addAlarm(int conferenceId, int eventId, QString eventTitle, const QDateTime &alarmDateTime) {
+    cookie_t alarmCookie = 0;
+    alarm_event_t *alarmEvent = 0;
+    alarm_action_t *alarmAction = 0;
 
     /* Create alarm event structure and set application identifier */
-    eve = alarm_event_create();
-    alarm_event_set_alarm_appid(eve, APPID);
+    alarmEvent = alarm_event_create();
+    alarm_event_set_alarm_appid(alarmEvent, APPID);
 
-    /* for Deleting purposes */
-    // ?!
-    //alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data());
-    alarm_event_set_message(eve, aEventTitle.toLocal8Bit().data());
+    // message
+    alarm_event_set_title(alarmEvent, "ConfClerk");
+    alarm_event_set_message(alarmEvent, eventTitle.toLocal8Bit().data());
+
+    // for deleting purposes
+    alarm_event_set_attr_int(alarmEvent, "conferenceId", conferenceId);
+    alarm_event_set_attr_int(alarmEvent, "eventId", eventId);
 
     /* Use absolute time triggering */
-    //eve->alarm_time = time(0) + 5; // for testing (5 seconds from now)
-    QDateTime local( aDateTime);
-    qDebug() << "UTC: " << local.toTime_t();
+    QDateTime local(alarmDateTime);
     local.setTimeSpec(Qt::LocalTime);
-    qDebug() << "LocalTime: " << local.toTime_t();
 
-    eve->alarm_time = local.toTime_t();
-    eve->flags = ALARM_EVENT_BOOT;
+    alarmEvent->alarm_time = local.toTime_t();
+    alarmEvent->flags = ALARM_EVENT_BOOT;
 
     /* Add exec command action */
-    act = alarm_event_add_actions(eve, 1);
-    alarm_action_set_label(act, "ConfClerk");
+    alarmAction = alarm_event_add_actions(alarmEvent, 1);
+    alarm_action_set_label(alarmAction, "ConfClerk");
 
-    QString command = QFileInfo(*qApp->argv()).absoluteFilePath() + QString(" %1").arg(QString::number(aEventId));
+    QString command = QFileInfo(*qApp->argv()).absoluteFilePath() + QString(" %1").arg(QString::number(eventId));
     qDebug() << "Setting alarm: " << command;
-    alarm_action_set_exec_command(act, command.toLocal8Bit().data());
-    act->flags |= ALARM_ACTION_TYPE_EXEC;
-    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
-    act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; // adds assigned cookie at the end of command string
+    alarm_action_set_exec_command(alarmAction, command.toLocal8Bit().data());
+    alarmAction->flags |= ALARM_ACTION_TYPE_EXEC;
+    alarmAction->flags |= ALARM_ACTION_WHEN_RESPONDED;
+    alarmAction->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; // adds assigned cookie at the end of command string
 
 //    // setup this action to be a "DBus command"
 //    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
@@ -87,115 +86,43 @@ int Alarm::addAlarm(int aEventId, QString aEventTitle, const QDateTime &aDateTim
 
     /* Add stop button action */
     /* TODO: send a DBus message to remove that alarm from database */
-    act = alarm_event_add_actions(eve, 1);
-    alarm_action_set_label(act, "Stop");
-    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
-    act->flags |= ALARM_ACTION_TYPE_NOP;
+    alarmAction = alarm_event_add_actions(alarmEvent, 1);
+    alarm_action_set_label(alarmAction, "Stop");
+    alarmAction->flags |= ALARM_ACTION_WHEN_RESPONDED;
+    alarmAction->flags |= ALARM_ACTION_TYPE_NOP;
 
     /* Add snooze button action */
-    act = alarm_event_add_actions(eve, 1);
-    alarm_action_set_label(act, "Snooze");
-    act->flags |= ALARM_ACTION_WHEN_RESPONDED;
-    act->flags |= ALARM_ACTION_TYPE_SNOOZE;
+    alarmAction = alarm_event_add_actions(alarmEvent, 1);
+    alarm_action_set_label(alarmAction, "Snooze");
+    alarmAction->flags |= ALARM_ACTION_WHEN_RESPONDED;
+    alarmAction->flags |= ALARM_ACTION_TYPE_SNOOZE;
 
     /* Send the alarm to alarmd */
-    cookie = alarmd_event_add(eve);
-
-    // adding alarm failed
-    if (cookie == 0)
-        emit(addAlarmFailed(aEventId));
-    else
-        emit(alarmAdded(aEventId));
+    alarmCookie = alarmd_event_add(alarmEvent);
 
     /* Free all dynamic memory associated with the alarm event */
-    alarm_event_delete(eve);
+    alarm_event_delete(alarmEvent);
 
-    return cookie;
+    return alarmCookie;
 }
 
-void Alarm::deleteAlarm(int aEventId)
-{
-    cookie_t *list = 0;
-    cookie_t cookie = 0;
-    alarm_event_t *event = 0;
+void Alarm::deleteAlarm(int conferenceId, int eventId) {
+    cookie_t *alarmList = 0;
+    cookie_t alarmCookie = 0;
+    alarm_event_t *alarmEvent = 0;
 
     // query the APPID's list of alarms
-    if( (list = alarmd_event_query(0,0, 0,0, APPID)) != 0 ) // query OK
-    {
-        for( int i = 0; (cookie = list[i]) != 0; ++i )
-        {
-            alarm_event_delete(event);
-
+    if( (alarmList = alarmd_event_query(0,0, 0,0, APPID)) != 0) { // query OK
+        for (int i = 0; (alarmCookie = alarmList[i]) != 0; ++i ) {
             // get the event for specified alarm cookie (alarmId)
-            if( (event = alarmd_event_get(cookie)) == 0 )
-            {
-                // should we inform user about it ???
-                continue;
-            }
-
-            if(aEventId==atoi(alarm_event_get_message(event)))
-            {
-                // delete cookie
-                if( alarmd_event_del(cookie) == -1 )
-                {
-                    // was not able to delete alarm for given aEventId
-                    emit(deleteAlarmFailed(aEventId));
-                    break;
-                }
-                else
-                {
-                    emit(alarmDeleted(aEventId));
-                    break;
-                }
-            }
-        }
-    }
-    else
-    {
-        // query failed
-    }
-
-    free(list);
-    alarm_event_delete(event);
-}
-
-bool Alarm::hasEventAlarm(int aEventId)
-{
-    cookie_t *list = 0;
-    cookie_t cookie = 0;
-    alarm_event_t *event = 0;
+            alarmEvent = alarmd_event_get(alarmCookie);
+            Q_ASSERT(alarmEvent);
 
-    bool eventHasAlarm = false;
-
-    // query the APPID's list of alarms
-    if( (list = alarmd_event_query(0,0, 0,0, APPID)) != 0 ) // query OK
-    {
-        for( int i = 0; (cookie = list[i]) != 0; ++i )
-        {
-            alarm_event_delete(event);
-
-            // get the event for specified alarm cookie (alarmId)
-            if( (event = alarmd_event_get(cookie)) == 0 )
-            {
-                // should we inform user about it ???
-                continue;
-            }
-
-            if(aEventId==atoi(alarm_event_get_message(event)))
-            {
-                eventHasAlarm = true;
-                break;
-            }
+            bool found = (conferenceId == alarm_event_get_attr_int(alarmEvent, "conferenceId", -1) && eventId == alarm_event_get_attr_int(alarmEvent, "eventId", -1));
+            if (found) alarmd_event_del(alarmCookie); // delete cookie
+            alarm_event_delete(alarmEvent);
+            if (found) break;
         }
     }
-    else
-    {
-        // query failed
-    }
-
-    free(list);
-    alarm_event_delete(event);
-
-    return eventHasAlarm;
+    free(alarmList);
 }
-
index e3cf5ec18cc978115071e33f1066d5d747d4717c..1aa54f1c9d27d7006e60bfa3f02a6c7777a13031 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -28,7 +28,8 @@ extern "C"
 #include <alarmd/libalarm.h>
 }
 
-#define APPID "fosdem-alarm"
+#define APPID "confclerk-alarm"
+const int PRE_EVENT_ALARM_SEC = -15*60; // alarm goes off 15 minutes before start of event
 
 class Alarm : public QObject
 {
@@ -36,14 +37,8 @@ class Alarm : public QObject
     public:
         Alarm() {}
         ~Alarm() {}
-        int addAlarm(int aEventId, QString aEventTitle, const QDateTime &aDateTime); 
-        void deleteAlarm(int aEventId);
-        static bool hasEventAlarm(int aEventId);
-    signals:
-        void alarmAdded(int aEventId);
-        void addAlarmFailed(int aEventId);
-        void alarmDeleted(int aEventId);
-        void deleteAlarmFailed(int aEventId);
+        int addAlarm(int conferenceId, int eventId, QString eventTitle, const QDateTime& alarmDateTime);
+        void deleteAlarm(int conferenceId, int eventId);
 };
 
 #endif /* ALARM_H */
diff --git a/src/alarm/calendar.cpp b/src/alarm/calendar.cpp
deleted file mode 100644 (file)
index 4e0e1a8..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include "calendar.h"
-#include <qdebug.h>
-#include <qvariant.h>
-
-#include <calendar-backend/CMulticalendar.h>
-#include <calendar-backend/CCalendar.h>
-#include <calendar-backend/CEvent.h>
-#include <calendar-backend/CAlarm.h>
-
-Calendar::Calendar():
-m_pMultiCalendar(0),
-m_pCalendar(0)
-{
-       m_pMultiCalendar = CMulticalendar::MCInstance();
-
-       if(m_pMultiCalendar != NULL)
-               m_pCalendar  = m_pMultiCalendar->getSynchronizedCalendar();
-
-}
-
-Calendar::~Calendar()
-{
-       delete m_pCalendar;
-       delete m_pMultiCalendar;
-}
-
-int Calendar::addCalendarEvent(QString summary, QString description, QString location, uint dateStart, uint  dateEnd, int eventId)
-{
-       int errorCode = 0;
-
-       if(m_pMultiCalendar == NULL)
-               return 0;
-
-       if(m_pCalendar == NULL)
-               return 0;
-
-       // create event
-       CEvent event(summary.toStdString(), description.toStdString(), location.toStdString(),  dateStart, dateEnd);
-
-       // create alarm
-       CAlarm alarm;
-       alarm.setTrigger(dateStart - 15 * 60);
-       alarm.setRepeat(1);
-       alarm.setDuration(3);
-       alarm.setAction(0);
-       alarm.setAttach(QString::number(eventId).toLocal8Bit().data());
-
-       // add alarm to event
-       event.setAlarm(&alarm);
-
-       // register event into calendar
-       m_pMultiCalendar->addEvent(&event,m_pCalendar->getCalendarId(),errorCode);
-
-    return errorCode;
-}
-
-void Calendar::deleteCalendarEvent(uint dateStart, uint dateEnd, int eventId)
-{
-       int errorCode = 0;
-
-       vector< CComponent * > components;
-
-       // get all events
-       components = m_pMultiCalendar->getComponents(m_pCalendar->getCalendarId(), 1, dateStart, dateEnd, errorCode);
-
-       for (vector<CComponent *>::iterator it = components.begin();it!=components.end(); ++it)
-       {
-               // get alarm properties
-               if( (*it)->getAlarmProperties() == true)
-               {
-                       CAlarm * pAlarm = (*it)->getAlarm();
-
-                       bool converted = false;
-                       int tempId = QVariant(pAlarm->getAttach().data()).toInt(&converted);
-
-                       // check event id
-                       if(converted == true)
-                               if(tempId == eventId)
-                               {
-                                       //delete event
-                                       m_pCalendar->deleteComponent((*it)->getId(),errorCode);
-                                       break;
-                               }
-               }
-       }
-}
-
-bool Calendar::hasCalendarEvent(int eventId)
-{
-       bool ret = false;
-       int errorCode = 0;
-
-       vector< CEvent * > events;
-
-       // get all events
-       events = m_pCalendar->getEvents(errorCode);
-
-       if(events.size() > 0)
-       {
-               for (vector<CEvent *>::iterator it = events.begin(); it!=events.end(); ++it)
-               {
-                       // get alarm properties
-                       if( (*it)->getAlarmProperties() == true)
-                       {
-                               CAlarm * pAlarm = (*it)->getAlarm();
-
-                               bool converted = false;
-                               int tempId = QVariant(pAlarm->getAttach().data()).toInt(&converted);
-
-                               // check event id
-                               if(converted == true)
-                                       if(tempId == eventId)
-                                       {
-                                               ret = true;
-                                               break;
-                                       }
-                       }
-               }
-       }
-}
diff --git a/src/alarm/calendar.h b/src/alarm/calendar.h
deleted file mode 100644 (file)
index 0183055..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef CALENDAR_H
-#define CALENDAR_H
-
-#include <QObject>
-#include <QDateTime>
-
-class CMulticalendar;
-class CCalendar;
-
-class Calendar : public QObject
-{
-    Q_OBJECT
-    public:
-       Calendar();
-        ~Calendar();
-        int addCalendarEvent(QString summary, QString description, QString location, uint dateStart, uint dateEnd, int eventId);
-        void deleteCalendarEvent(uint dateStart, uint dateEnd, int eventId);
-        bool hasCalendarEvent(int eventId);
-
-        CMulticalendar * m_pMultiCalendar;
-        CCalendar * m_pCalendar;
-//    signals:
-//        void alarmAdded(int aEventId);
-//        void addAlarmFailed(int aEventId);
-//        void alarmDeleted(int aEventId);
-//        void deleteAlarmFailed(int aEventId);
-};
-
-#endif /* CALENDAR_H */
index 39f10eca1385d5aa819b6f334651fd284b8120ce..a924041d67e290eb47ee95e4531db83dd444aab3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 41b0e0043ab062d41f45e1491eb0cfa292d49223..1b9127cd136956f7b10b21ff6745ad464e66ee98 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 9ed05dc9c64b8728235a40e2f620b55b10b8cfa1..fe1c483d29d1013a8d1932ed9618e4b771413f6b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 5d736785e9f0de0b3b3fffb2d392841fd7a20849..c5413cd1df9dc2600a794049ba2ce6a454973cd2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 1e51cc53e4445c251498771dc40b9a97999a9260..d70d06a9b4e7d56f12eb018158e8987776c166da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 59504eff69d4bc70ce9cd6cfc739d13c2a319365..84f9df2340f81ad12b4091cbc37bb55c1286a281 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 2569398e65006925ddbfe7315ff9b35a6e27ec6a..3d369babd57411c1214650da874e574d10ec7664 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 2cc48955902ec2b014b1398cb9e6c43e6e688b6a..a93c0aa1185719f14a504bab0272d69fb63d2064 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index d70f890959ce14ac970761130509d77d1108faf9..c61652b3e67c67394f829ab163a3fee99c12d4e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index a04b8d2af150c347976e67245dd1bb8511b54389..122c1cf9240720d865145c2648bc023cf3adefac 100644 (file)
@@ -32,7 +32,7 @@ CREATE TABLE PERSON ( id INTEGER NOT NULL
 CREATE TABLE EVENT ( xid_conference INTEGER  NOT NULL
     , id INTEGER NOT NULL
     , start INTEGER NOT NULL
-    , duration INTEGER NOT NULL
+    , duration INTEGER NOT NULL -- duration of the event in seconds
     , xid_track INTEGER NOT NULL REFERENCES TRACK(id)
     , type VARCHAR
     , language VARCHAR
index 093fe043b9fd865058fea1a7c066d363b335c7d0..7d223aa7d4a80110fd66882bc757fc579bda9de6 100644 (file)
@@ -4,7 +4,7 @@
 # USAGE: include(./global.pri)
 
 # VERSION
-VERSION = 0.5.4
+VERSION = 0.5.5
 DEFINES += VERSION=\\\"$$VERSION\\\"
 
 # Define 'MAEMO' specific CONFIG/DEFINE
index 95b5fc08a9dd5c10c54f6f64826861fabb93107c..ee39ef4103ac29ad6a8e75e3ee3d9bd38ecc731a 100644 (file)
@@ -131,13 +131,13 @@ p, li { white-space: pre-wrap; }
 &lt;p style=&quot; margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:xx-large; font-weight:600;&quot;&gt;ConfClerk&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Successor of FOSDEM schedule&lt;br /&gt;&lt;/span&gt;Version %1&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.toastfreeware.priv.at/confclerk/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;http://www.toastfreeware.priv.at/confclerk/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is an application written in Qt, which makes conference schedules available offline.  It displays the conference schedule from various views, support searches on various items (speaker, speech topic, location, etc.) and enables you to select favorite events and create your own schedule. At the moment ConfClerk is able to import schedules in XML format created by the PentaBarf conference management system used by e.g. FOSDEM, DebConf, FrOSCon, and the CCC.&lt;/p&gt;
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is an application written in Qt, which makes conference schedules available offline.  It displays the conference schedule from various views, supports searches on various items (speaker, speech topic, location, etc.) and enables you to select favorite events and create your own schedule. At the moment ConfClerk is able to import schedules in XML format created by the PentaBarf conference management system used by e.g. FOSDEM, DebConf, FrOSCon, and the CCC.&lt;/p&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; font-weight:600;&quot;&gt;Developers&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Berendova Monika, Hanzes Matus, Komara Martin, Korinek Pavol, Pavelka Pavol, Timko Marek, Uzak Matus, Fortes Francisco, Philipp Spitzer, gregor herrmann&lt;/p&gt;
 &lt;p style=&quot; margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:x-large; font-weight:600;&quot;&gt;Copyright and license&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.&lt;/p&gt;
 &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;ConfClerk is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.&lt;/p&gt;
-&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (C) 2010 Ixonos Plc.&lt;br /&gt;Copyright (C) 2011 Philipp Spitzer &amp;amp; gregor herrmann&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (C) 2010 Ixonos Plc.&lt;br /&gt;Copyright (C) 2011-2012 Philipp Spitzer &amp;amp; gregor herrmann&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="textFormat">
           <enum>Qt::RichText</enum>
diff --git a/src/gui/alarmdialog.cpp b/src/gui/alarmdialog.cpp
deleted file mode 100644 (file)
index e542cf8..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include "alarmdialog.h"
-#include <conference.h>
-
-#include <QApplication>
-#include <alarm.h>
-#include <event.h>
-
-#include <QDir>
-#include <QProcess>
-
-const int SNOOZE_TIME = 5; // in minutes
-
-AlarmDialog::AlarmDialog(int argc, char *argv[], QWidget *aParent)
-    : QDialog(aParent)
-    , mEventId(0)
-    , mAlarmId(0)
-{
-    setupUi(this);
-
-    if(argc<3)
-    {
-        // not enough arguments passed to the dialog
-        // Usage: $ ./dialog eventId alarmId
-        // Example: $ ./dialog 521 13
-        //
-        // TODO: handle this case
-    }
-    else
-    {
-        mEventId = QString(argv[1]).toInt();
-        mAlarmId = QString(argv[2]).toInt();
-    }
-
-    connect(stopPB, SIGNAL(clicked()), SLOT(closeDialog()));
-    connect(appPB, SIGNAL(clicked()), SLOT(runApp()));
-    connect(snoozePB, SIGNAL(clicked()), SLOT(snooze()));
-
-    qString databaseFileName;
-    databaseFileName = QDesktopServices::storageLocation(QDesktopServices::DataLocation + "/ConfClerk.sqlite" 
-    // TODO: check existence
-    QSqlDatabase database = QSqlDatabase::addDatabase("QSQLITE");
-    database.setDatabaseName(databaseFileName);
-    database.open();
-
-    QString titleStr;
-    QString messageStr;
-    QString timeStr;
-    QString personsStr;
-    QString roomStr;
-    try
-    {
-        Event event = Event::getById(mEventId,Conference::activeConference());
-        titleStr = "Event alarm";
-        messageStr = event.title();
-        timeStr = event.start().toString("hh:mm") + "-" + event.start().addSecs(event.duration()).toString("hh:mm");
-        personsStr = event.persons().join(" and ");
-        roomStr = event.room();
-    }
-    catch(OrmNoObjectException&)
-    {
-        titleStr = QString("ERROR");
-        messageStr = QString("No such event in the DB: %1").arg(QString::number(mEventId));
-    }
-    catch(...) {} // TODO: implement
-    message->setText(messageStr);
-    setWindowTitle(titleStr);
-    time->setText(timeStr);
-    persons->setText(personsStr);
-    room->setText(roomStr);
-}
-
-void AlarmDialog::runApp()
-{
-    QString program = QDir::currentPath() + "/" + *qApp->argv();
-    QProcess::startDetached(program,QStringList()<<QString::number(mEventId));
-    closeDialog();
-}
-
-void AlarmDialog::snooze()
-{
-    if(mEventId==0) // not valid event ID
-        return;
-
-    Alarm alarm;
-    alarm.addAlarm(mEventId,QDateTime::currentDateTime().addSecs(60*SNOOZE_TIME));
-    qApp->quit();
-}
-
-void AlarmDialog::closeDialog()
-{
-    // before closing the dialog, it is necessary to remove alarm flag from the DB
-    try
-    {
-        Event event = Event::getById(mEventId,Conference::activeConference());
-        event.setHasAlarm(false);
-        event.update("alarm");
-    }
-    catch(OrmNoObjectException &) {} // TODO: implement
-    catch(...) {} // just close dialog
-    qApp->quit();
-}
-
diff --git a/src/gui/alarmdialog.h b/src/gui/alarmdialog.h
deleted file mode 100644 (file)
index dbeb61e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef ALARMDIALOG_H
-#define ALARMDIALOG_H
-
-#include <QDialog>
-#include "ui_alarmdialog.h"
-
-class AlarmDialog : public QDialog, Ui::AlarmDialog
-{
-    Q_OBJECT
-    public:
-        AlarmDialog(int argc, char *argv[], QWidget *aParent = NULL);
-        ~AlarmDialog() {}
-    private slots:
-        void runApp();
-        void snooze();
-        void closeDialog();
-    private:
-        int mEventId; // event ID obtained from 'schedule'
-        int mAlarmId; // cookie assigned by alarmd
-};
-
-#endif /* ALARMDIALOG_H */
-
diff --git a/src/gui/alarmdialog.ui b/src/gui/alarmdialog.ui
deleted file mode 100644 (file)
index d0cd82e..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AlarmDialog</class>
- <widget class="QDialog" name="AlarmDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>406</width>
-    <height>176</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="2" column="0">
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <widget class="QLabel" name="message">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="text">
-        <string>Alarm message goes here</string>
-       </property>
-       <property name="wordWrap">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout_2">
-       <item>
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string/>
-         </property>
-         <property name="pixmap">
-          <pixmap resource="../../data/data.qrc">:/confclerk.svg</pixmap>
-         </property>
-         <property name="scaledContents">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <layout class="QGridLayout" name="gridLayout_2">
-         <item row="0" column="1">
-          <widget class="QLabel" name="label_2">
-           <property name="text">
-            <string>Time:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="QLabel" name="label_3">
-           <property name="text">
-            <string>Presenter(s):</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QLabel" name="label_4">
-           <property name="text">
-            <string>Room:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="3">
-          <widget class="QLabel" name="persons">
-           <property name="text">
-            <string>PRESETNER(S)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="3">
-          <widget class="QLabel" name="time">
-           <property name="text">
-            <string>TIME</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="3">
-          <widget class="QLabel" name="room">
-           <property name="text">
-            <string>ROOM</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0">
-          <widget class="QLabel" name="label_5">
-           <property name="text">
-            <string/>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="2">
-          <widget class="QLabel" name="label_6">
-           <property name="text">
-            <string/>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="horizontalSpacer">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>40</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout">
-       <item>
-        <widget class="QPushButton" name="appPB">
-         <property name="text">
-          <string>App</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="snoozePB">
-         <property name="text">
-          <string>Snooze</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="stopPB">
-         <property name="text">
-          <string>Cancel</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="../icons.qrc"/>
-  <include location="../../data/data.qrc"/>
- </resources>
- <connections/>
-</ui>
index d17bad3adcef95a4e3ab83795319d69ffe366b20..718999ce62e048b167ce06ce08184c78a52e5269 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index daa8f3fa2c1b955454589e3e187e9ba771e458e0..39af759fd62b8fa6310a661b7471e9b1cab00658 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 8e3e00bcac1c0908c725b6e070d3d83912c7cb55..f0f3ed571476cc03145beaa4d3cae45c08f1eb54 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 #include "conflictdialogcontainer.h"
 
 ConflictDialogContainer::ConflictDialogContainer(QWidget *aParent)
-    : TabContainer( aParent )
-{
-}
+    : TabContainer( aParent ), mEventId(-1), mConferenceId(-1)
+{}
 
-void ConflictDialogContainer::loadEvents( const QDate &aDate, const int aConferenceId )
-{
-    Q_UNUSED(aDate);
 
-    static_cast<EventModel*>(treeView->model())->loadConflictEvents( mEventId, aConferenceId );
-    dayNavigator->hide();
+void ConflictDialogContainer::setEventId(int aEventId, int conferenceId) {
+    mEventId = aEventId;
+    mConferenceId = conferenceId;
+    loadEvents();
 }
 
-void ConflictDialogContainer::updateTreeView(const QDate &aDate)
-{
-    TabContainer::updateTreeView(aDate);
+
+void ConflictDialogContainer::loadEvents() {
+    static_cast<EventModel*>(treeView->model())->loadConflictEvents(mEventId, mConferenceId);
     treeView->setAllExpanded(true);
 }
 
+
+void ConflictDialogContainer::loadEvents(const QDate &aDate, const int aConferenceId) {
+    Q_UNUSED(aDate);
+    Q_UNUSED(aConferenceId);
+    Q_ASSERT(aConferenceId == mConferenceId);
+    Q_ASSERT(mConferenceId > 0);
+    Q_ASSERT(mEventId > 0);
+    loadEvents();
+}
+
+
index 9f1616b245a11c03d876d4a1195c20712a881a1f..b7dad73045b089c881540a72d12ad1ec96c0cff3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -28,18 +28,18 @@ class ConflictDialogContainer: public TabContainer
     Q_OBJECT
 public:
     ConflictDialogContainer(QWidget *aParent);
-    virtual ~ConflictDialogContainer(){}
+    virtual ~ConflictDialogContainer() {}
 
-    void setEventId(int aEventId) { mEventId = aEventId; }
+public slots:
+    void setEventId(int aEventId, int conferenceId);
+    void loadEvents(); // update the conflicts
 
 protected:
-    virtual void loadEvents( const QDate &aDate, const int aConferenceId );
-
-protected slots:
-    virtual void updateTreeView(const QDate &aDate);
+    virtual void loadEvents(const QDate &aDate, const int aConferenceId); // the date and conference are ignored
 
 private:
     int mEventId;
+    int mConferenceId;
 };
 
 #endif /* CONFLICTDIALOGCONTAINER_H */
index 11fed30e9fc612f6ddc0596e3807e55555aab220..187e2a313c185e7c0713774b094308c7f6b9de62 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
  */
 #include "conflictsdialog.h"
 
-ConflictsDialog::ConflictsDialog(int aEventId, QWidget *aParent)
+ConflictsDialog::ConflictsDialog(int aEventId, int aConferenceId, QWidget *aParent)
     : QDialog(aParent)
 {
     setupUi(this);
-    connect(container, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
-    connect(container, SIGNAL(eventHasChanged(int,bool)), container, SLOT(updateTreeViewModel(int,bool)));
+    connect(container, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
+    connect(container, SIGNAL(eventChanged(int,bool)), container, SLOT(loadEvents()));
 
-    container->setEventId(aEventId);
-
-    int confId = Conference::activeConference();
-    QDate startDate = Conference::getById(confId).start();
-    QDate endDate = Conference::getById(confId).end();
-    container->setDates(startDate, endDate);
+    container->setEventId(aEventId, aConferenceId);
 }
 
+
 ConflictsDialog::~ConflictsDialog()
 {
-    disconnect(container, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    disconnect(container, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
 }
 
index cca88db6cb9d5b240640531fd1dac7bdb507ff82..fa79c6797208655cd76902881fa995d50801e169 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -27,10 +27,10 @@ class ConflictsDialog : public QDialog, Ui::ConflictsDialog
 {
     Q_OBJECT
 public:
-    ConflictsDialog(int aEventId, QWidget *aParent = NULL);
+    ConflictsDialog(int aEventId, int aConferenceId, QWidget *aParent = NULL);
     ~ConflictsDialog();
 signals:
-    void eventHasChanged(int aEventId, bool aReloadModel = false);
+    void eventChanged(int aEventId, bool favouriteChanged);
 };
 
 #endif /* CONFLICTSDIALOG_H */ 
index 48ca927109a16c8b08ebefae9fbf800faddf3442..3e6a033930d69d7ff4ebb11956bda208f6153017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 #include "daynavigatorwidget.h"
 
 #include <QPainter>
-#include <QFontMetrics>
 #include <QLabel>
 
-#include <QDebug>
 
-DayNavigatorWidget::DayNavigatorWidget(QWidget *aParent)
-    : QWidget(aParent)
-    , mStartDate(QDate())
-    , mEndDate(QDate())
-    , mCurDate(QDate())
-{
-    setupUi(this);
+DayNavigatorWidget::DayNavigatorWidget(QWidget *aParent): QWidget(aParent) {
+    setupUi(this);    
+
     connect(prevDayButton, SIGNAL(clicked()), SLOT(prevDayButtonClicked()));
     connect(nextDayButton, SIGNAL(clicked()), SLOT(nextDayButtonClicked()));
-    connect(todayButton, SIGNAL(clicked()), SLOT(todayButtonClicked()));
 
-    mFontMetrics = new QFontMetrics(QLabel().font());
+    configureNavigation();
 }
 
-void DayNavigatorWidget::setDates(const QDate &aStartDate, const QDate &aEndDate)
-{
-    Q_ASSERT(aStartDate<=aEndDate);
+
+void DayNavigatorWidget::setDates(const QDate &aStartDate, const QDate &aEndDate) {
+    Q_ASSERT(aStartDate.isValid() && aEndDate.isValid() && aStartDate<=aEndDate);
 
     mStartDate = aStartDate;
     mEndDate = aEndDate;
+
     if (!mCurDate.isValid()) mCurDate = mStartDate;
     // if mCurDate is out of range, set it to mstartDate
     else if (mCurDate < mStartDate || mCurDate > mEndDate) mCurDate = mStartDate;
 
-    prevDayButton->setDisabled(mCurDate == mStartDate);
-    nextDayButton->setDisabled(mCurDate == mEndDate);
+    configureNavigation();
     emit(dateChanged(mCurDate));
     this->update();
 }
 
-void DayNavigatorWidget::configureNavigation()
-{
-    // check start date
-    if(mCurDate==mStartDate || mStartDate==mEndDate)
-        prevDayButton->setDisabled(true);
-    else
-        prevDayButton->setDisabled(false);
-    // check end date
-    if(mCurDate==mEndDate || mStartDate==mEndDate)
-        nextDayButton->setDisabled(true);
-    else
-        nextDayButton->setDisabled(false);
-}
 
-void DayNavigatorWidget::prevDayButtonClicked()
-{
-    if(mCurDate>mStartDate)
-    {
-        mCurDate = mCurDate.addDays(-1);
-        configureNavigation();
-        emit(dateChanged(mCurDate));
-        this->update();
+void DayNavigatorWidget::setCurDate(const QDate& curDate) {
+    Q_ASSERT(curDate.isValid());
+    if (curDate == mCurDate) return;
+
+    if (!mStartDate.isValid()) {
+        // the start and end date have not been set
+        mStartDate = curDate;
+        mEndDate = curDate;
+        mCurDate = curDate;
     }
+
+    else if (curDate < mStartDate) mCurDate = mStartDate;
+    else if (curDate > mEndDate) mCurDate = mEndDate;
+    else mCurDate = curDate;
+
+    configureNavigation();
+    emit(dateChanged(mCurDate));
+    this->update();
 }
 
-void DayNavigatorWidget::nextDayButtonClicked()
-{
-    if(mCurDate<mEndDate)
-    {
-        mCurDate = mCurDate.addDays(1);
-        configureNavigation();
-        emit(dateChanged(mCurDate));
-        this->update();
-    }
+
+void DayNavigatorWidget::unsetDates() {
+    mStartDate= QDate();
+    mEndDate = QDate();
+    mCurDate = QDate();
+
+    configureNavigation();
+    emit(dateChanged(mCurDate));
+    this->update();
 }
 
-void DayNavigatorWidget::todayButtonClicked()
-{
-    QDate targetDate = QDate::currentDate();
-    if (targetDate>mStartDate && targetDate<mEndDate)
-    {
-        mCurDate = targetDate;
-        configureNavigation();
-        emit(dateChanged(mCurDate));
-        this->update();
-    }
+
+void DayNavigatorWidget::configureNavigation() {
+    prevDayButton->setDisabled(!mStartDate.isValid() || mCurDate == mStartDate);
+    nextDayButton->setDisabled(!mEndDate.isValid() || mCurDate == mEndDate);
 }
 
-void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
-{
+
+void DayNavigatorWidget::prevDayButtonClicked() {
+    if(mCurDate <= mStartDate) return;
+    mCurDate = mCurDate.addDays(-1);
+    configureNavigation();
+    emit(dateChanged(mCurDate));
+    this->update();
+}
+
+
+void DayNavigatorWidget::nextDayButtonClicked() {
+    if(mCurDate >= mEndDate) return;
+    mCurDate = mCurDate.addDays(1);
+    configureNavigation();
+    emit(dateChanged(mCurDate));
+    this->update();
+}
+
+
+void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent) {
     Q_UNUSED(aEvent);
 
-    QString selectedDateStr = mCurDate.toString("dddd\nyyyy-MM-dd");
+    QString selectedDateStr = mCurDate.isValid() ? mCurDate.toString("dddd\nyyyy-MM-dd") : tr("No date");
     QPainter painter(this);
     painter.save();
 
     // rectangle only for the text
-    int marginSize = 9;
-    int buttonSize = 32;
-#ifdef MAEMO
-    QRect q(y()-height()+1*marginSize+2.5*buttonSize, x(), height()-2*marginSize-2.5*buttonSize, width());
-#else
-    QRect q(y()-height()+1*marginSize+2*buttonSize, x(), height()-2*marginSize-3*buttonSize, width());
-#endif
+    QRect q(-selectedDate->height()-selectedDate->y(), selectedDate->x(), selectedDate->height(), selectedDate->width());
     painter.rotate(270);
 
     // font size adjustion, static on maemo, dynamically otherwise
@@ -134,4 +129,3 @@ void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
     painter.drawText(q, Qt::AlignCenter, selectedDateStr);
     painter.restore();
 }
-
index 79d71f0748102089dc9b4c37023bf1ace1c2155d..889e0dbf57903c847b8d7f26c8929c08e576a922 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 #include <QObject>
 #include <QDate>
 
-/*#include <QPainter>*/
-/*#include <QLabel>*/
-
-/*class QFontMetrics;*/
-
-/*class VerticalLabel : public QWidget*/
-/*{*/
-
-/*public:*/
-/*VerticalLabel(QWidget *aParent = NULL)*/
-/*: QWidget(aParent)*/
-/*, mText("")*/
-/*{*/
-/*mFont = QLabel().font();*/
-/*}   */
-
-/*void paintEvent(QPaintEvent *)*/
-/*{   */
-/*QPainter p(this);*/
-/*drawRotatedText(&p, 270, width()/2, height()/2, mText);*/
-/*}   */
-
-/*void drawRotatedText(QPainter *aPainter, qreal aDegrees, int x, int y, const QString &aText)*/
-/*{   */
-
-/*aPainter->save();*/
-/*aPainter->setFont(mFont);*/
-/*aPainter->translate(x, y); */
-/*aPainter->rotate(aDegrees);*/
-/*QFontMetrics fm(mFont);*/
-/*QRect r = fm.boundingRect(aText);*/
-/*aPainter->drawText(-r.width()/2, fm.descent()/2, aText);*/
-/*aPainter->restore();*/
-/*}   */
-
-/*void setText(const QString &aText)*/
-/*{*/
-/*mText = aText;*/
-/*update();*/
-/*}*/
-
-/*private:*/
-/*QString mText;*/
-/*QFont mFont;*/
-/*};*/
-
-class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
-{
+/** The DayNavigator widget manages three dates, the startDate, curDate and endDate.
+Either startDate, curDate and endDate all have to be valid and startDate <= curDate <= endDate,
+OR all three dates are invalid (representing "no date range", e.g. no conference). */
+class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget {
     Q_OBJECT
     public:
         DayNavigatorWidget(QWidget *aParent = NULL);
         ~DayNavigatorWidget() {}
         void setDates(const QDate &aStartDate, const QDate &aEndDate);
+        void setCurDate(const QDate& curDate);
+        QDate startDate() const {return mStartDate;}
         QDate curDate() const {return mCurDate;}
+        QDate endDate() const {return mEndDate;}
+        void unsetDates();
     protected:
         void paintEvent(QPaintEvent *);
         void configureNavigation();
     private slots:
-        void todayButtonClicked();
         void prevDayButtonClicked();
         void nextDayButtonClicked();
     signals:
@@ -91,7 +50,6 @@ class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
         QDate mStartDate;
         QDate mEndDate;
         QDate mCurDate;
-        QFontMetrics *mFontMetrics;
 };
 
 #endif /* DAYNAVIGATORWIDGET_H */
index 255790a96bc3f036cd85b0ef54dd52eda9f59f14..4fd5b6ea607c1c7b4a34cea0288a799752010ee7 100644 (file)
@@ -6,85 +6,43 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>52</width>
-    <height>198</height>
+    <width>31</width>
+    <height>138</height>
    </rect>
   </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <property name="layoutDirection">
-   <enum>Qt::LeftToRight</enum>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="1" column="0">
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <property name="spacing">
-      <number>0</number>
+  <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QToolButton" name="nextDayButton">
+     <property name="autoRaise">
+      <bool>true</bool>
+     </property>
+     <property name="arrowType">
+      <enum>Qt::UpArrow</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QWidget" name="selectedDate" native="true"/>
+   </item>
+   <item>
+    <widget class="QToolButton" name="prevDayButton">
+     <property name="autoRaise">
+      <bool>true</bool>
+     </property>
+     <property name="arrowType">
+      <enum>Qt::DownArrow</enum>
      </property>
-     <item>
-      <widget class="QToolButton" name="nextDayButton">
-       <property name="text">
-        <string>...</string>
-       </property>
-       <property name="autoRaise">
-        <bool>true</bool>
-       </property>
-       <property name="arrowType">
-        <enum>Qt::UpArrow</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QWidget" name="selectedDate" native="true">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QToolButton" name="prevDayButton">
-       <property name="text">
-        <string>...</string>
-       </property>
-       <property name="autoRaise">
-        <bool>true</bool>
-       </property>
-       <property name="arrowType">
-        <enum>Qt::DownArrow</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QToolButton" name="todayButton">
-       <property name="text">
-        <string>...</string>
-       </property>
-       <property name="icon">
-        <iconset resource="../icons.qrc">
-         <normaloff>:/icons/today.png</normaloff>:/icons/today.png</iconset>
-       </property>
-       <property name="autoRaise">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
+    </widget>
    </item>
   </layout>
  </widget>
- <resources>
-  <include location="../icons.qrc"/>
- </resources>
+ <resources/>
  <connections/>
  <slots>
   <slot>prevDayButtonClicked()</slot>
index 35ce2d81ff96cd60a3fb52ae89866f3d88f1bc08..5688053308320a821a1afea1b15779fe95278257 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 
 #include "dayviewtabcontainer.h"
 
-DayViewTabContainer::DayViewTabContainer(QWidget *aParent) : TabContainer( aParent )
-{
+DayViewTabContainer::DayViewTabContainer(QWidget *aParent): TabContainer(aParent) {
 }
 
-DayViewTabContainer::~DayViewTabContainer()
-{
+
+void DayViewTabContainer::expandTimeGroup(QTime time, int conferenceId) {
+    EventModel* eventModel = static_cast<EventModel*>(treeView->model());
+
+    // iterate over the time groups
+    for (int g = 0; g != eventModel->rowCount(); ++g) {
+        QModelIndex groupIdx = eventModel->index(g, 0);
+        // iterate over the events in the group
+        for (int e = 0; e != eventModel->rowCount(groupIdx); ++e) {
+            QModelIndex eventIdx = eventModel->index(e, 0, groupIdx);
+            int eventId = eventIdx.data().toInt();
+            Event event = Event::getById(eventId, conferenceId);
+            if (time < event.start().time().addSecs(event.duration())) { // if time < end
+                // expand this group
+                treeView->expand(groupIdx);
+                treeView->scrollTo(eventIdx, QAbstractItemView::PositionAtTop);
+                return;
+            }
+        }
+    }
 }
 
-void DayViewTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
-{
+
+void DayViewTabContainer::loadEvents( const QDate &aDate, const int aConferenceId ) {
     static_cast<EventModel*>(treeView->model())->loadEvents( aDate, aConferenceId );
 }
index e049ff6f622078b8e92e8843263f077374c1309b..d88d79a8f27ec34ab1ad42bf81681881911e533a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -27,7 +27,11 @@ class DayViewTabContainer: public TabContainer {
     Q_OBJECT
 public:
     DayViewTabContainer(QWidget *aParent);
-    virtual ~DayViewTabContainer();
+    virtual ~DayViewTabContainer() {}
+
+public slots:
+    void expandTimeGroup(QTime time, int conferenceId);
+
 protected:
     virtual void loadEvents(const QDate &aDate, const int aConferenceId );
 };
index 407f52d2ce00f07d185dc05bab63b7b81b89b9e2..1c289136a38e224a6bb819b4613d25de6aad802c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 665503c1bc5de8b636c7fd03a6b154e21bc3be92..731aa1be073e9a207c03e6b80e204d843f216ec8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 6fd700470f040fd3537f769db554d15b9ee46178..ff3ceccb13f35e3f933faaf132f354ef17737f43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
  * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
  */
 #include "eventdialog.h"
-#include <conference.h>
+#include "conference.h"
 
 #include <QScrollBar>
 
 #ifdef MAEMO
-#include <alarm.h>
+#include "alarm.h"
 #endif
 
 EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
@@ -54,12 +54,12 @@ EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
 
     if(event.isFavourite())
     {
-        favouriteButton->setIcon(QIcon(":/icons/emblem-new.png"));
+        favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
     }
 
     if(event.hasAlarm())
     {
-        alarmButton->setIcon(QIcon(":/icons/appointment-soon.png"));
+        alarmButton->setIcon(QIcon(":/icons/alarm-on.png"));
     }
 }
 
@@ -71,12 +71,12 @@ void EventDialog::favouriteClicked()
     if(event.isFavourite())
     {
         event.setFavourite(false);
-        favouriteButton->setIcon(QIcon(":/icons/emblem-new-off.png"));
+        favouriteButton->setIcon(QIcon(":/icons/favourite-off.png"));
     }
     else
     {
         event.setFavourite(true);
-        favouriteButton->setIcon(QIcon(":/icons/emblem-new.png"));
+        favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
     }
     event.update("favourite");
 
@@ -86,13 +86,13 @@ void EventDialog::favouriteClicked()
         conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
     }
 
-    // have to emit 'eventHasChanged' signal on all events in conflict
+    // have to emit 'eventChanged' signal on all events in conflict
     for(int i=0; i<conflicts.count(); i++)
-        emit(eventHasChanged(conflicts[i].id()));
+        emit eventChanged(conflicts[i].id(), false);
 
     // since the Favourite icon has changed, update TreeViews accordingly
     // all TreeViews have to listen on this signal
-    emit(eventHasChanged(event.id(),true));
+    emit eventChanged(event.id(), true);
 }
 
 void EventDialog::alarmClicked()
@@ -102,27 +102,27 @@ void EventDialog::alarmClicked()
     if(event.hasAlarm())
     {
         event.setHasAlarm(false); // update DB
-        alarmButton->setIcon(QIcon(":/icons/appointment-soon-off.png"));
+        alarmButton->setIcon(QIcon(":/icons/alarm-off.png"));
 #ifdef MAEMO
         // remove alarm from the 'alarmd' alrms list
         Alarm alarm;
-        alarm.deleteAlarm(event.id());
+        alarm.deleteAlarm(event.conferenceId(), event.id());
         // TODO: test if removing was successfull
 #endif /* MAEMO */
     }
     else
     {
         event.setHasAlarm(true);
-        alarmButton->setIcon(QIcon(":/icons/appointment-soon.png"));
+        alarmButton->setIcon(QIcon(":/icons/alarm-on.png"));
 #ifdef MAEMO
         // add alarm to the 'alarmd'
         Alarm alarm;
-        int cookie = alarm.addAlarm(event.id(),event.title(),QDateTime::currentDateTime().addSecs(10));
+        alarm.addAlarm(event.conferenceId(), event.id(), event.title(), event.start().addSecs(PRE_EVENT_ALARM_SEC));
 #endif /* MAEMO */
     }
     event.update("alarm");
     // since the Alarm icon has changed, update TreeView accordingly
     // all TreeViews have to listen on this signal
-    emit(eventHasChanged(event.id()));
+    emit eventChanged(event.id(), false);
 }
 
index afd0b23cbd9e030f247545776d851a174a9eb06a..bcb70cdf786d52a86721ebac978b437a4d8eef94 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -34,7 +34,7 @@ private slots:
     void favouriteClicked();
     void alarmClicked();
 signals:
-    void eventHasChanged(int aEventId, bool aReloadModel = false); // emited when user changes some event details, eg. sets it Favourite
+    void eventChanged(int aEventId, bool favouriteChanged); // emited when user changes some event details, eg. sets it Favourite
 private:
     int mEventId;
 };
index 73c2d4b3430629c006918435e2f35123e11acb17..1ab6a55a26d0aedbd9fdcdf337ed03ae3c547d76 100644 (file)
@@ -66,9 +66,9 @@
         <property name="geometry">
          <rect>
           <x>0</x>
-          <y>0</y>
-          <width>461</width>
-          <height>276</height>
+          <y>-1</y>
+          <width>446</width>
+          <height>262</height>
          </rect>
         </property>
         <layout class="QGridLayout" name="gridLayout_2">
          </property>
          <property name="icon">
           <iconset resource="../icons.qrc">
-           <normaloff>:/icons/appointment-soon-off.png</normaloff>:/icons/appointment-soon-off.png</iconset>
+           <normaloff>:/icons/alarm-off.png</normaloff>:/icons/alarm-off.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="shortcut">
+          <string>CapsLock</string>
          </property>
         </widget>
        </item>
          </property>
          <property name="icon">
           <iconset resource="../icons.qrc">
-           <normaloff>:/icons/emblem-new-off.png</normaloff>:/icons/emblem-new-off.png</iconset>
+           <normaloff>:/icons/favourite-off.png</normaloff>:/icons/favourite-off.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
          </property>
         </widget>
        </item>
index 0def750c04baa4d4694b81aa50c4cdf9206c18cc..1d13e408e811752c6e6754e859b37ea819661c02 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index c603f2a1a6c7874061b0c06fa6bcf387cd3fa5ca..1622027b472ab4b8bb36883f1f6248103ad4dd67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index b6898f79e8378ac340f87ff541518e8d18f87377..f9f7028999d64ac2293e3622e97c50f554c754df 100644 (file)
@@ -49,7 +49,6 @@ FORMS += searchhead.ui \
     urlinputdialog.ui
 
 HEADERS += roomstabcontainer.h \
-    nowtabcontainer.h \
     trackstabcontainer.h \
     favtabcontainer.h \
     searchtabcontainer.h \
@@ -66,7 +65,6 @@ HEADERS += roomstabcontainer.h \
     urlinputdialog.h
 
 SOURCES += roomstabcontainer.cpp \
-    nowtabcontainer.cpp \
     trackstabcontainer.cpp \
     favtabcontainer.cpp \
     searchtabcontainer.cpp \
@@ -88,8 +86,3 @@ CONFIG(maemo5) {
     QT += maemo5
 }
 
-#maemo { 
-#    FORMS += alarmdialog.ui
-#    HEADERS += alarmdialog.h
-#    SOURCES += alarmdialog.cpp
-#}
index 71c0bee4db3b13de72c30279e7bccd73bad57e26..67cf5bd168ed8894edcfff3910490909611dd579 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -84,16 +84,22 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     QNetworkProxy::setApplicationProxy(proxy);
 
     // event details have changed
-    connect(dayTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(favsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(tracksTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(roomsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(nowTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(searchTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
+    connect(dayTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
+    connect(favsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
+    connect(tracksTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
+    connect(roomsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
+    connect(searchTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
+
+    // date has changed
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(redisplayDate(QDate)));
+
+    // search result has changed
+    connect(searchTabContainer, SIGNAL(searchResultChanged()), SLOT(onSearchResultChanged()));
 
-    connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp()));
-    connect(settingsAction, SIGNAL(triggered()), SLOT(setup()));
-    connect(conferencesAction, SIGNAL(triggered()), SLOT(showConferences()));
 
     useConference(Conference::activeConference());
     // optimization, see useConference() code
@@ -104,13 +110,6 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
         clearTabs();
     }
 
-    // TODO: open conferences at startup?
-    #if 0
-    if(!confCount)
-        tabWidget->setCurrentIndex(6); // 6 - conference tab
-    }
-    #endif
-
     // open dialog for given Event ID
     // this is used in case Alarm Dialog request application to start
     if(aEventId)
@@ -130,7 +129,7 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     connect(mXmlParser, SIGNAL(parsingScheduleEnd(const QString&)), conferenceModel, SLOT(newConferenceEnd(const QString&)));
 }
 
-void MainWindow::aboutApp()
+void MainWindow::on_aboutAction_triggered()
 {
     QDialog dialog(this);
     Ui::AboutDialog ui;
@@ -142,16 +141,85 @@ void MainWindow::aboutApp()
     dialog.exec();
 }
 
-void MainWindow::eventHasChanged(int aEventId, bool aReloadModel)
-{
-    dayTabContainer->updateTreeViewModel(aEventId);
-    favsTabContainer->updateTreeViewModel(aEventId,aReloadModel);
-    tracksTabContainer->updateTreeViewModel(aEventId);
-    nowTabContainer->updateTreeViewModel(aEventId);
-    roomsTabContainer->updateTreeViewModel(aEventId);
-    searchTabContainer->updateTreeViewModel(aEventId);
+
+void MainWindow::on_reloadAction_triggered() {
+    int confId = Conference::activeConference();
+    if (confId== -1) return;
+    Conference active = Conference::getById(confId);
+    if (active.url().isEmpty()) return;
+    importFromNetwork(active.url());
+    setEnabled(false);
 }
 
+
+void MainWindow::on_nowAction_triggered() {
+    int confId = Conference::activeConference();
+    if (confId== -1) return;
+    dayNavigator->setCurDate(QDate::currentDate());
+    dayTabContainer->expandTimeGroup(QTime::currentTime(), confId);
+}
+
+
+void MainWindow::on_searchAction_triggered() {
+    if (tabWidget->currentWidget() == searchTab)
+        searchTabContainer->showSearchDialog(!searchTabContainer->searchDialogIsVisible());
+    else {
+        tabWidget->setCurrentWidget(searchTab);
+        searchTabContainer->showSearchDialog();
+    }
+}
+
+
+void MainWindow::on_expandAllAction_triggered() {
+    if (tabWidget->currentWidget() == favouritesTab) favsTabContainer->treeView->expandAll();
+    if (tabWidget->currentWidget() == dayViewTab) dayTabContainer->treeView->expandAll();
+    if (tabWidget->currentWidget() == tracksTab) tracksTabContainer->treeView->expandAll();
+    if (tabWidget->currentWidget() == roomsTab) roomsTabContainer->treeView->expandAll();
+    if (tabWidget->currentWidget() == searchTab) searchTabContainer->treeView->expandAll();
+}
+
+
+void MainWindow::on_collapseAllAction_triggered() {
+    if (tabWidget->currentWidget() == favouritesTab) favsTabContainer->treeView->collapseAll();
+    if (tabWidget->currentWidget() == dayViewTab) dayTabContainer->treeView->collapseAll();
+    if (tabWidget->currentWidget() == tracksTab) tracksTabContainer->treeView->collapseAll();
+    if (tabWidget->currentWidget() == roomsTab) roomsTabContainer->treeView->collapseAll();
+    if (tabWidget->currentWidget() == searchTab) searchTabContainer->treeView->collapseAll();
+}
+
+
+void MainWindow::onEventChanged(int aEventId, bool favouriteChanged) {
+    dayTabContainer->redisplayEvent(aEventId);
+    if (favouriteChanged) favsTabContainer->redisplayDate(dayNavigator->curDate());
+    else favsTabContainer->redisplayEvent(aEventId);
+    tracksTabContainer->redisplayEvent(aEventId);
+    roomsTabContainer->redisplayEvent(aEventId);
+    searchTabContainer->redisplayEvent(aEventId);
+}
+
+
+void MainWindow::onSearchResultChanged() {
+    // Are results found on the current date?
+    QDate date = dayNavigator->curDate();
+    int count = searchTabContainer->searchResultCount(date);
+    if (count > 0) {searchTabContainer->redisplayDate(date); return;}
+
+    // Are results found in the future?
+    for (date = date.addDays(1); date <= dayNavigator->endDate(); date = date.addDays(1)) {
+        int count = searchTabContainer->searchResultCount(date);
+        if (count > 0) {dayNavigator->setCurDate(date); return;}
+    }
+
+    // Are results found in the past?
+    for (date = dayNavigator->startDate(); date < dayNavigator->curDate(); date = date.addDays(1)) {
+        int count = searchTabContainer->searchResultCount(date);
+        if (count > 0) {dayNavigator->setCurDate(date); return;}
+    }
+    // No results were found
+    searchTabContainer->redisplayDate(dayNavigator->curDate());
+}
+
+
 void MainWindow::useConference(int id)
 {
     if (id == -1)  // in case no conference is active
@@ -199,13 +267,7 @@ void MainWindow::initTabs()
         QDate endDate = active.end();
 
         // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
-        dayTabContainer->setDates(startDate, endDate);
-        tracksTabContainer->setDates(startDate, endDate);
-        roomsTabContainer->setDates(startDate, endDate);
-        favsTabContainer->setDates(startDate, endDate);
-        searchTabContainer->setDates(startDate, endDate);
-        searchTabContainer->searchAgainClicked();
-        nowTabContainer->updateTreeView(QDate::currentDate());
+        dayNavigator->setDates(startDate, endDate);
     }
 }
 
@@ -216,17 +278,16 @@ void MainWindow::clearTabs()
     roomsTabContainer->clearModel();
     favsTabContainer->clearModel();
     searchTabContainer->clearModel();
-    searchTabContainer->searchAgainClicked();
-    nowTabContainer->clearModel();
 }
 
 void MainWindow::unsetConference()
 {
     clearTabs();
+    dayNavigator->unsetDates();
     setWindowTitle(saved_title);
 }
 
-void MainWindow::setup()
+void MainWindow::on_settingsAction_triggered()
 {
     SettingsDialog dialog;
     dialog.loadDialogData();
@@ -252,7 +313,7 @@ this:
 this, mXmlParser and mNetworkAccessManager:
  addition and refresh.
 */
-void MainWindow::showConferences()
+void MainWindow::on_conferencesAction_triggered()
 {
     ConferenceEditor dialog(conferenceModel, this);
 
@@ -281,16 +342,23 @@ void MainWindow::showConferences()
     }
 }
 
-void MainWindow::networkQueryFinished(QNetworkReply *aReply)
-{
-    if ( aReply->error() != QNetworkReply::NoError )
-    {
+void MainWindow::networkQueryFinished(QNetworkReply *aReply) {
+    if (aReply->error() != QNetworkReply::NoError) {
         error_message(QString("Error occured during download: ") + aReply->errorString());
+    } else {
+        QUrl redirectUrl = aReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
+        if (!redirectUrl.isEmpty()) {
+            if (redirectUrl != aReply->request().url()) {
+                importFromNetwork(redirectUrl.toString());
+                return; // don't enable controls
+            } else {
+                error_message(QString("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
+            }
+        } else {
+            importData(aReply->readAll(), aReply->url().toEncoded());
+        }
     }
-    else
-    {
-        importData(aReply->readAll(), aReply->url().toEncoded());
-    }
+    setEnabled(true);
 }
 
 void MainWindow::importData(const QByteArray &aData, const QString& url)
index 2ce3b4f4ffca28533d27e6d0bb1c4c3b3f468697..fd9a0d100787f2b47428d75c87466e10fe281813 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -41,11 +41,18 @@ public:
 signals:
     void conferenceRemoved();
 private slots:
-    void aboutApp();
-    void eventHasChanged(int aEventId, bool aReloadModel);
-    void setup();
+    void on_conferencesAction_triggered();
+    void on_settingsAction_triggered();
+    void on_aboutAction_triggered();
+    void on_reloadAction_triggered();
+    void on_nowAction_triggered();
+    void on_searchAction_triggered();
+    void on_expandAllAction_triggered();
+    void on_collapseAllAction_triggered();
+
+    void onEventChanged(int aEventId, bool favouriteChanged);
+    void onSearchResultChanged();
     // TODO: remove
-    void showConferences();
     void networkQueryFinished(QNetworkReply*);
     void importFromNetwork(const QString&);
     void importFromFile(const QString&);
index 63b56a48ec74fcf6292130c23164dbc85a91def9..395850c3ce879841a70977e036127c53d8b1b407 100644 (file)
     <normaloff>:/confclerk.svg</normaloff>:/confclerk.svg</iconset>
   </property>
   <widget class="QWidget" name="centralwidget">
-   <layout class="QGridLayout" name="gridLayout">
-    <item row="0" column="0">
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="DayNavigatorWidget" name="dayNavigator" native="true">
+      <property name="minimumSize">
+       <size>
+        <width>20</width>
+        <height>0</height>
+       </size>
+      </property>
+     </widget>
+    </item>
+    <item>
      <widget class="QTabWidget" name="tabWidget">
       <property name="currentIndex">
-       <number>2</number>
+       <number>0</number>
+      </property>
+      <property name="elideMode">
+       <enum>Qt::ElideRight</enum>
       </property>
-      <widget class="QWidget" name="nowTab">
-       <attribute name="title">
-        <string>Now</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_7">
-        <item row="0" column="0">
-         <widget class="NowTabContainer" name="nowTabContainer" native="true"/>
-        </item>
-       </layout>
-      </widget>
       <widget class="QWidget" name="favouritesTab">
        <attribute name="title">
-        <string>Favourites</string>
+        <string>&amp;Favourites</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_3">
         <item row="0" column="0">
@@ -52,9 +55,9 @@
       </widget>
       <widget class="QWidget" name="dayViewTab">
        <attribute name="title">
-        <string>Day View</string>
+        <string>&amp;Days</string>
        </attribute>
-       <layout class="QGridLayout" name="gridLayout_2">
+       <layout class="QGridLayout" name="gridLayout">
         <item row="0" column="0">
          <widget class="DayViewTabContainer" name="dayTabContainer" native="true"/>
         </item>
@@ -62,7 +65,7 @@
       </widget>
       <widget class="QWidget" name="tracksTab">
        <attribute name="title">
-        <string>Tracks</string>
+        <string>&amp;Tracks</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_4">
         <item row="0" column="0">
@@ -72,7 +75,7 @@
       </widget>
       <widget class="QWidget" name="roomsTab">
        <attribute name="title">
-        <string>Rooms</string>
+        <string>&amp;Rooms</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_8">
         <item row="0" column="0">
@@ -82,7 +85,7 @@
       </widget>
       <widget class="QWidget" name="searchTab">
        <attribute name="title">
-        <string>Search</string>
+        <string>&amp;Search</string>
        </attribute>
        <layout class="QHBoxLayout" name="horizontalLayout_1">
         <item>
      <height>23</height>
     </rect>
    </property>
+   <property name="layoutDirection">
+    <enum>Qt::LeftToRight</enum>
+   </property>
    <addaction name="conferencesAction"/>
    <addaction name="settingsAction"/>
    <addaction name="aboutAction"/>
    <addaction name="quitAction"/>
   </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
+    <string>toolBar</string>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>RightToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="reloadAction"/>
+   <addaction name="nowAction"/>
+   <addaction name="searchAction"/>
+   <addaction name="expandAllAction"/>
+   <addaction name="collapseAllAction"/>
+  </widget>
   <action name="conferencesAction">
    <property name="text">
-    <string>Conferences</string>
+    <string>C&amp;onferences</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
    </property>
   </action>
   <action name="settingsAction">
    <property name="text">
-    <string>Settings</string>
+    <string>S&amp;ettings</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+E</string>
    </property>
   </action>
   <action name="aboutAction">
    <property name="text">
-    <string>About</string>
+    <string>&amp;About</string>
    </property>
   </action>
   <action name="quitAction">
    <property name="text">
     <string>&amp;Quit</string>
    </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="reloadAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/reload.png</normaloff>:/icons/reload.png</iconset>
+   </property>
+   <property name="text">
+    <string>Reload Conference</string>
+   </property>
+   <property name="toolTip">
+    <string>Reload Conference</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
+  </action>
+  <action name="nowAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/today.png</normaloff>:/icons/today.png</iconset>
+   </property>
+   <property name="text">
+    <string>Jump to now</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+N</string>
+   </property>
+  </action>
+  <action name="searchAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Search</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+F</string>
+   </property>
+  </action>
+  <action name="expandAllAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/expand.png</normaloff>:/icons/expand.png</iconset>
+   </property>
+   <property name="text">
+    <string>Expand all</string>
+   </property>
+  </action>
+  <action name="collapseAllAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/collapse.png</normaloff>:/icons/collapse.png</iconset>
+   </property>
+   <property name="text">
+    <string>Collapse all</string>
+   </property>
   </action>
  </widget>
  <customwidgets>
    <header>roomstabcontainer.h</header>
   </customwidget>
   <customwidget>
-   <class>NowTabContainer</class>
+   <class>DayNavigatorWidget</class>
    <extends>QWidget</extends>
-   <header>nowtabcontainer.h</header>
+   <header>daynavigatorwidget.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <resources>
-  <include location="../icons.qrc"/>
   <include location="../../data/data.qrc"/>
+  <include location="../icons.qrc"/>
  </resources>
  <connections>
   <connection>
diff --git a/src/gui/nowtabcontainer.cpp b/src/gui/nowtabcontainer.cpp
deleted file mode 100644 (file)
index f19c2a6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QTimer>
-#include "nowtabcontainer.h"
-
-NowTabContainer::NowTabContainer( QWidget *aParent ) : TabContainer( aParent )
-{
-    QTimer *timer = new QTimer( this );
-    connect( timer, SIGNAL(timeout()), SLOT(timerUpdateTreeView()) );
-    timer->start( 30000); // 30 seconds timer
-}
-
-void NowTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
-{
-    Q_UNUSED( aDate );
-
-    static_cast<EventModel*>(treeView->model())->loadNowEvents( aConferenceId );
-    dayNavigator->hide();
-}
-
-void NowTabContainer::timerUpdateTreeView()
-{
-    updateTreeView( QDate() );
-}
-
-void NowTabContainer::updateTreeView(const QDate &aDate)
-{
-    TabContainer::updateTreeView(aDate);
-    treeView->setAllExpanded(true);
-}
-
diff --git a/src/gui/nowtabcontainer.h b/src/gui/nowtabcontainer.h
deleted file mode 100644 (file)
index a5650e1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NOWTABCONTAINER_H_
-#define NOWTABCONTAINER_H_
-
-#include "tabcontainer.h"
-
-class NowTabContainer: public TabContainer
-{
-    Q_OBJECT
-public:
-    NowTabContainer( QWidget *aParent );
-    virtual ~NowTabContainer() { }
-
-protected:
-    virtual void loadEvents( const QDate &aDate, const int aConferenceId );
-
-public slots:
-    virtual void updateTreeView(const QDate &aDate);
-
-private slots:
-    void timerUpdateTreeView();
-};
-
-#endif /* NOWTABCONTAINER_H_ */
index 7bd5a59e743c7c1570dcd4881105e6bed3e1d341..9a53cfe69f91abba43ef6201053824edef862eee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 376a561a685035233beaf3a795369b1166a184a3..6e05d2eb5dbb8aa83fe04ae7e70800813c99639f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 6e73dcc10f2f4563822dfed6dfcefed5aa203dcc..6864c051a85a6adb8140167752e4ba9ba360ceef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 3a553b0f8c6780c26a7288b3ec0a51f9cc77e781..2f284dd3854bf4ae7e41c089c1524d9668345425 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 5d3d74fbcbceeefc3ebdbf0f99ac8651da481729..a90c6925d8bc0dc0ecb1435e9a228a7fc9dbf846 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>371</width>
-    <height>88</height>
+    <height>153</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -26,9 +26,6 @@
    <string>SearchHead</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="leftMargin">
-    <number>9</number>
-   </property>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout_7">
      <item>
        </property>
       </widget>
      </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="QCheckBox" name="searchTag">
        <property name="text">
     </spacer>
    </item>
   </layout>
+  <zorder>searchButton</zorder>
+  <zorder>searchEdit</zorder>
+  <zorder>searchTag</zorder>
+  <zorder>searchRoom</zorder>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources>
index fa5f22dda68120a2d63f7558ee78739057a2a129..23cbdf6d288776607c82c2eb0415c68fec6ddeac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -33,42 +33,31 @@ SearchTabContainer::SearchTabContainer(QWidget *aParent) : TabContainer( aParent
     sizePolicy.setHeightForWidth(header->sizePolicy().hasHeightForWidth());
     header->setSizePolicy(sizePolicy);
     header->setMinimumSize(QSize(10, 10));
-
     verticalLayout->insertWidget(0,header);
+    connect(header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
+    showSearchDialog();
+}
 
-    header->show();
-
-    searchAgainButton = new QToolButton(this);
-    searchAgainButton->setObjectName(QString::fromUtf8("button"));
-    QIcon icon;
-    icon.addPixmap(QPixmap(QString::fromUtf8(":/icons/search.png")), QIcon::Normal, QIcon::Off);
-    searchAgainButton->setIcon(icon);
-    QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Minimum);
-    sizePolicy1.setHorizontalStretch(0);
-    sizePolicy1.setVerticalStretch(0);
-    sizePolicy1.setHeightForWidth(searchAgainButton->sizePolicy().hasHeightForWidth());
-    searchAgainButton->setSizePolicy(sizePolicy1);
-
-    verticalLayout_2->insertWidget(0,searchAgainButton);
-
-    searchAgainButton->hide();
-    treeView->hide();
-    // do not show 'search' header if there are no conferences in the DB
-    if(Conference::getAll().count()==0)
-    {
-        header->hide();
-    }
 
-    connect( header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
-    connect( searchAgainButton, SIGNAL(clicked()), SLOT(searchAgainClicked()));
+bool SearchTabContainer::searchDialogIsVisible() const {
+    return header->isVisible();
 }
 
-SearchTabContainer::~SearchTabContainer()
-{
+
+int SearchTabContainer::searchResultCount(const QDate& date) const {
+    int confId = Conference::activeConference();
+    if (confId == -1) return 0;
+    return Event::getSearchResultByDate(date, confId, "start, duration").count();
 }
 
-void SearchTabContainer::searchButtonClicked()
-{
+
+void SearchTabContainer::showSearchDialog(bool show) {
+    header->setVisible(show);
+    treeView->setVisible(!show);
+}
+
+
+void SearchTabContainer::searchButtonClicked() {
     QHash<QString,QString> columns;
 
     SearchHead *searchHeader = static_cast<SearchHead*>(header);
@@ -87,65 +76,30 @@ void SearchTabContainer::searchButtonClicked()
 
     int confId = Conference::activeConference();
     if (confId == -1) return;
+    Conference conf = Conference::getById(confId);
 
     SqlEngine::searchEvent( confId, columns, keyword );
 
-    QDate startDate = Conference::getById(confId).start();
-    QDate endDate = Conference::getById(confId).end();
-
     int nrofFounds = 0;
-    QDate firstDateWithFounds = endDate;
-    QDate lastDateWithFounds = startDate;
-    for(QDate d=startDate; d<=endDate; d=d.addDays(1))
-    {
-        try{
-            int count = Event::getSearchResultByDate(d, confId, "start").count();
-            if(count && (firstDateWithFounds==endDate))
-                firstDateWithFounds=d;
-            if(count)
-                lastDateWithFounds=d;
-            nrofFounds+=count;
-        }
-        catch( OrmException &e  ){
-            qDebug() << "Event::getSearchResultByDate failed: " << e.text();
-        }
-        catch(...){
-            qDebug() << "Event::getSearchResultByDate failed";
-        }
-    }
+    for (QDate d = conf.start(); d <= conf.end(); d = d.addDays(1))
+        nrofFounds += Event::getSearchResultByDate(d, confId, "start, duration").count();
 
-    if(!nrofFounds)
-    {
-        // TODO: display some message
+    if (!nrofFounds) {
         treeView->hide();
-        searchAgainButton->hide();
-        dayNavigator->hide();
         header->show();
         QMessageBox::information(
                 this,
                 QString("Keyword '%1' not found!").arg(keyword),
                 QString("No events containing '%1' found!").arg(keyword),
                 QMessageBox::Ok);
-    }
-    else
-    {
-        searchAgainButton->show();
-        dayNavigator->show();
+    } else {
         treeView->show();
         header->hide();
 
-        updateTreeView( firstDateWithFounds );
-        dayNavigator->setDates(firstDateWithFounds, lastDateWithFounds);
+        emit searchResultChanged();
     }
 }
 
-void SearchTabContainer::searchAgainClicked()
-{
-    header->show();
-    searchAgainButton->hide();
-    dayNavigator->hide();
-    treeView->hide();
-}
 
 void SearchTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
 {
index 458005f62d603a16f059307cf3a6829e3f042903..6144073602ab0237979b2ef8789745a0a7fce07b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -21,7 +21,7 @@
 #ifndef SEARCHTAB_H_
 #define SEARCHTAB_H_
 
-#include <QWidget>
+#include <QtGui>
 
 #include "tabcontainer.h"
 #include "searchhead.h"
@@ -30,11 +30,19 @@ class SearchTabContainer: public TabContainer {
     Q_OBJECT
 public:
     SearchTabContainer(QWidget *aParent);
-    virtual ~SearchTabContainer();
+    virtual ~SearchTabContainer() {}
+    bool searchDialogIsVisible() const;
+    int searchResultCount(const QDate& date) const; ///< returns the number of events found on that specific date
+
 protected:
     virtual void loadEvents( const QDate &aDate, const int aConferenceId );
+
+signals:
+    void searchResultChanged();
+
 public slots:
-    void searchAgainClicked(); // made it public - to show header when 1.st conf importing is done successfuly
+    void showSearchDialog(bool show=true);
+
 private slots:
     void searchButtonClicked();
 
index 82ba0d0bb5216f72b892b5a9115fa54ed449701c..1d57797af661337bf9424f828587e516e24b2f63 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 4e4ba9db2a5ba437a1532f98206481a667c6d51e..59dcf0c076af83fbe059a9de96dc5774ce4ecbf3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index c17eff2622f9396314a74a5922c982dbca7e34ec..522860e668e50ad9cfff51f4501c2118e685a788 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -44,20 +44,14 @@ TabContainer::TabContainer(QWidget *aParent)
     treeView->setModel(new EventModel());
     treeView->setItemDelegate(new Delegate(treeView));
 
-    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &)));
-
-    connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
+    connect(treeView, SIGNAL(eventChanged(int,bool)), SIGNAL(eventChanged(int,bool)));
     connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
-
-    // day navigator is hidden by default
-    dayNavigator->hide();
 }
 
 void TabContainer::updateTreeView(const QDate &aDate)
 {
     int active_id = Conference::activeConference();
-    dayNavigator->show();
     if (active_id > 0) {
         loadEvents(aDate, active_id);
     } else {
@@ -75,47 +69,34 @@ void TabContainer::itemClicked(const QModelIndex &aIndex)
 #ifdef N810
     dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
 #endif
-    connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
     dialog.exec();
-    disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
 }
 
 void TabContainer::displayConflicts(const QModelIndex &aIndex)
 {
-    ConflictsDialog dialog(static_cast<Event*>(aIndex.internalPointer())->id(),this);
+    Event* event = static_cast<Event*>(aIndex.internalPointer());
+    ConflictsDialog dialog(event->id(), event->conferenceId(), this);
 #ifdef N810
     dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
 #endif
-    connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
     dialog.exec();
-    disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
 }
 
-void TabContainer::updateTreeViewModel(int aEventId, bool aReloadModel)
-{
-    if(aReloadModel)
-    {
-        // requires special handling
-        // eg. in case of favourites - some favourites may have changed
-        // and so we need to reload them
-        int confId = Conference::activeConference();
-        QDate startDate = Conference::getById(confId).start();
-        QDate endDate = Conference::getById(confId).end();
-        dayNavigator->setDates(startDate, endDate);
-        updateTreeView(dayNavigator->curDate());
-    }
-    else
-    {
-        // just update event in the question
-        static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
-    }
+
+void TabContainer::redisplayEvent(int aEventId) {
+    static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
 }
 
-void TabContainer::setDates(const QDate &aStart, const QDate &aEnd)
-{
-    dayNavigator->setDates(aStart, aEnd);
+
+void TabContainer::redisplayDate(const QDate& curDate) {
+    updateTreeView(curDate);
 }
 
+
 void TabContainer::clearModel()
 {
     static_cast<EventModel*>(treeView->model())->clearModel();
index 572b9957a273c0921a2aa7e80f3273f018f8e1d2..fe03b5436ec895ec537f743a322776ca7122de73 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -41,11 +41,11 @@ protected:
     virtual void loadEvents( const QDate &aDate, const int aConferenceId ) = 0;
 
 signals:
-    void eventHasChanged(int aEventId, bool aReloadModel);
+    void eventChanged(int aEventId, bool aReloadModel);
 
 public slots:
-    virtual void updateTreeViewModel(int aEventId, bool aReloadModel = false);
-    void setDates(const QDate &aStart, const QDate &aEnd);
+    virtual void redisplayEvent(int aEventId);
+    void redisplayDate(const QDate& curDate);
 
 protected slots:
     virtual void updateTreeView(const QDate &aDate);
index 56e6e1069ba7c0865dd9f189764593c67d8a24bc..77b120564d5b9855c9fec379f57210220198d58c 100644 (file)
@@ -23,7 +23,7 @@
    <property name="margin">
     <number>0</number>
    </property>
-   <item row="0" column="2">
+   <item row="0" column="1">
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
       <widget class="TreeView" name="treeView">
      </item>
     </layout>
    </item>
-   <item row="0" column="1">
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <item>
-      <widget class="DayNavigatorWidget" name="dayNavigator" native="true">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>10</width>
-         <height>10</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
   </layout>
  </widget>
  <customwidgets>
-  <customwidget>
-   <class>DayNavigatorWidget</class>
-   <extends>QWidget</extends>
-   <header>daynavigatorwidget.h</header>
-   <container>1</container>
-  </customwidget>
   <customwidget>
    <class>TreeView</class>
    <extends>QTreeView</extends>
    <header>../mvc/treeview.h</header>
   </customwidget>
  </customwidgets>
- <resources>
-  <include location="../icons.qrc"/>
- </resources>
+ <resources/>
  <connections/>
 </ui>
index 26e7b67ef9018a0e8679a046f3ae110b2d2a2fbf..52d3cab2c04c4a67643b3f4688cfbb1bfd4233f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 80eca6985ae76f0fadc8ba20a019502eda41fd35..abaab097144e6229d97bf4271916fcaf178e6fe2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 7e11109a5e87ec31ff0079608c6ebe273f4ce21d..b7cc5fc5d1f9e843a8aaea9292588dd3ada3febc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index fed036cc0f48b192e42447d4c053372e0069c92f..14e71f25dfae1715858e8f6d78d2d0a724a680a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 193c23f36379a2eacd2158a12037d3acbff17b1f..60b563453fc53d8d9f8bd66434601cb6a198ed1c 100644 (file)
@@ -1,14 +1,16 @@
 <RCC>
-  <qresource prefix="/">
-    <file>icons/add.png</file>
-    <file>icons/remove.png</file>
-    <file>icons/reload.png</file>
-    <file>icons/appointment-soon-off.png</file>
-    <file>icons/appointment-soon.png</file>
-    <file>icons/emblem-new-off.png</file>
-    <file>icons/emblem-new.png</file>
-    <file>icons/dialog-warning.png</file>
-    <file>icons/search.png</file>
-    <file>icons/today.png</file>
-  </qresource>
+    <qresource prefix="/">
+        <file>icons/add.png</file>
+        <file>icons/remove.png</file>
+        <file>icons/expand.png</file>
+        <file>icons/collapse.png</file>
+        <file>icons/reload.png</file>
+        <file>icons/dialog-warning.png</file>
+        <file>icons/search.png</file>
+        <file>icons/today.png</file>
+        <file>icons/favourite-off.png</file>
+        <file>icons/favourite-on.png</file>
+        <file>icons/alarm-on.png</file>
+        <file>icons/alarm-off.png</file>
+    </qresource>
 </RCC>
diff --git a/src/icons/alarm-off.png b/src/icons/alarm-off.png
new file mode 100644 (file)
index 0000000..34be22d
Binary files /dev/null and b/src/icons/alarm-off.png differ
diff --git a/src/icons/alarm-on.png b/src/icons/alarm-on.png
new file mode 100644 (file)
index 0000000..2eb9a9f
Binary files /dev/null and b/src/icons/alarm-on.png differ
diff --git a/src/icons/alarm.blend b/src/icons/alarm.blend
new file mode 100644 (file)
index 0000000..19b1c74
Binary files /dev/null and b/src/icons/alarm.blend differ
diff --git a/src/icons/appointment-soon-off.png b/src/icons/appointment-soon-off.png
deleted file mode 100644 (file)
index 2803c25..0000000
Binary files a/src/icons/appointment-soon-off.png and /dev/null differ
diff --git a/src/icons/appointment-soon.png b/src/icons/appointment-soon.png
deleted file mode 100644 (file)
index c065baf..0000000
Binary files a/src/icons/appointment-soon.png and /dev/null differ
diff --git a/src/icons/collapse.png b/src/icons/collapse.png
new file mode 100644 (file)
index 0000000..36fe1e1
Binary files /dev/null and b/src/icons/collapse.png differ
diff --git a/src/icons/collapse.svg b/src/icons/collapse.svg
new file mode 100644 (file)
index 0000000..f6551da
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32px"
+   height="32px"
+   id="svg2985"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="collapse.svg"
+   inkscape:export-filename="/home/philipp/projekte/confclerk/src/icons/collapse.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs2987">
+    <linearGradient
+       id="linearGradient2997">
+      <stop
+         style="stop-color:#a5a5a5;stop-opacity:1;"
+         offset="0"
+         id="stop2999" />
+      <stop
+         style="stop-color:#f4f4f4;stop-opacity:1;"
+         offset="1"
+         id="stop3001" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2997"
+       id="linearGradient3305"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,1)"
+       x1="10"
+       y1="5"
+       x2="10"
+       y2="1" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="20.481335"
+     inkscape:cy="16.180935"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1678"
+     inkscape:window-height="1029"
+     inkscape:window-x="0"
+     inkscape:window-y="19"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2993"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata2990">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="color:#000000;fill:#800000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 23,6 4,-5 4,5 -3,0 0,25 -2,0 0,-25 z"
+       id="rect3062"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccc" />
+    <g
+       id="g3356">
+      <rect
+         y="2"
+         x="1"
+         height="4"
+         width="21"
+         id="rect2995"
+         style="color:#000000;fill:url(#linearGradient3305);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <rect
+         y="1"
+         x="1"
+         height="1"
+         width="21"
+         id="rect3032"
+         style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <g
+         id="g3351">
+        <rect
+           y="3"
+           x="2"
+           height="2"
+           width="4"
+           id="rect3038"
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <rect
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3040"
+           width="1"
+           height="2"
+           x="7"
+           y="3" />
+        <rect
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3213"
+           width="4"
+           height="2"
+           x="9"
+           y="3" />
+      </g>
+    </g>
+    <use
+       x="0"
+       y="0"
+       xlink:href="#g3356"
+       id="use3364"
+       transform="translate(0,5)"
+       width="32"
+       height="32" />
+    <use
+       height="32"
+       width="32"
+       transform="translate(0,10)"
+       id="use3366"
+       xlink:href="#g3356"
+       y="0"
+       x="0" />
+    <path
+       style="color:#000000;fill:#800000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 20,4 1,0 0,-1 -1,0 z"
+       id="path3452"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/src/icons/emblem-new-off.png b/src/icons/emblem-new-off.png
deleted file mode 100644 (file)
index 5222918..0000000
Binary files a/src/icons/emblem-new-off.png and /dev/null differ
diff --git a/src/icons/emblem-new.blend b/src/icons/emblem-new.blend
deleted file mode 100644 (file)
index 2f76166..0000000
Binary files a/src/icons/emblem-new.blend and /dev/null differ
diff --git a/src/icons/emblem-new.png b/src/icons/emblem-new.png
deleted file mode 100644 (file)
index 2d8c233..0000000
Binary files a/src/icons/emblem-new.png and /dev/null differ
diff --git a/src/icons/expand.png b/src/icons/expand.png
new file mode 100644 (file)
index 0000000..81220b4
Binary files /dev/null and b/src/icons/expand.png differ
diff --git a/src/icons/expand.svg b/src/icons/expand.svg
new file mode 100644 (file)
index 0000000..2a8c2df
--- /dev/null
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32px"
+   height="32px"
+   id="svg2985"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="expand.svg"
+   inkscape:export-filename="/home/philipp/projekte/confclerk/src/icons/expand.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs2987">
+    <linearGradient
+       id="linearGradient2997">
+      <stop
+         style="stop-color:#a5a5a5;stop-opacity:1;"
+         offset="0"
+         id="stop2999" />
+      <stop
+         style="stop-color:#f4f4f4;stop-opacity:1;"
+         offset="1"
+         id="stop3001" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2997-3"
+       id="linearGradient3305"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,1)"
+       x1="10"
+       y1="5"
+       x2="10"
+       y2="1" />
+    <linearGradient
+       id="linearGradient2997-3">
+      <stop
+         style="stop-color:#a5a5a5;stop-opacity:1;"
+         offset="0"
+         id="stop2999-2" />
+      <stop
+         style="stop-color:#f4f4f4;stop-opacity:1;"
+         offset="1"
+         id="stop3001-8" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="13.140149"
+     inkscape:cy="18.335311"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1678"
+     inkscape:window-height="1029"
+     inkscape:window-x="0"
+     inkscape:window-y="19"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2993"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata2990">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       y="7"
+       x="2"
+       height="1"
+       width="5"
+       id="rect3038"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3040"
+       width="3"
+       height="1"
+       x="15"
+       y="7" />
+    <rect
+       y="7"
+       x="8"
+       height="1"
+       width="3"
+       id="rect3042"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3044"
+       width="7"
+       height="1"
+       x="2"
+       y="19" />
+    <rect
+       y="19"
+       x="10"
+       height="1"
+       width="2"
+       id="rect3046"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       y="21"
+       x="2"
+       height="1"
+       width="1"
+       id="rect3050"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3052"
+       width="2"
+       height="1"
+       x="17"
+       y="21" />
+    <rect
+       y="21"
+       x="13"
+       height="1"
+       width="3"
+       id="rect3054"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       y="7"
+       x="12"
+       height="1"
+       width="2"
+       id="rect3056"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3058"
+       width="3"
+       height="1"
+       x="4"
+       y="21" />
+    <rect
+       y="21"
+       x="8"
+       height="1"
+       width="4"
+       id="rect3060"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <path
+       style="color:#000000;fill:#800000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 23,26 4,5 4,-5 -3,0 0,-25 -2,0 0,25 z"
+       id="rect3062"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccc" />
+    <g
+       id="g3356">
+      <rect
+         y="2"
+         x="1"
+         height="4"
+         width="21"
+         id="rect2995"
+         style="color:#000000;fill:url(#linearGradient3305);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <rect
+         y="1"
+         x="1"
+         height="1"
+         width="21"
+         id="rect3032"
+         style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <g
+         id="g3351">
+        <rect
+           y="3"
+           x="2"
+           height="2"
+           width="4"
+           id="rect3038-2"
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+        <rect
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3040-2"
+           width="1"
+           height="2"
+           x="7"
+           y="3" />
+        <rect
+           style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3213"
+           width="4"
+           height="2"
+           x="9"
+           y="3" />
+      </g>
+    </g>
+    <use
+       x="0"
+       y="0"
+       xlink:href="#g3356"
+       id="use3428"
+       transform="translate(0,12)"
+       width="32"
+       height="32" />
+    <use
+       height="32"
+       width="32"
+       transform="translate(0,24)"
+       id="use3430"
+       xlink:href="#g3356"
+       y="0"
+       x="0" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3436"
+       width="7"
+       height="1"
+       x="2"
+       y="9" />
+    <rect
+       y="23"
+       x="2"
+       height="1"
+       width="4"
+       id="rect3438"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3440"
+       width="6"
+       height="1"
+       x="7"
+       y="23" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3442"
+       width="5"
+       height="1"
+       x="2"
+       y="11" />
+    <rect
+       y="11"
+       x="8"
+       height="1"
+       width="2"
+       id="rect3444"
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect3448"
+       width="2"
+       height="1"
+       x="11"
+       y="11" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path3450"
+       d="m 20,10 1,0 0,-1 -1,0 z"
+       style="color:#000000;fill:#800000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <path
+       style="color:#000000;fill:#800000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 20,4 1,0 0,-1 -1,0 z"
+       id="path3452"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/src/icons/favourite-off.png b/src/icons/favourite-off.png
new file mode 100644 (file)
index 0000000..62ec510
Binary files /dev/null and b/src/icons/favourite-off.png differ
diff --git a/src/icons/favourite-on.png b/src/icons/favourite-on.png
new file mode 100644 (file)
index 0000000..fed3ffc
Binary files /dev/null and b/src/icons/favourite-on.png differ
diff --git a/src/icons/favourite.blend b/src/icons/favourite.blend
new file mode 100644 (file)
index 0000000..0907b3c
Binary files /dev/null and b/src/icons/favourite.blend differ
index 1fd60d653333f440b02437689695fe5344ab382d..b53255e0a59c3585f69ff2147cabc2b9fb3638e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index c9ae184e406f1d85d6e681d0ad7bf53fea2551e4..adf8ff9bcf894f2e3a41c4a35887bcbf39e8362b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 94880c83b2516e71260b6de21e38f3feaa566ba1..16d76a567bbdb6f13ed398afc88212a07ae31e2d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 8128521ba3311266e4738c4b1c0948387b51292a..cd1c4fdd55227140e5be503e70d2ccb81123ea70 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 1b7dcb606f11cbd78c81918941d5f63c6387c9e9..7e4724c274240badae9945c6f2ae6437ab571846 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -163,6 +163,9 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
     else // doesn't have parent - time-groups' elements (top items)
     {
         int numFav = numberOfFavourities(index);
+#ifdef MAEMO
+        int numAlarm = numberOfAlarms(index);
+#endif
 
         QStyleOptionButton styleOptionButton;
         styleOptionButton.rect = option.rect;
@@ -198,9 +201,10 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
                 QString::number(numFav));
 #ifdef MAEMO
         drawPoint.setX(drawPoint.x() - spacer - image->width());
-        painter->drawImage(drawPoint,*mControls[AlarmControlOn]->image());
+        image = mControls[numAlarm ? AlarmControlOn : AlarmControlOff]->image();
+        painter->drawImage(drawPoint,*image);
         painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
-                QString::number(numberOfAlarms(index)));
+                QString::number(numAlarm));
 #endif
         // draw texts
         QString numEvents = QString::number(index.model()->rowCount(index)).append("/");
@@ -305,18 +309,18 @@ void Delegate::defineControls()
 {
     // FAVOURITE ICONs
     // on
-    mControls.insert(FavouriteControlOn, new Control(FavouriteControlOn, QString(":icons/emblem-new.png"), NULL));
+    mControls.insert(FavouriteControlOn, new Control(FavouriteControlOn, QString(":icons/favourite-on.png"), NULL));
     // off
-    mControls.insert(FavouriteControlOff, new Control(FavouriteControlOff, QString(":icons/emblem-new-off.png"), NULL));
+    mControls.insert(FavouriteControlOff, new Control(FavouriteControlOff, QString(":icons/favourite-off.png"), NULL));
 
 #ifdef MAEMO
     // ALARM ICONs
     // on
     mControls.insert(AlarmControlOn,
-                    new Control(AlarmControlOn, QString(":icons/appointment-soon.png"), mControls[FavouriteControlOn]));
+                    new Control(AlarmControlOn, QString(":icons/alarm-on.png"), mControls[FavouriteControlOn]));
     // off
     mControls.insert(AlarmControlOff,
-                    new Control(AlarmControlOff, QString(":icons/appointment-soon-off.png"), mControls[FavouriteControlOff]));
+                    new Control(AlarmControlOff, QString(":icons/alarm-off.png"), mControls[FavouriteControlOff]));
     // WARNING ICON
     mControls.insert(WarningControl,
                     new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[AlarmControlOff]));
index 3f6e8f678786d8ca214edb4f7aa28874f4da094e..0859b563fd3c828b3cf2b8d8eb98d757e5058940 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 76a3443c7e969f9ddc695200adf35867c6eea3ec..58c217ad5597e82f47b2c00262cd6c7d6ad3fa55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -43,8 +43,7 @@ Event::Event() :
 {
 }
 
-Event Event::getById(int id, int conferenceId)
-{
+Event Event::getById(int id, int conferenceId) {
     QSqlQuery query;
     query.prepare(selectQuery() + "WHERE id = :id AND xid_conference = :conf");
     query.bindValue(":id", id);
@@ -52,14 +51,13 @@ Event Event::getById(int id, int conferenceId)
     return loadOne(query);
 }
 
-QList<Event> Event::getByDate(const QDate& date, int conferenceId, QString orderBy)
-{
+
+QList<Event> Event::getByDate(const QDate& date, int conferenceId, QString orderBy) {
     QSqlQuery query;
     query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start >= :start AND start < :end ORDER BY %1").arg(orderBy));
     query.bindValue(":conf", conferenceId);
     query.bindValue(":start", convertToDb(date, QVariant::DateTime));
     query.bindValue(":end", convertToDb(date.addDays(1), QVariant::DateTime));
-
     return load(query);
 }
 
@@ -68,7 +66,7 @@ QList<Event> Event::getByDateAndRoom(const QDate& date, int conferenceId)
     QSqlQuery query;
     QString aliasEvent("E");
     QString aliasEventRoom("R");
-    query.prepare(QString("SELECT %1 FROM %2 %3, %4 %5 WHERE %3.xid_conference = :conf AND %3.start >= :start AND %3.start < :end AND %3.id = R.xid_event ORDER BY %5.xid_room, %3.start").arg(
+    query.prepare(QString("SELECT %1 FROM %2 %3, %4 %5 WHERE %3.xid_conference = :conf AND %3.start >= :start AND %3.start < :end AND %3.id = R.xid_event ORDER BY %5.xid_room, %3.start, %3.duration").arg(
                     columnsForSelect(aliasEvent), Event::sTableName, aliasEvent, "EVENT_ROOM", aliasEventRoom));
     query.bindValue(":conf", conferenceId);
     query.bindValue(":start", convertToDb(date, QVariant::DateTime));
@@ -77,28 +75,14 @@ QList<Event> Event::getByDateAndRoom(const QDate& date, int conferenceId)
     return load(query);
 }
 
-QList<Event> Event::nowEvents(int conferenceId, QString orderBy)
-{
-    uint curTime_t =  QDateTime(QDate::currentDate(),QTime::currentTime(),Qt::UTC).toTime_t();
-    //uint curTime_t = 1265457610; // for testing
 
-    QSqlQuery query;
-    query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start <= :now1 AND ( start + duration ) > :now2 ORDER BY %1").arg(orderBy));
-    query.bindValue(":conf", conferenceId);
-    query.bindValue(":now1", convertToDb(curTime_t, QVariant::DateTime));
-    query.bindValue(":now2", convertToDb(curTime_t, QVariant::DateTime));
-
-    return load(query);
-}
-
-QList<Event> Event::conflictEvents(int aEventId, int conferenceId)
-{
+QList<Event> Event::conflictEvents(int aEventId, int conferenceId) {
     QSqlQuery query;
     Event event = Event::getById(aEventId,conferenceId);
     query.prepare(selectQuery() + "WHERE xid_conference = :conf AND ( \
            ( start >= :s1 AND ( start + duration ) < :e1 ) \
         OR ( ( start + duration ) > :s2 AND start < :e2 ) ) \
-        AND favourite = 1 AND NOT id = :id ORDER BY start");
+        AND favourite = 1 AND NOT id = :id ORDER BY start, duration");
     query.bindValue(":conf", event.conferenceId());
     query.bindValue(":s1", convertToDb(event.start(), QVariant::DateTime));
     query.bindValue(":e1", convertToDb(event.start().toTime_t()+event.duration(), QVariant::DateTime));
@@ -109,10 +93,11 @@ QList<Event> Event::conflictEvents(int aEventId, int conferenceId)
     return load(query);
 }
 
+
 QList<Event> Event::getFavByDate(const QDate& date, int conferenceId)
 {
     QSqlQuery query;
-    query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start >= :start AND start < :end AND favourite = 1 ORDER BY start"));
+    query.prepare(selectQuery() + QString("WHERE xid_conference = :conf AND start >= :start AND start < :end AND favourite = 1 ORDER BY start, duration"));
     query.bindValue(":conf", conferenceId);
     query.bindValue(":start", convertToDb(date, QVariant::DateTime));
     query.bindValue(":end", convertToDb(date.addDays(1), QVariant::DateTime));
index 8b63a29227e503d2741571594ed1c22334c75903..3dc6b8fd71aef4c6820c135b172a99f0424b282f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -46,7 +46,6 @@ public:
     static QList<Event> getByDate(const QDate & date, int conferenceId, QString orderBy);
     static QList<Event> getFavByDate(const QDate & date, int conferenceId); // get Favourities by Date
     static QList<Event> getSearchResultByDate(const QDate& date, int conferenceId, QString orderBy);
-    static QList<Event> nowEvents(int conferenceId, QString orderBy); // get events scheduled NOW
     static QList<Event> getByTrack(int id);
     static QList<Event> getByDateAndRoom(const QDate& date, int conferenceId);
     static QList<Event> conflictEvents(int aEventId, int conferenceId);
@@ -54,6 +53,7 @@ public:
     int id() const { return value("id").toInt(); }
     int conferenceId() const { return value("xid_conference").toInt(); }
     QDateTime start() const { return value("start").toDateTime(); }
+    /// duration of the event in seconds
     int duration() const { return value("duration").toInt(); }
     int trackId() const { return value("xid_track").toInt(); }
     QString type() const { return value("type").toString(); }
index 280868f9374bfa75a3b2d3c0f6ac360186386197..79b36710ca5c8f2688b5b420bd6bba0734493a30 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -48,25 +48,25 @@ void EventModel::createTimeGroups()
     mParents.clear();
     if (mEvents.empty()) return;
 
-    const int minTimeSpan = 3600; // one hour
-    const int minChildCount = 3; // minimum number of events in one group
+    const int minTimeSpan = 3600; // one hour // minimum duration of a group in seconds
+    const int minChildCount = 3;  // minimum number of events in one group
 
-    // Create the first time group. The events have to be sorted by start time at this point!
-    QTime groupStartTime(mEvents.first().start().time().hour(), 0);
-    QTime groupEndTime = groupStartTime.addSecs(mEvents.first().duration());
+    QDateTime groupStartDateTime(mEvents.first().start().date(), QTime(mEvents.first().start().time().hour(), 0), mEvents.first().start().timeSpec());
+    QDateTime groupEndDateTime = groupStartDateTime.addSecs(mEvents.first().duration());
     mGroups << EventModel::Group("", 0);
     int timeSpan = minTimeSpan;
 
     for (int i = 0; i != mEvents.count(); ++i) {
-        QTime eventStartTime = mEvents.at(i).start().time();
-        QTime eventEndTime = eventStartTime.addSecs(mEvents.at(i).duration());
+        QDateTime eventStartDateTime = mEvents.at(i).start();
+        QDateTime eventEndDateTime = eventStartDateTime.addSecs(mEvents.at(i).duration());
 
-        if (eventStartTime >= groupStartTime.addSecs(timeSpan)) {
+        if (eventStartDateTime >= groupStartDateTime.addSecs(timeSpan)) {
             // a new group could be necessary
             if (mGroups.last().mChildCount < minChildCount) {
                 // too few events in the group => no new group
                 // except a gap in time would occur that is longer than minTimeSpan
-                if (i > 0 && qMax(mEvents.at(i-1).start().time().addSecs(mEvents.at(i-1).duration()), groupEndTime).secsTo(eventStartTime) < minTimeSpan) {
+                QDateTime prevEventStartDateTime = mEvents.at(i).start();
+                if (i > 0 && qMax(prevEventStartDateTime.addSecs(mEvents.at(i-1).duration()), groupEndDateTime).secsTo(eventStartDateTime) < minTimeSpan) {
                     timeSpan += minTimeSpan;
                     --i;
                     continue; // repeat with the same event
@@ -75,8 +75,8 @@ void EventModel::createTimeGroups()
 
             // a new group is necessary
             mGroups.last().setTitle(mEvents);
-            groupStartTime = groupStartTime.addSecs(timeSpan);
-            groupEndTime = groupStartTime.addSecs(mEvents.at(i).duration());
+            groupStartDateTime = groupStartDateTime.addSecs(timeSpan);
+            groupEndDateTime = groupStartDateTime.addSecs(mEvents.at(i).duration());
             mGroups << EventModel::Group("", i);
             timeSpan = minTimeSpan;
         }
@@ -84,7 +84,7 @@ void EventModel::createTimeGroups()
         // insert event into current group
         mParents[mEvents.at(i).id()] = mGroups.count() - 1;
         mGroups.last().mChildCount += 1;
-        groupEndTime = qMax(eventEndTime, groupEndTime);
+        groupEndDateTime = qMax(eventEndDateTime, groupEndDateTime);
     }
 
     // the last group needs a title as well
@@ -241,7 +241,7 @@ void EventModel::loadEvents(const QDate &aDate, int aConferenceId)
     // check for existence of the conference in the DB
     if(Conference::getAll().count())
     {
-        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start");
+        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start, duration");
     }
     createTimeGroups();
 }
@@ -264,7 +264,7 @@ int EventModel::loadSearchResultEvents(const QDate &aDate, int aConferenceId)
     if(Conference::getAll().count())
     {
         try{
-            mEvents = Event::getSearchResultByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start");
+            mEvents = Event::getSearchResultByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start, duration");
         }
         catch( OrmException &e  ){
             qDebug() << "Event::getSearchResultByDate failed: " << e.text();
@@ -285,7 +285,7 @@ void EventModel::loadEventsByTrack(const QDate &aDate, int aConferenceId)
     clearModel();
     if (Conference::getAll().count())
     {
-        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "xid_track, start");
+        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "xid_track, start, duration");
     }
     createTrackGroups();
 }
@@ -300,19 +300,8 @@ void EventModel::loadEventsByRoom(const QDate &aDate, int aConferenceId)
     createRoomGroups();
 }
 
-void EventModel::loadNowEvents(int aConferenceId)
-{
-    clearModel();
-    // check for existence of the conference in the DB
-    if(Conference::getAll().count())
-    {
-        mEvents = Event::nowEvents(aConferenceId, "start");
-    }
-    createTimeGroups();
-}
 
-void EventModel::loadConflictEvents(int aEventId, int aConferenceId)
-{
+void EventModel::loadConflictEvents(int aEventId, int aConferenceId) {
     clearModel();
     // check for existence of the conference in the DB
     if(Conference::getAll().count())
index 49d5dc7de01506b1bd97b08c8f6380ab3deae9c7..039b8779e7df52566568b66e418a6cb4b1e5e4bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -39,7 +39,6 @@ public:
     void loadFavEvents(const QDate &aDate, int aConferenceId); // loads Favourite events from the DB
     void loadEventsByTrack(const QDate &aDate, int aConferenceId); // loads Events sorted by Track id and Event start from the DB
     int loadSearchResultEvents(const QDate &aDate, int aConferenceId);
-    void loadNowEvents(int aConferenceId); // loads Now events from the DB
     void loadEventsByRoom(const QDate &aDate, int aConferenceId);
     void loadConflictEvents(int aEventId, int aConferenceId); // loads events in conflict
     void clearModel();
index b0a455e3c1f366b3dffd75278bfd066501052b3f..1b2c203496f4b8f9bf9d4ca1432243cc9233de61 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 93c132f2a14e7d45d6d773733e65e9145487d97a..542a722b3f498618a163a8b5c9814122e6d9e5dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 6dddaee61b39577c76ea07346971cfd0819dbc2a..bb0bf3969a785e8557c2873ee7b155ae681ba61a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 260a1660df5a475a1bc90cfb63285cf2d32f3411..d654cc5f8deef50cd4a4fc32b49741971aacf4ed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 6f514e91c848fc5a37164bfc0daa38a2a8295c4d..6b427e184234527132514cb108ff436813cc26bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -26,7 +26,7 @@
 #include "eventmodel.h"
 
 #ifdef MAEMO
-#include <alarm.h>
+#include "alarm.h"
 #endif
 
 #include <QDebug>
@@ -79,13 +79,13 @@ bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP
                     conflicts = Event::conflictEvents(event.id(),Conference::activeConference());
                 }
 
-                // have to emit 'eventHasChanged' signal on all events in conflict
+                // have to emit 'eventChanged' signal on all events in conflict
                 for(int i=0; i<conflicts.count(); i++)
-                    emit(eventHasChanged(conflicts[i].id()));
+                    emit eventChanged(conflicts[i].id(), false);
 
                 // since the Favourite icon has changed, update TreeViews accordingly
                 // all TreeViews have to listen on this signal
-                emit(eventHasChanged(event.id(),true));
+                emit eventChanged(event.id(), true);
 
                 handled = true;
             }
@@ -101,8 +101,7 @@ bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP
 #ifdef MAEMO
                     // remove alarm from the 'alarmd' alrms list
                     Alarm alarm;
-                    alarm.deleteAlarm(event.id());
-                    // TODO: test if removing was successfull
+                    alarm.deleteAlarm(event.conferenceId(), event.id());
 #endif /* MAEMO */
                 }
                 else
@@ -111,14 +110,13 @@ bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP
 #ifdef MAEMO
                     // add alarm to the 'alarmd'
                     Alarm alarm;
-                    //int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10)); // testing
-                    int cookie = alarm.addAlarm(event.id(),event.title(),event.start().addSecs(-15*60)); // 15 minutes before real start
+                    alarm.addAlarm(event.conferenceId(), event.id(), event.title(),event.start().addSecs(PRE_EVENT_ALARM_SEC));
 #endif /* MAEMO */
                 }
                 event.update("alarm");
                 // since the Alarm icon has changed, update TreeView accordingly
                 // all TreeViews have to listen on this signal
-                emit(eventHasChanged(event.id()));
+                emit eventChanged(event.id(), false);
                 handled = true;
             }
             break;
index 888b6f75b9d0d44db4fff138893907231135856d..fde2728f9cd266b0d113a1f299faf326631ef7e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -37,7 +37,7 @@ private slots:
     void handleItemClicked(const QModelIndex &index);
 signals:
     void requestForConflicts(const QModelIndex &aIndex);
-    void eventHasChanged(int aEventId, bool aReloadModel = false); // emited when user changes some event details, eg. sets it Favourite
+    void eventChanged(int aEventId, bool favouriteChanged); // emited when user changes some event details, eg. sets it Favourite
 };
 
 #endif /* TREEVIEW_H */
index 85d32c29fc10cd00c26f2f074a2abb4ef02cefca..e5e6cfa1488f2c9c76b0ce15aafeafa7b9368da2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -215,7 +215,9 @@ QVariant OrmRecord<T>::convertToDb(QVariant value, QVariant::Type colType)
 {
     if (colType == QVariant::DateTime && value.canConvert<QDateTime>())
     {
-        return value.toDateTime().toTime_t();
+        QDateTime dateTime = value.toDateTime();
+        dateTime.setTimeSpec(Qt::UTC); // this is to avoid that dateTime.toTime_t changes the time depending on the local time zone
+        return dateTime.toTime_t();
     }
 
     return value;
index cd515c667cb135475153da5591554bfe821cfcd2..6e361abbe57b70adb24c74febcdd7290fbad9874 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -36,8 +36,10 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
 {
     QDomDocument document;
     QString xml_error;
-    if (!document.setContent (aData, false, &xml_error)) {
-        error_message("Could not parse schedule: " + xml_error);
+    int xml_error_line;
+    int xml_error_column;
+    if (!document.setContent (aData, false, &xml_error, &xml_error_line, &xml_error_column)) {
+        error_message("Could not parse schedule: " + xml_error + " at line " + QString("%1").arg(xml_error_line) + " column " + QString("%1").arg(xml_error_column));
         return;
     }
 
index e8d9941bb8ec0caa596cc2cd0c684ac35e5cbe02..cf3f0010ed8fdf39e049f9dbcc6eecb5649aed80 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 205ecd080138cee58e4b1924b35ded09c81c5628..4212e02b8904c5891915916922dba4b1b399b1dd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -319,12 +319,12 @@ int SqlEngine::searchEvent(int aConferenceId, const QHash<QString,QString> &aCol
     QString sql = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id ) "
                 "SELECT DISTINCT EVENT.xid_conference, EVENT.id FROM EVENT ");
     if( aColumns.contains("ROOM") ){
-        sql += "INNER JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
-        sql += "INNER JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
+        sql += "LEFT JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
+        sql += "LEFT JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
     }
     if( aColumns.contains("PERSON") ){
-        sql += "INNER JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
-        sql += "INNER JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
+        sql += "LEFT JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
+        sql += "LEFT JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
     }
     sql += QString("WHERE EVENT.xid_conference = %1 AND (").arg( aConferenceId );
 
index c10f3a22ab682cf9f1abf5a8d9e8936b33187d34..2781f3fb16d4e719844972a50136be7f10ed9635 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 6d47d045762821717e1736e386e87f7ab5a7a9d3..05be3b30758b68557bfcd077c956fd44ea49041d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index cfc3923be0783dd32c3811bec589a27fbe2257b2..5184b876d635b2bc74800053dca4d8e163e4efb1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
index 2ead3e6add69c6ad12c236d42057cc60cf177d14..098df804f65d1b2f5f200d2c7cf05ca3360615fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *