New upstream release.
authorgregor herrmann <gregoa@debian.org>
Wed, 13 Jul 2011 22:10:23 +0000 (22:10 -0000)
committergregor herrmann <gregoa@debian.org>
Wed, 13 Jul 2011 22:10:23 +0000 (22:10 -0000)
46 files changed:
ChangeLog
NEWS
README
data/confclerk.1
data/confclerk.desktop
data/confclerk.png
data/confclerk.pod
debian/changelog
src/app/app.pro
src/create_tables.sql
src/global.pri
src/gui/about.ui
src/gui/conferenceeditor.cpp
src/gui/conferenceeditor.h
src/gui/conferenceeditor.ui
src/gui/daynavigatorwidget.cpp
src/gui/errormessage.cpp
src/gui/eventdialog.ui
src/gui/gui.pro
src/gui/mainwindow.cpp
src/gui/mainwindow.ui
src/gui/mapwindow.cpp [deleted file]
src/gui/mapwindow.h [deleted file]
src/gui/mapwindow.ui [deleted file]
src/gui/searchhead.ui
src/gui/settingsdialog.cpp
src/gui/settingsdialog.h
src/gui/settingsdialog.ui
src/gui/tabcontainer.cpp
src/gui/tabcontainer.h
src/icons.qrc
src/icons/applications-internet.png [deleted file]
src/mvc/conference.cpp
src/mvc/conference.h
src/mvc/delegate.cpp
src/mvc/delegate.h
src/mvc/event.cpp
src/mvc/mvc.pro
src/mvc/room.cpp
src/mvc/room.h
src/mvc/treeview.cpp
src/mvc/treeview.h
src/sql/schedulexmlparser.cpp
src/sql/sqlengine.cpp
src/sql/sqlengine.h
src/test/test.pro

index b9d3e0bb7fdd1f8d6c96170315d648bd57abdf59..f60aa829c6434a3d5fee6ce4781af466de7001ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,97 @@
+2011-07-13  gregoa
+
+       * ChangeLog: Update ChangeLog before release.
+       * NEWS: NEWS entry for 0.5.1 release.
+
+2011-07-13  philipp
+
+       * src/mvc/delegate.cpp: This is just a quick-and-dirty workaround
+         commit to aviod a drawing problem on maemo. This commit might be
+         reverted ...
+       * src/gui/searchhead.ui: The speaker is preselected in the search
+         dialog now.
+       * src/mvc/delegate.cpp: First try to improve the colors (ticket
+         #13).
+       * src/gui/mainwindow.cpp, src/gui/settingsdialog.cpp,
+         src/gui/settingsdialog.h, src/gui/settingsdialog.ui: The cancel
+         button on the settings dialog works now (ticket #14) and the
+         layout of the settings dialog is stable now (ticket #15).
+       * src/gui/mainwindow.ui: Changed the menu to be non-hierarchical.
+         Closes ticket #16.
+       * src/gui/daynavigatorwidget.cpp: Changed the placement of the date
+         label again. Changed the date format to show the day-of-week.
+       * src/gui/daynavigatorwidget.cpp: Replaced "130" by s.width() when
+         centering the date.
+
+2011-07-12  philipp
+
+       * src/sql/sqlengine.cpp: This commit closes ticket #12. The search
+         terms are ANDed now and a call to trimmed() before splitting the
+         search string avoids problems with leading/trailing spaces.
+
+2011-07-11  philipp
+
+       * src/mvc/event.cpp: Before querying the SEARCH_EVENT table, its
+         existence is checked. Therefore a command line debug error
+         message is avoided.
+         
+         This commit partly fixes ticket #10.
+       * src/gui/errormessage.cpp: Error messages reported with the
+         function error_essage are no longer writted to std:error because
+         they are shown to the user anyway. This commit partly resolves
+         ticket #10.
+       * src/gui/eventdialog.ui: The description and person list of the
+         event dialog is now selectable so that copy&paste is possible.
+
+2011-07-10  philipp
+
+       * src/gui/about.ui, src/gui/mainwindow.cpp: Tuned the about dialog.
+       * src/gui/conferenceeditor.ui: Minor tuning of the conference
+         editor. The reload button now has a text on it.
+       * src/sql/sqlengine.cpp: Fixed bug (related to ticket #12): Only
+         the last search term is used.
+       * src/sql/sqlengine.cpp: Undid changes to sqlengine.cpp I committed
+         accidentally in r1318.
+
+2011-07-08  gregoa
+
+       * src/sql/sqlengine.cpp: Split search keyword string on whitespace.
+       * src/sql/sqlengine.cpp: Avoid duplicate search results by using
+         SELECT DISTINCT when filling the SEARCH_EVENT table.
+
+2011-07-05  gregoa
+
+       * README: Add DebConf11 URL to README.
+
+2011-07-04  philipp
+
+       * src/gui/conferenceeditor.ui: Cleaning of the conferenceeditor
+         dialog.
+       * src/create_tables.sql, src/gui/conferenceeditor.cpp,
+         src/gui/conferenceeditor.h, src/gui/conferenceeditor.ui,
+         src/gui/gui.pro, src/gui/mapwindow.cpp, src/gui/mapwindow.h,
+         src/gui/mapwindow.ui, src/gui/tabcontainer.cpp,
+         src/gui/tabcontainer.h, src/icons.qrc,
+         src/icons/applications-internet.png, src/mvc/conference.cpp,
+         src/mvc/conference.h, src/mvc/delegate.cpp, src/mvc/delegate.h,
+         src/mvc/room.cpp, src/mvc/room.h, src/mvc/treeview.cpp,
+         src/mvc/treeview.h, src/sql/schedulexmlparser.cpp,
+         src/sql/sqlengine.cpp, src/sql/sqlengine.h: Removed the ability
+         to show "pictures" (maps) of rooms and maps of conferences. The
+         XML file does not contain picture/map/image information of
+         conferences or rooms. We left the room.picture definition in the
+         database SQL because there is no "drop column" in sqlite.
+       * src/gui/mainwindow.ui: Removed the unused status bar.
+
+2011-06-29  gregoa
+
+       * src/app/app.pro, src/gui/gui.pro, src/mvc/mvc.pro,
+         src/test/test.pro: Some more s;TARGETDEPS;POST_TARGETDEPS;
+       * data/confclerk.desktop, data/confclerk.pod: s;scheduler;schedule
+         application;
+       * ChangeLog, NEWS, src/global.pri: Bump version
+       * ChangeLog: Update changelog.
+
 2011-06-28  philipp
 
        * src/gui/conferenceeditor.cpp, src/gui/daynavigatorwidget.cpp,
diff --git a/NEWS b/NEWS
index bf3df19493b626e923478be3769c9258dbb625ab..e77ded6e340a060d124e01b55ef8695e1cdd3d80 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,16 @@
 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.1
+* Improve search function: split search string on whitespace.
+* Various small UI changes, e.g.:
+  - cancel button in settings dialogs
+  - colors and borders
+  - date format in date navigator
+  - flatten menu
+  - remove status bar
+  - clean up some dialogs
+
 Version 0.5.0
 * First release of ConfClerk as the fosdem-schedule successor.
 * Continue the multi-conference feature, make sure persons/tracks/rooms are
diff --git a/README b/README
index 4863cf1ab859ef89edbecdb09a5bbf9a0ab21327..242ea507c4e238dd9739e63df95f384ea4f82810 100644 (file)
--- a/README
+++ b/README
@@ -126,4 +126,5 @@ Tested pentabarf instances:
 
 - FOSDEM (2011): http://fosdem.org/schedule/xml
 - DebConf (2010): http://penta.debconf.org/dc10_schedule/schedule.en.xml
+- DebConf (2011): http://penta.debconf.org/dc11_schedule/schedule.en.xml
 - 27C3: http://events.ccc.de/congress/2010/Fahrplan/schedule.en.xml
index f788e51b1f5ecb64728087e95f88fcaf7a5645ee..76887c9d99e7a31e266cb35c50a9ac4d07d5accc 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "CONFCLERK 1"
-.TH CONFCLERK 1 "2011-06-28" "Version 0.5.0" "Offlince conference scheduler"
+.TH CONFCLERK 1 "2011-06-30" "Version 0.5.1" "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
 .nh
 .SH "NAME"
-ConfClerk \- offline conference scheduler
+ConfClerk \- offline conference schedule application
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
 \&\fBconfclerk\fR
index 1a6aef0149eda22946c398cabd8f30883d8d41db..59df7461fc848b513af5be723ddf7d4e8714c5c7 100644 (file)
@@ -2,7 +2,7 @@
 Version=1.0
 Type=Application
 Name=ConfClerk
-GenericName=Offline conference scheduler
+GenericName=Offline conference schedule application
 Exec=confclerk
 Icon=confclerk
 Categories=Office;Calendar;
index 4def1116a685e47bce60ff0fd3efdd5b2f169157..bbdd269e76c4faef28b89ac0af3773ae861950e6 100644 (file)
Binary files a/data/confclerk.png and b/data/confclerk.png differ
index 0c834cd3851af324b2ba49c6920c79fd86c5ed94..9d4c5a0e7c9a640ac40a57593db3979c3b4aba29 100644 (file)
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-ConfClerk - offline conference scheduler
+ConfClerk - offline conference schedule application
 
 =head1 SYNOPSIS
 
index 190168bb8c79814af78b0fab0a38c2f1c6b3514a..02c40eaaf67bdc67306c9e3eedac5a5213bfce95 100644 (file)
@@ -1,3 +1,9 @@
+confclerk (0.5.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa@debian.org>  Thu, 14 Jul 2011 00:08:54 +0200
+
 confclerk (0.5.0-1) unstable; urgency=low
 
   * Initial release (closes: #632132).
index 2fd2c4acb09926d59e0048a379006c34b2c7e54f..aa3554962ea8afafcbb9165befadd50ccf2c76f5 100644 (file)
@@ -16,7 +16,7 @@ maemo {
     LIBS += -L$$DESTDIR -lqalarm -lalarm
     INCLUDEPATH += ../alarm
     DEPENDPATH +=  ../alarm
-    TARGETDEPS += $$DESTDIR/libqalarm.a
+    POST_TARGETDEPS += $$DESTDIR/libqalarm.a
     HEADERS += alarmdbus.h \
         alarmdbusadaptorp.h
     SOURCES += alarmdbus.cpp \
index f804900897a5dc64bdf592cbd3be063fb46d72f5..a04b8d2af150c347976e67245dd1bb8511b54389 100644 (file)
@@ -10,8 +10,7 @@ CREATE TABLE CONFERENCE ( id INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL
     , day_change INTEGER
     , timeslot_duration INTEGER
     , active INTEGER DEFAULT 0
-    , url VARCHAR
-    , map VARCHAR);
+    , url VARCHAR);
 
 CREATE TABLE TRACK ( id INTEGER  PRIMARY KEY AUTOINCREMENT  NOT NULL
     , xid_conference INTEGER NOT NULL
index 1a72c7ee73694e2bc122dc2e7ef820bfac9393d8..baf6391767a8da276b1ca3229f32df0eae36418f 100644 (file)
@@ -4,7 +4,7 @@
 # USAGE: include(./global.pri)
 
 # VERSION
-VERSION = 0.5.0
+VERSION = 0.5.1
 DEFINES += VERSION=\\\"$$VERSION\\\"
 
 # Define 'MAEMO' specific CONFIG/DEFINE
index 818a11692cda4ba0779620dd62da2d10c12eb5c2..a812c93e4b3014a455c14f40258d78c0e1aa7544 100644 (file)
@@ -9,8 +9,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>500</width>
-    <height>487</height>
+    <width>460</width>
+    <height>570</height>
    </rect>
   </property>
   <property name="sizePolicy">
   <property name="locale">
    <locale language="C" country="AnyCountry"/>
   </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <widget class="QLabel" name="FosdemIcon">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>77</width>
-           <height>68</height>
-          </size>
-         </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOff</enum>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>438</width>
+        <height>517</height>
+       </rect>
+      </property>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="0">
+        <widget class="QLabel" name="labDescription">
          <property name="text">
-          <string/>
+          <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:8pt; font-weight:400; font-style:normal;&quot;&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;&lt;img src=&quot;:/confclerk.svg&quot; width=&quot;77&quot; style=&quot;float: right;&quot; /&gt;&lt;/p&gt;
+&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, 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>
+         </property>
+         <property name="textFormat">
+          <enum>Qt::RichText</enum>
          </property>
-         <property name="pixmap">
-          <pixmap resource="../../data/data.qrc">:/confclerk.svg</pixmap>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
          </property>
-         <property name="scaledContents">
+         <property name="wordWrap">
           <bool>true</bool>
          </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
+         <property name="openExternalLinks">
+          <bool>true</bool>
          </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
+         <property name="textInteractionFlags">
+          <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
          </property>
-        </spacer>
+        </widget>
        </item>
       </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <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>
      <item>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QScrollArea" name="scrollArea">
-         <property name="widgetResizable">
-          <bool>true</bool>
-         </property>
-         <widget class="QWidget" name="scrollAreaWidgetContents">
-          <property name="geometry">
-           <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>374</width>
-            <height>544</height>
-           </rect>
-          </property>
-          <layout class="QGridLayout" name="gridLayout_2">
-           <item row="0" column="0">
-            <widget class="QWidget" name="content" native="true">
-             <layout class="QVBoxLayout" name="verticalLayout_3">
-              <item>
-               <widget class="QLabel" name="label">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="text">
-                 <string>ConfClerk</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="label_2">
-                <property name="text">
-                 <string>(Successor of FOSDEM schedule)</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="labelVersion">
-                <property name="text">
-                 <string>Version %1</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="spacer">
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="description">
-                <property name="text">
-                 <string>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, and the CCC.</string>
-                </property>
-                <property name="wordWrap">
-                 <bool>true</bool>
-                </property>
-                <property name="openExternalLinks">
-                 <bool>true</bool>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="label_3">
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QGroupBox" name="groupBox">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="minimumSize">
-                 <size>
-                  <width>0</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="title">
-                 <string>Developers</string>
-                </property>
-                <layout class="QVBoxLayout" name="verticalLayout_4">
-                 <item>
-                  <widget class="QLabel" name="label_4">
-                   <property name="sizePolicy">
-                    <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                     <horstretch>0</horstretch>
-                     <verstretch>0</verstretch>
-                    </sizepolicy>
-                   </property>
-                   <property name="font">
-                    <font>
-                     <weight>50</weight>
-                     <bold>false</bold>
-                    </font>
-                   </property>
-                   <property name="text">
-                    <string>Berendova Monika, Hanzes Matus, Komara Martin, Korinek Pavol, Pavelka Pavol, Timko Marek, Uzak Matus, Fortes Francisco, Philipp Spitzer, gregor herrmann</string>
-                   </property>
-                   <property name="wordWrap">
-                    <bool>true</bool>
-                   </property>
-                  </widget>
-                 </item>
-                </layout>
-               </widget>
-              </item>
-              <item>
-               <widget class="QGroupBox" name="groupBox_2">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="title">
-                 <string>Copyright and license</string>
-                </property>
-                <layout class="QVBoxLayout" name="verticalLayout_5">
-                 <item>
-                  <widget class="QLabel" name="label_5">
-                   <property name="sizePolicy">
-                    <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-                     <horstretch>0</horstretch>
-                     <verstretch>0</verstretch>
-                    </sizepolicy>
-                   </property>
-                   <property name="font">
-                    <font>
-                     <weight>50</weight>
-                     <bold>false</bold>
-                    </font>
-                   </property>
-                   <property name="text">
-                    <string>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.</string>
-                   </property>
-                   <property name="wordWrap">
-                    <bool>true</bool>
-                   </property>
-                  </widget>
-                 </item>
-                 <item>
-                  <widget class="QLabel" name="label_6">
-                   <property name="font">
-                    <font>
-                     <weight>50</weight>
-                     <bold>false</bold>
-                    </font>
-                   </property>
-                   <property name="text">
-                    <string>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.</string>
-                   </property>
-                   <property name="wordWrap">
-                    <bool>true</bool>
-                   </property>
-                  </widget>
-                 </item>
-                </layout>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="copyright">
-                <property name="text">
-                 <string>Copyright (C) 2010 Ixonos Plc.
-Copyright (C) 2011 Philipp Spitzer &amp; gregor herrmann</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <spacer name="verticalSpacer_2">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </widget>
-        </widget>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <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>
-         <item>
-          <widget class="QPushButton" name="okButton">
-           <property name="text">
-            <string>OK</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
+      <widget class="QPushButton" name="okButton">
+       <property name="text">
+        <string>OK</string>
+       </property>
+      </widget>
      </item>
     </layout>
    </item>
index d99628adf7e6136672ba40c5f6f9bd97a9d61e4a..ac7b08e40ccd8aec27ef4d242afde3c94c1fe55b 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "conferencemodel.h"
 #include "urlinputdialog.h"
-#include "mapwindow.h"
 #include "errormessage.h"
 
 #include <QInputDialog>
@@ -50,7 +49,6 @@ ConferenceEditor::ConferenceEditor(ConferenceModel* model, QWidget* parent)
     connect(removeBtn, SIGNAL(clicked()), SLOT(removeClicked()));
     connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked()));
     connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked()));
-    connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
     connect(buttonBox, SIGNAL(rejected()), SLOT(close()));
 
     // it's OK to emit selection signals here
@@ -96,14 +94,6 @@ void ConferenceEditor::itemSelected(const QModelIndex& current, const QModelInde
                 conf.start().toString("dd-MM-yyyy")
                 + ", " +
                 conf.end().toString("dd-MM-yyyy"));
-
-        QString map = conf.map();
-        if (map.isEmpty()) {
-            showMapButton->hide();
-        } else {
-            showMapButton->show();
-        }
-
         conferenceInfo->setCurrentIndex(0);
         removeBtn->show();
     }
@@ -219,18 +209,3 @@ void ConferenceEditor::importFinished(const QString& title)
     itemSelected(QModelIndex(), QModelIndex());
 }
 
-void ConferenceEditor::conferenceMapClicked()
-{
-    Conference conf = Conference::getById(selected_id);
-    QString mapPath = conf.map();
-    if(mapPath.isEmpty() or !QFile::exists(mapPath)) {
-        error_message("Map is not available");
-        return;
-    }
-
-    QString roomName;
-
-    QPixmap map(mapPath);
-    MapWindow window(map,roomName,this);
-    window.exec();
-}
index adddd15a32c29f1c5e79dc1a69019eb10d3b69d3..daa8f3fa2c1b955454589e3e187e9ba771e458e0 100644 (file)
@@ -64,7 +64,6 @@ private slots:
     void removeClicked();
     void changeUrlClicked();
     void refreshClicked();
-    void conferenceMapClicked();
 
 private:
     ConferenceModel* model;
index d4c8fda1a328bb41c55c3c90900d0622572d99ec..485cb198e21637fe49cd9778b3ede1846e4143df 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>548</width>
-    <height>300</height>
+    <width>557</width>
+    <height>384</height>
    </rect>
   </property>
   <property name="windowTitle">
    <iconset resource="../../data/data.qrc">
     <normaloff>:/confclerk.svg</normaloff>:/confclerk.svg</iconset>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <property name="spacing">
-    <number>0</number>
-   </property>
-   <property name="margin">
-    <number>0</number>
-   </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,1">
    <item>
     <widget class="QWidget" name="widget_2" native="true">
      <layout class="QVBoxLayout" name="verticalLayout_2">
     </widget>
    </item>
    <item>
-    <widget class="QWidget" name="widget_3" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>0</number>
-      </property>
-      <property name="margin">
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QStackedWidget" name="conferenceInfo">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="currentIndex">
-         <number>0</number>
-        </property>
-        <widget class="QWidget" name="conferenceInfoContents">
-         <layout class="QVBoxLayout" name="verticalLayout_4">
-          <property name="spacing">
-           <number>0</number>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <item>
-           <widget class="QLabel" name="conferenceTitle">
-            <property name="font">
-             <font>
-              <weight>75</weight>
-              <bold>true</bold>
-             </font>
-            </property>
-            <property name="text">
-             <string>Conference Name</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-            <property name="wordWrap">
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="conferenceSubtitle">
-            <property name="text">
-             <string>Conference Subtitle</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-            <property name="wordWrap">
-             <bool>true</bool>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QGridLayout" name="gridLayout_7">
-            <item row="0" column="0">
-             <widget class="QLabel" name="label_3">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <italic>true</italic>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="text">
-               <string>When:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QLabel" name="label_4">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <italic>true</italic>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="text">
-               <string>Where:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="2">
-             <widget class="QLabel" name="conferenceWhen">
-              <property name="text">
-               <string>DATE (FROM - TO)</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="2">
-             <widget class="QLabel" name="conferenceWhere">
-              <property name="text">
-               <string>CITY, CAMPUS</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="3">
-             <widget class="QPushButton" name="showMapButton">
-              <property name="text">
-               <string>MAP</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../icons.qrc">
-                <normaloff>:/icons/applications-internet.png</normaloff>:/icons/applications-internet.png</iconset>
-              </property>
-              <property name="flat">
-               <bool>true</bool>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="4">
-             <spacer name="horizontalSpacer_4">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-            <item row="0" column="1">
-             <widget class="QLabel" name="spacer_2">
-              <property name="text">
-               <string/>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <widget class="QWidget" name="widget_5" native="true">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <layout class="QHBoxLayout" name="horizontalLayout_3">
-             <item>
-              <widget class="QPushButton" name="refreshBtn">
-               <property name="text">
-                <string notr="true"/>
-               </property>
-               <property name="icon">
-                <iconset resource="../icons.qrc">
-                 <normaloff>:/icons/reload.png</normaloff>:/icons/reload.png</iconset>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QPushButton" name="changeUrl">
-               <property name="text">
-                <string>Change URL</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_2">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QWidget" name="widget" native="true">
-               <layout class="QVBoxLayout" name="verticalLayout">
-                <property name="spacing">
-                 <number>0</number>
-                </property>
-                <property name="margin">
-                 <number>0</number>
-                </property>
-                <item>
-                 <spacer name="verticalSpacer">
-                  <property name="orientation">
-                   <enum>Qt::Vertical</enum>
-                  </property>
-                  <property name="sizeHint" stdset="0">
-                   <size>
-                    <width>20</width>
-                    <height>40</height>
-                   </size>
-                  </property>
-                 </spacer>
-                </item>
-                <item>
-                 <widget class="QDialogButtonBox" name="buttonBox">
-                  <property name="standardButtons">
-                   <set>QDialogButtonBox::Close</set>
-                  </property>
-                  <property name="centerButtons">
-                   <bool>false</bool>
-                  </property>
-                 </widget>
-                </item>
-               </layout>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="conferenceInfoEmpty"/>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QStackedWidget" name="conferenceInfo">
+       <property name="currentIndex">
+        <number>0</number>
+       </property>
+       <widget class="QWidget" name="conferenceInfoContents">
+        <layout class="QVBoxLayout" name="verticalLayout_3">
+         <item>
+          <widget class="QLabel" name="conferenceTitle">
+           <property name="font">
+            <font>
+             <weight>75</weight>
+             <bold>true</bold>
+            </font>
+           </property>
+           <property name="text">
+            <string>Conference Name</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="conferenceSubtitle">
+           <property name="text">
+            <string>Conference Subtitle</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QGridLayout" name="gridLayout_7">
+           <item row="0" column="0">
+            <widget class="QLabel" name="label_3">
+             <property name="font">
+              <font>
+               <weight>75</weight>
+               <italic>true</italic>
+               <bold>true</bold>
+              </font>
+             </property>
+             <property name="text">
+              <string>When:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="label_4">
+             <property name="font">
+              <font>
+               <weight>75</weight>
+               <italic>true</italic>
+               <bold>true</bold>
+              </font>
+             </property>
+             <property name="text">
+              <string>Where:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QLabel" name="conferenceWhen">
+             <property name="text">
+              <string>DATE (FROM - TO)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <widget class="QLabel" name="conferenceWhere">
+             <property name="text">
+              <string>CITY, CAMPUS</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_3">
+           <item>
+            <widget class="QPushButton" name="refreshBtn">
+             <property name="text">
+              <string>Reload from URL</string>
+             </property>
+             <property name="icon">
+              <iconset resource="../icons.qrc">
+               <normaloff>:/icons/reload.png</normaloff>:/icons/reload.png</iconset>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="changeUrl">
+             <property name="text">
+              <string>Change URL</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="horizontalSpacer_2">
+             <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>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QDialogButtonBox" name="buttonBox">
+           <property name="standardButtons">
+            <set>QDialogButtonBox::Close</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
-      </item>
-     </layout>
-    </widget>
+       <widget class="QWidget" name="conferenceInfoEmpty"/>
+      </widget>
+     </item>
+    </layout>
    </item>
   </layout>
  </widget>
index 0f416f2f6b46cb9f9af217d7a6c9c431c72d1f67..07d13bc5fc5873829fa2d773c0ad706289ab4730 100644 (file)
@@ -109,20 +109,12 @@ void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
 {
     Q_UNUSED(aEvent);
 
-    QString selectedDateStr = mCurDate.toString("MMM dd yyyy");
-
+    QString selectedDateStr = mCurDate.toString("dddd\nyyyy-MM-dd");
     QPainter painter(this);
     painter.save();
-    QRect r = selectedDate->geometry();
-    QRect s = mFontMetrics->boundingRect(selectedDateStr);
-    QPoint p = QPoint(
-            r.x() + r.width()/2 - s.height()/2 - mFontMetrics->descent(),
-            - 130
-            );
-
-    painter.translate(r.width()/2, r.height()/2);
+    QRect q(y()-height(), x(), height(), width());
     painter.rotate(270);
-    painter.drawText(p.y(), p.x(), selectedDateStr); // y,x,string
+    painter.drawText(q, Qt::AlignCenter, selectedDateStr);
     painter.restore();
 }
 
index d41b0e3c2e226b18490ba1a4bed8e2629a0d445f..407f52d2ce00f07d185dc05bab63b7b81b89b9e2 100644 (file)
@@ -30,7 +30,6 @@
 
 void error_message(const QString& message)
 {
-    QTextStream(stderr) << "ERROR: " << message << "\n";
 #ifdef QT_MAEMO5_LIB
     // by default the message is white on yellow, which is unusable
     // but some html here works
index 4eff409d4327c5ef40d53d13da1756c84e597142..73c2d4b3430629c006918435e2f35123e11acb17 100644 (file)
                  <property name="openExternalLinks">
                   <bool>true</bool>
                  </property>
+                 <property name="textInteractionFlags">
+                  <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                 </property>
                 </widget>
                </item>
               </layout>
                  <property name="openExternalLinks">
                   <bool>true</bool>
                  </property>
+                 <property name="textInteractionFlags">
+                  <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                 </property>
                 </widget>
                </item>
               </layout>
                  <property name="openExternalLinks">
                   <bool>true</bool>
                  </property>
+                 <property name="textInteractionFlags">
+                  <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                 </property>
                 </widget>
                </item>
               </layout>
                   <bool>true</bool>
                  </property>
                  <property name="textInteractionFlags">
-                  <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
+                  <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
                  </property>
                 </widget>
                </item>
index b6732cb3ec68e23a1aee7bd10cf29a7fb4d74ec4..e9b1dd43d63c862eeeb49bc8a780f7bc0ac56124 100644 (file)
@@ -28,7 +28,7 @@ maemo {
         -lqalarm
     INCLUDEPATH += ../alarm
     DEPENDPATH += ../alarm
-    TARGETDEPS += $$DESTDIR/libqalarm.a
+    POST_TARGETDEPS += $$DESTDIR/libqalarm.a
 }
 
 # A shamelessly long list of sources, headers and forms.
@@ -43,7 +43,6 @@ FORMS += searchhead.ui \
     eventdialog.ui \
     conflictsdialog.ui \
     tabcontainer.ui \
-    mapwindow.ui \
     settingsdialog.ui \
     conferenceeditor.ui \
     urlinputdialog.ui
@@ -61,7 +60,6 @@ HEADERS += roomstabcontainer.h \
     daynavigatorwidget.h \
     eventdialog.h \
     tabcontainer.h \
-    mapwindow.h \
     settingsdialog.h \
     conferenceeditor.h \
     urlinputdialog.h
@@ -79,7 +77,6 @@ SOURCES += roomstabcontainer.cpp \
     daynavigatorwidget.cpp \
     eventdialog.cpp \
     tabcontainer.cpp \
-    mapwindow.cpp \
     settingsdialog.cpp \
     conferenceeditor.cpp \
     urlinputdialog.cpp
index aa4af8c138b6b8772a4c424cc135c55fddb251af..1e612dac22fc346c9607b560f54f057dbbdc4c74 100644 (file)
@@ -135,7 +135,7 @@ void MainWindow::aboutApp()
     QDialog dialog(this);
     Ui::AboutDialog ui;
     ui.setupUi(&dialog);
-    ui.labelVersion->setText(ui.labelVersion->text().arg(qApp->applicationVersion()));
+    ui.labDescription->setText(ui.labDescription->text().arg(qApp->applicationVersion()));
 #ifdef N810
     dialog.setFixedWidth(width());
 #endif
@@ -221,15 +221,17 @@ void MainWindow::unsetConference()
 void MainWindow::setup()
 {
     SettingsDialog dialog;
-    dialog.exec();
-
-    QNetworkProxy proxy(
-            AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
-            AppSettings::proxyAddress(),
-            AppSettings::proxyPort(),
-            PROXY_USERNAME,
-            PROXY_PASSWD);
-    QNetworkProxy::setApplicationProxy(proxy);
+    dialog.loadDialogData();
+    if (dialog.exec() == QDialog::Accepted) {
+        dialog.saveDialogData();
+        QNetworkProxy proxy(
+                AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
+                AppSettings::proxyAddress(),
+                AppSettings::proxyPort(),
+                PROXY_USERNAME,
+                PROXY_PASSWD);
+        QNetworkProxy::setApplicationProxy(proxy);
+    }
 }
 
 /** Create and run ConferenceEditor dialog, making required connections for it.
index 59740020e4ee21e3bb90feb3050cd9b4727da5a2..9cd4fde4ffe0180713a04ecf43867db1439da5e4 100644 (file)
@@ -97,7 +97,6 @@
     </item>
    </layout>
   </widget>
-  <widget class="QStatusBar" name="statusbar"/>
   <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
     <rect>
      <height>23</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menuMenu">
-    <property name="title">
-     <string>Menu</string>
-    </property>
-    <addaction name="settingsAction"/>
-    <addaction name="aboutAction"/>
-    <addaction name="conferencesAction"/>
-    <addaction name="quitAction"/>
-   </widget>
-   <addaction name="menuMenu"/>
+   <addaction name="conferencesAction"/>
+   <addaction name="settingsAction"/>
+   <addaction name="aboutAction"/>
+   <addaction name="quitAction"/>
   </widget>
-  <action name="actionSettings">
+  <action name="conferencesAction">
    <property name="text">
-    <string>Settings</string>
+    <string>Conferences</string>
    </property>
   </action>
   <action name="settingsAction">
     <string>About</string>
    </property>
   </action>
-  <action name="conferencesAction">
-   <property name="text">
-    <string>Conferences</string>
-   </property>
-  </action>
   <action name="quitAction">
    <property name="text">
     <string>&amp;Quit</string>
diff --git a/src/gui/mapwindow.cpp b/src/gui/mapwindow.cpp
deleted file mode 100644 (file)
index 1072159..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 "mapwindow.h"
-
-MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent)
-    : QDialog(aParent)
-{
-    setupUi(this);
-#ifdef MAEMO
-    showFullScreen();
-    //map->setScaledContents(true);
-    //map->setPixmap(aImage.scaled(QSize(800,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
-    map->setPixmap(aImage.scaled(QSize(640,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
-#elif N810
-    showMaximized();
-    map->setPixmap(aImage.scaled(QSize(400,300),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
-#else
-    map->setPixmap(aImage);
-#endif
-    setMouseTracking(true); // to receive mouse events
-    setWindowTitle(aName);
-}
-
-// it is enough to handle mouseReleaseEvent, instead of
-// getting/creating mouseClikEvent, since the whole window
-// is occupied by only-one widget/label (image/map)
-void MapWindow::mouseReleaseEvent(QMouseEvent *event)
-{
-    Q_UNUSED(event);
-    close();
-}
-
diff --git a/src/gui/mapwindow.h b/src/gui/mapwindow.h
deleted file mode 100644 (file)
index f99bc45..0000000
+++ /dev/null
@@ -1,37 +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 MAPWINDOW_H
-#define MAPWINDOW_H
-
-#include <QDialog>
-#include <QPixmap>
-#include "ui_mapwindow.h"
-
-class MapWindow : public QDialog, Ui::MapWindow
-{
-public:
-    MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent = NULL);
-    ~MapWindow() {}
-protected:
-    virtual void mouseReleaseEvent(QMouseEvent *event);
-};
-
-#endif /* MAPWINDOW_H */
-
diff --git a/src/gui/mapwindow.ui b/src/gui/mapwindow.ui
deleted file mode 100644 (file)
index 997b956..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MapWindow</class>
- <widget class="QDialog" name="MapWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>298</width>
-    <height>179</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <widget class="QLabel" name="map">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string>Map goes here</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignCenter</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
index 32167ad876aff34e0ef15194b62e455f3d4bd563..5d3d74fbcbceeefc3ebdbf0f99ac8651da481729 100644 (file)
@@ -53,6 +53,9 @@
        <property name="text">
         <string>Speaker</string>
        </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
       </widget>
      </item>
      <item>
index 36dbf4e1364cb17f7dadaf3d3ee3951cc401f3d8..82ba0d0bb5216f72b892b5a9115fa54ed449701c 100644 (file)
@@ -26,23 +26,19 @@ SettingsDialog::SettingsDialog(QWidget *aParent)
     : QDialog(aParent)
 {
     setupUi(this);
+    connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
+}
 
+
+void SettingsDialog::loadDialogData()
+{
     // deserialize dialog data
     address->setText(AppSettings::proxyAddress());
     port->setValue(AppSettings::proxyPort());
     directConnection->setChecked(AppSettings::isDirectConnection());
-
-    connect(buttonBox, SIGNAL(accepted()), SLOT(saveDialogData()));
-    connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
-
-    if(directConnection->isChecked())
-        proxyWidget->hide();
+    proxyWidget->setDisabled(directConnection->isChecked());
 }
 
-void SettingsDialog::connectionTypeChanged(bool aState)
-{
-    aState ? proxyWidget->hide() : proxyWidget->show();
-}
 
 void SettingsDialog::saveDialogData()
 {
@@ -50,7 +46,12 @@ void SettingsDialog::saveDialogData()
     AppSettings::setProxyAddress(address->text());
     AppSettings::setProxyPort(port->value());
     AppSettings::setDirectConnection(directConnection->isChecked());
+}
+
 
-    close();
+void SettingsDialog::connectionTypeChanged(bool aState)
+{
+    proxyWidget->setDisabled(aState);
 }
 
+
index 086347974ae9324c3729558fc7cb4c76e0d13652..4e4ba9db2a5ba437a1532f98206481a667c6d51e 100644 (file)
@@ -29,9 +29,10 @@ class SettingsDialog : public QDialog, Ui::SettingsDialog
 public:
     SettingsDialog(QWidget *aParent = NULL);
     ~SettingsDialog() {}
+    void loadDialogData();
+    void saveDialogData();
 private slots:
     void connectionTypeChanged(bool aState);
-    void saveDialogData();
 };
 
 #endif /* PROXYSETTINGSDIALOG_H */  
index 940b03c4540c2b683b394b3a4aed81fc7e3badf7..05829f6e113f1cb5c5e93f04147021ed8a1263f4 100644 (file)
@@ -2,6 +2,14 @@
 <ui version="4.0">
  <class>SettingsDialog</class>
  <widget class="QDialog" name="SettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>500</width>
+    <height>152</height>
+   </rect>
+  </property>
   <property name="sizePolicy">
    <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
     <horstretch>0</horstretch>
@@ -35,7 +43,7 @@
        </widget>
       </item>
       <item>
-       <widget class="QWidget" name="proxyWidget" native="true">
+       <widget class="QFrame" name="proxyWidget">
         <layout class="QHBoxLayout" name="horizontalLayout_3">
          <item>
           <widget class="QLabel" name="label">
   </layout>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>SettingsDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>288</x>
+     <y>128</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>325</x>
+     <y>147</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>SettingsDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>202</x>
+     <y>130</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>226</x>
+     <y>147</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
index da4b7fb7133b486f0b62e1b4f15677c57e6622ed..357ea35c7a0a7f1fc75e85377b1a241e66581198 100644 (file)
@@ -27,7 +27,6 @@
 #include <delegate.h>
 
 #include "eventdialog.h"
-#include "mapwindow.h"
 #include "room.h"
 #include "errormessage.h"
 
@@ -49,7 +48,6 @@ TabContainer::TabContainer(QWidget *aParent)
 
     connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
     connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
-    connect(treeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
 
     // day navigator is hidden by default
@@ -82,28 +80,6 @@ void TabContainer::itemClicked(const QModelIndex &aIndex)
     disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
 }
 
-void TabContainer::displayMap(const QModelIndex &aIndex)
-{
-    Event *event = static_cast<Event*>(aIndex.internalPointer());
-
-    QVariant mapPathV = event->room()->map();
-    QString mapPath;
-    if (!mapPathV.isValid()) {
-        error_message("No map for this room");
-        return;
-    } else {
-        mapPath = mapPathV.toString();
-        if (!QFile::exists(mapPath)) {
-            error_message("Map for this room not found: " + mapPath);
-            return;
-        }
-    }
-
-    QPixmap map(mapPath);
-    MapWindow window(map, event->room()->name(),this);
-    window.exec();
-}
-
 void TabContainer::displayConflicts(const QModelIndex &aIndex)
 {
     ConflictsDialog dialog(static_cast<Event*>(aIndex.internalPointer())->id(),this);
index 6146268eebcf1b39971cad65ebd7848e9e194d0e..572b9957a273c0921a2aa7e80f3273f018f8e1d2 100644 (file)
@@ -50,7 +50,6 @@ public slots:
 protected slots:
     virtual void updateTreeView(const QDate &aDate);
     void itemClicked(const QModelIndex &aIndex);
-    void displayMap(const QModelIndex &aIndex);
     void displayConflicts(const QModelIndex &aIndex);
 };
 
index 644c48ec201f70e958684f8b2026799df8bb54c2..8f472eda7afcbeed7b2c380fe82900eca5aea53e 100644 (file)
@@ -1,14 +1,13 @@
 <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/applications-internet.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>
-    </qresource>
+  <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>
+  </qresource>
 </RCC>
diff --git a/src/icons/applications-internet.png b/src/icons/applications-internet.png
deleted file mode 100644 (file)
index cc989b6..0000000
Binary files a/src/icons/applications-internet.png and /dev/null differ
index 667b0c5c94d954d8db9be0c6a93c382bf8ae6689..1fd60d653333f440b02437689695fe5344ab382d 100644 (file)
@@ -33,7 +33,6 @@ QSqlRecord const Conference::sColumns = Conference::toRecord(QList<QSqlField>()
     << QSqlField("timeslot_duration", QVariant::Int)
     << QSqlField("active", QVariant::Bool)
     << QSqlField("url", QVariant::String)
-    << QSqlField("map", QVariant::String)
     );
 
 QString const Conference::sTableName = QString("conference");
index 1d704390a3562e75b5dc325f271b1c32253ee31b..c9ae184e406f1d85d6e681d0ad7bf53fea2551e4 100644 (file)
@@ -51,7 +51,6 @@ public:
     int timeslotDuration() const { return value("timeslot_duration").toInt(); } // in seconds
     bool isActive() const { return value("active").toBool(); }
     QString url() const { return stringFromNullable(value("url")); }
-    QString map() const { return stringFromNullable(value("map")); }
 
     #if 0
     void setId(int id) { setValue("id", id); }
index d14daa2518c4824ddec43cc072d3bc0cc6b6dba0..1178a4fb562f27cd7e18e141a159ce983cc69e69 100644 (file)
@@ -55,14 +55,15 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         return;
 
     painter->save();
-    QColor bkgrColor = Qt::cyan;
+    QColor bkgrColor = option.palette.color(QPalette::Background);
     //QColor bkgrColor = QColor(0xAA,0xAA,0xAA);
     QColor conflictColor = Qt::yellow;
 
-    QPen borderPen(bkgrColor.darker());
+    QColor textColor = option.palette.color(QPalette::Text);
+    QPen borderPen(textColor);
     if(hasParent(index))
     {
-        // entry horisontal layout:
+        // entry horizontal layout:
         // * spacer (aka y position of image)
         // * image
         // * rest is text, which is 1 line of title with big letters and 2 lines of Presenter and Track
@@ -95,11 +96,8 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
             bkgrColor = conflictColor;
 
         QLinearGradient itemGradient(option.rect.topLeft(), option.rect.bottomLeft());
-        itemGradient.setColorAt(0.0, Qt::white);
-        itemGradient.setColorAt(0.25, bkgrColor);
-        itemGradient.setColorAt(0.5, bkgrColor);
-        itemGradient.setColorAt(0.75, bkgrColor);
-        itemGradient.setColorAt(1.0, Qt::white);
+        itemGradient.setColorAt(0.0, bkgrColor);
+        itemGradient.setColorAt(1.0, bkgrColor);
 
         if(isLast(index))
         {
@@ -113,8 +111,9 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
 
             //painter->setBrush( bkgrColor );
             painter->setBrush(itemGradient);
-            painter->setPen(borderPen);
+            painter->setPen(Qt::NoPen);
             painter->drawPath(endPath);
+            painter->setPen(borderPen);
 
             painter->setFont(option.font);
         }
@@ -126,9 +125,11 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
             painter->drawRect(option.rect);
 
             painter->setPen(borderPen);
+            /*
             // vertical lines
             painter->drawLine(option.rect.topLeft(), option.rect.bottomLeft());
             painter->drawLine(option.rect.topRight(), option.rect.bottomRight());
+            */
             // horizontal lines
             painter->drawLine(option.rect.bottomLeft(), option.rect.bottomRight());
 
@@ -149,8 +150,6 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         else
             mControls[AlarmControlOff]->paint(painter, option.rect);
 #endif
-        if (event->room()->hasMap())
-            mControls[MapControl]->paint(painter, option.rect);
         if(event->hasTimeConflict())
             mControls[WarningControl]->paint(painter, option.rect);
 
@@ -205,9 +204,9 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         int spacer = (fmSmall.boundingRect("999").width() < SPACER) ? SPACER : fmSmall.boundingRect("999").width();
 
         QLinearGradient titleGradient(option.rect.topLeft(), option.rect.topRight());
-        //titleGradient.setColorAt(0.0, Qt::white);
+        bkgrColor = option.palette.color(QPalette::Highlight);
+        textColor = option.palette.color(QPalette::HighlightedText);
         titleGradient.setColorAt(0.0, bkgrColor);
-        titleGradient.setColorAt(0.5, Qt::white);
         titleGradient.setColorAt(1.0, bkgrColor);
 
         QPainterPath titlePath;
@@ -238,7 +237,9 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         painter->setPen(borderPen);
         painter->drawPath(titlePath);
 
-        // draw icons 
+        // draw icons
+        borderPen.setColor(textColor);
+        painter->setPen(borderPen);
         painter->setFont(fontSmall);
         QImage *image = mControls[FavouriteControlOn]->image();
         QPoint drawPoint =
@@ -375,19 +376,11 @@ void Delegate::defineControls()
     // off
     mControls.insert(AlarmControlOff,
                     new Control(AlarmControlOff, QString(":icons/appointment-soon-off.png"), mControls[FavouriteControlOff]));
-
-    // MAP ICON
-    mControls.insert(MapControl,
-                    new Control(MapControl, QString(":icons/applications-internet.png"), mControls[AlarmControlOn]));
-#else
-    // MAP ICON
-    mControls.insert(MapControl,
-                    new Control(MapControl, QString(":icons/applications-internet.png"), mControls[FavouriteControlOn]));
 #endif
 
     // WARNING ICON
     mControls.insert(WarningControl,
-                    new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[MapControl]));
+                    new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[FavouriteControlOn]));
 }
 
 bool Delegate::isPointFromRect(const QPoint &aPoint, const QRect &aRect) const
index 5f4428eea1c1109b35420103297ce91de83fe3be..f24bea36e91b8b9b454af9af9a84a5e178193552 100644 (file)
@@ -37,7 +37,6 @@ class Delegate : public QItemDelegate
             FavouriteControlOff,
             AlarmControlOn,
             AlarmControlOff,
-            MapControl,
             WarningControl
         };
 
index b70cf7aaa27ed8770188824a9ca64b1efd25bb6d..76a3443c7e969f9ddc695200adf35867c6eea3ec 100644 (file)
@@ -220,14 +220,23 @@ void Event::setLinks(const QMap<QString,QString> &aLinks)
     // TODO: implement
 }
 
-QList<Event> Event::getSearchResultByDate(const QDate& date, int conferenceId, QString orderBy)
-{
+QList<Event> Event::getSearchResultByDate(const QDate& date, int conferenceId, QString orderBy) {
+    QList<Event> list;
+
+    // Check whether the temporary table SEARCH_EVENT exists (http://www.sqlite.org/faq.html#q7)
+    QSqlQuery query("SELECT count(*) FROM sqlite_temp_master WHERE type='table' and name='SEARCH_EVENT'");
+    if (!query.exec()) {
+        qDebug() << "SQL Error: " << query.lastError().text();
+        return list;
+    }
+    query.first();
+    QVariant v = query.value(0);
+    if (v.toInt() != 1) return list;
+
     QString strQuery = QString("SELECT %1 FROM EVENT INNER JOIN SEARCH_EVENT USING (xid_conference, id) ").arg(columnsForSelect());
     strQuery += QString("WHERE xid_conference = :conf AND start >= :start AND start < :end ORDER BY %1").arg(orderBy);
-
-    QList<Event> list;
-    QSqlQuery query;
-    try{
+    query = QSqlQuery();
+    try {
         if( !query.prepare( strQuery ) ){
             qDebug() << "QSqlQuery.prepare error";
             throw OrmSqlException( query.lastError().text() );
index 052a168fab63e61fbf01c8dcd513e2b9677b5cfc..e07d70cefd47fc92186a510340484b6eb20bf123 100644 (file)
@@ -18,7 +18,7 @@ maemo {
         -lalarm
     INCLUDEPATH += ../alarm
     DEPENDPATH += ../alarm
-    TARGETDEPS += $$DESTDIR/libqalarm.a
+    POST_TARGETDEPS += $$DESTDIR/libqalarm.a
 }
 HEADERS += event.h \
     conference.h \
index 41cd35e5d1d277402e67b1a2382d529a18ff2665..b0a455e3c1f366b3dffd75278bfd066501052b3f 100644 (file)
 #include "room.h"
 
 QString const Room::sTableName = QString("room");
-int const Room::sTableColCount = 3;
+int const Room::sTableColCount = 2;
 const QString Room::NAME = "name";
 
 QSqlRecord const Room::sColumns = Room::toRecord(QList<QSqlField>()
     << QSqlField("id", QVariant::Int)
-    << QSqlField(NAME, QVariant::String)
-    << QSqlField("picture", QVariant::String));
+    << QSqlField(NAME, QVariant::String));
 
 Room Room::retrieveByName(QString name)
 {
index 2710c24208cf5343e1522907e4a68e31b3682fbf..93c132f2a14e7d45d6d773733e65e9145487d97a 100644 (file)
@@ -35,14 +35,6 @@ public:
     void setId(int id) { setValue("id", id); }
     QString name() const { return value("name").toString(); }
     void setName(const QString & type) { setValue("name", type); }
-    // TODO: make naming consistent - either "picture" or "map"
-    QVariant map() const { return value("picture"); }
-    bool hasMap() const
-    {
-        // empty strings also treasted as NULL,
-        // as storing NULLs requires rewrite of storing code and DB scheme
-        return !isNull("picture") and !value("picture").toString().isEmpty();
-    }
     int insert();
 public:
     static QList<Room> getAll();
index 956e49f0f78966ac0ede952a6ca56ebac6e31ac1..151fd8a697915c9f0775d387e5700b47e7feddad 100644 (file)
@@ -125,13 +125,6 @@ bool TreeView::testForControlClicked(const QModelIndex &aIndex, const QPoint &aP
                 handled = true;
             }
             break;
-        case Delegate::MapControl:
-            {
-                // handle Alarm Control clicked
-                emit(requestForMap(aIndex));
-                handled = true;
-            }
-        break;
         case Delegate::WarningControl:
         {
 
index 04138503e6464ef255b4e39e874446471d29283d..888b6f75b9d0d44db4fff138893907231135856d 100644 (file)
@@ -36,7 +36,6 @@ public slots:
 private slots:
     void handleItemClicked(const QModelIndex &index);
 signals:
-    void requestForMap(const QModelIndex &aIndex);
     void requestForConflicts(const QModelIndex &aIndex);
     void eventHasChanged(int aEventId, bool aReloadModel = false); // emited when user changes some event details, eg. sets it Favourite
 };
index dadfa6a7fe420206eeb5285d8f7f29494915e3ee..bfea3a464d2b2b8321fa0d1f971c5b20c32125d1 100644 (file)
@@ -103,7 +103,6 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
                         room["name"] = roomElement.attribute("name");
                         room["event_id"] = eventElement.attribute("id");
                         room["conference_id"] = QString::number(confId,10);
-                        room["picture"] = ""; // TODO: implement some mapping to assign correct picture to specified room_name
                         SqlEngine::addRoomToDB(room);
 
                         // process event's nodes
index f85d1f6cbcc9a521d7806be86e0eccdc3b11cc34..2d82f7cea6db657e7d5022b8424fdfcdb172a4ee 100644 (file)
@@ -67,8 +67,6 @@ QString SqlEngine::login(const QString &aDatabaseType, const QString &aDatabaseN
         database.open();
     }
 
-    checkConferenceMap(database);
-
     //LOG_INFO(QString("Opening '%1' database '%2'").arg(aDatabaseType).arg(aDatabaseName));
 
     return result ? QString() : database.lastError().text();
@@ -256,10 +254,9 @@ void SqlEngine::addRoomToDB(QHash<QString,QString> &aRoom)
         else // ROOM record doesn't exist yet, need to create it
         {
             query = QSqlQuery(db);
-            query.prepare("INSERT INTO ROOM (xid_conference,name,picture) VALUES (:xid_conference, :name, :picture)");
+            query.prepare("INSERT INTO ROOM (xid_conference,name,picture) VALUES (:xid_conference, :name, '')");
             query.bindValue(":xid_conference", aRoom["conference_id"]);
             query.bindValue(":xid_name", aRoom["name"]);
-            query.bindValue(":xid_picture", aRoom["picture"]);
             if (!query.exec()) qDebug() << "Could not execute 'insert into room ...' query." << query.lastError();
             aRoom["id"]= query.lastInsertId().toString(); // 'id' is assigned automatically
             //LOG_AUTOTEST(query);
@@ -302,10 +299,10 @@ int SqlEngine::searchEvent(int aConferenceId, const QHash<QString,QString> &aCol
     // DROP
     execQuery( db, "DROP TABLE IF EXISTS SEARCH_EVENT");
     // CREATE
-    execQuery( db, "CREATE TABLE SEARCH_EVENT ( xid_conference INTEGER  NOT NULL, id INTEGER NOT NULL )");
+    execQuery( db, "CREATE TEMP TABLE SEARCH_EVENT ( xid_conference INTEGER  NOT NULL, id INTEGER NOT NULL )");
     // INSERT
     QString sql = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id ) "
-                "SELECT EVENT.xid_conference, EVENT.id FROM EVENT ");
+                "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 ) ";
@@ -316,19 +313,28 @@ int SqlEngine::searchEvent(int aConferenceId, const QHash<QString,QString> &aCol
     }
     sql += QString("WHERE EVENT.xid_conference = %1 AND (").arg( aConferenceId );
 
-    foreach (QString table, aColumns.uniqueKeys()){
-        foreach (QString column, aColumns.values(table)){
-            sql += QString("%1.%2 LIKE '\%' || :%1%2 || '\%' OR ").arg( table, column );
+    QStringList searchKeywords = aKeyword.trimmed().split(QRegExp("\\s+"));
+    QStringList whereAnd;
+    for (int i=0; i < searchKeywords.count(); i++) {
+        QStringList whereOr;
+        foreach (QString table, aColumns.uniqueKeys()) {
+            foreach (QString column, aColumns.values(table)){
+                 whereOr.append(QString("%1.%2 LIKE '\%' || :%1%2%3 || '\%'").arg(table).arg(column).arg(i));
+            }
         }
+        whereAnd.append(whereOr.join(" OR "));
     }
-    sql.chop( QString(" OR ").length() );
+    sql += whereAnd.join(") AND (");
     sql += QString(")");
 
     QSqlQuery query(db);
     query.prepare(sql);
-    foreach (QString table, aColumns.uniqueKeys()){
-        foreach (QString column, aColumns.values(table)){
-            query.bindValue(QString(":%1%2").arg(table, column), aKeyword );
+    for (int i = 0; i != searchKeywords.size(); ++i) {
+        QString keyword = searchKeywords[i];
+        foreach (QString table, aColumns.uniqueKeys()) {
+            foreach (QString column, aColumns.values(table)) {
+                query.bindValue(QString(":%1%2%3").arg(table).arg(column).arg(i), keyword );
+            }
         }
     }
 
@@ -401,13 +407,3 @@ bool SqlEngine::execQueryWithParameter(QSqlDatabase &aDatabase, const QString &a
     }
     return true;
 }
-
-void SqlEngine::checkConferenceMap(QSqlDatabase &aDatabase)
-{
-    QSqlQuery sqlQuery(aDatabase);
-    sqlQuery.prepare("SELECT map FROM conference");
-    if (!sqlQuery.exec()) {
-        qWarning() << "column conference.map is missing; adding";
-        execQuery(aDatabase, "ALTER TABLE conference ADD COLUMN map VARCHAR");
-    }
-}
index 01d14b8b7aa8b810efc6f553facd6b9f1d7b61ca..c10f3a22ab682cf9f1abf5a8d9e8936b33187d34 100644 (file)
@@ -48,8 +48,6 @@ class SqlEngine : public QObject
         static QString login(const QString &aDatabaseType, const QString &aDatabaseName);
         static bool execQuery(QSqlDatabase &aDatabase, const QString &aQuery);
         static bool execQueryWithParameter(QSqlDatabase &aDatabase, const QString &aQuery, const QHash<QString, QVariant>& params);
-
-        static void checkConferenceMap(QSqlDatabase &aDatabase);
 };
 
 #endif /* SQLENGINE_H */
index df5a9341e578b9ac84e5bffb03198c01cf603935..0eb62b56cdfe0d38af0de8d0ef795b3d96637caf 100644 (file)
@@ -8,7 +8,7 @@ QT += sql
 LIBS += -L$$DESTDIR -lgui -lmvc
 INCLUDEPATH += ../gui ../mvc ../orm
 DEPENDPATH += . ../gui ../mvc ../orm
-TARGETDEPS += $$DESTDIR/libmvc.a $$DESTDIR/libgui.a $$DESTDIR/liborm.a
+POST_TARGETDEPS += $$DESTDIR/libmvc.a $$DESTDIR/libgui.a $$DESTDIR/liborm.a
 
 SOURCES += main.cpp \
     mvc/EventTest.cpp