[svn-upgrade] new version confclerk (0.5.3) upstream/0.5.3
authorgregor herrmann <gregoa@debian.org>
Tue, 16 Aug 2011 21:50:59 +0000 (21:50 -0000)
committergregor herrmann <gregoa@debian.org>
Tue, 16 Aug 2011 21:50:59 +0000 (21:50 -0000)
17 files changed:
ChangeLog
NEWS
README
data/confclerk.1
data/confclerk.png
data/confclerk.pod
src/alarm/alarm.pro
src/global.pri
src/gui/about.ui
src/gui/conferenceeditor.cpp
src/gui/daynavigatorwidget.cpp
src/gui/daynavigatorwidget.h
src/gui/daynavigatorwidget.ui
src/icons.qrc
src/icons/today.png [new file with mode: 0644]
src/sql/schedulexmlparser.cpp
src/sql/sqlengine.cpp

index 82fd1567165dd65d27fa60081fdeb2c2070fb424..8d6fb43df1e658f90fc8e7c9975cfd210d7d51f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,49 @@
+2011-08-16  gregoa
+
+       * NEWS: Remove "TODO" from NEWS, a.k.a. prepare for release
+
+2011-08-15  gregoa
+
+       * NEWS: Update NEWS.
+       * src/gui/daynavigatorwidget.cpp, src/gui/daynavigatorwidget.ui:
+         Improve day navigator widget.
+         
+         (Still black magic, now even with #ifdefs :/)
+       * src/sql/sqlengine.cpp: .isEmpty() feels more Qtish then == ""
+       * src/gui/conferenceeditor.cpp: Only add ", $venue" to conference
+         location when $venue is not empty.
+       * src/gui/conferenceeditor.cpp: ISO formatting of conference dates
+         in conferenceeditor.
+       * src/sql/sqlengine.cpp: Quick fix for ticket: #32: if the schedule
+         XML doesn't contain a city, we put "n/a" there.
+         
+         In the long run we might want to find a system for changing the
+         database scheme; too bad sqlite has only limited ALTER TABLE
+         support.
+       * src/sql/schedulexmlparser.cpp: emit the parsingScheduleBegin()
+         signal earlier, so we get the progressbar a bit earlier (cf.
+         ticket #25)
+       * README, data/confclerk.pod, src/gui/about.ui: mention FrOSCon as
+         an example (although it's not working at the moment, cf. #32)
+
+2011-07-24  gregoa
+
+       * src/gui/conferenceeditor.cpp: Use "-" in start-end. Closes: #30
+       * src/gui/daynavigatorwidget.cpp: Shift date text up by icon/2 in
+         order to re-center the text. More or less at least.
+       * NEWS, src/gui/daynavigatorwidget.cpp,
+         src/gui/daynavigatorwidget.h, src/gui/daynavigatorwidget.ui,
+         src/icons.qrc, src/icons/today.png: Add today button to date
+         navigator. TODO: date is not centered between prev/next arrows
+         anymore.
+         
+         Cf. #29
+
 2011-07-23  gregoa
 
+       * src/alarm/alarm.pro: Make sure to remove src/bin/libqalarm.a on
+         make clean.
+       * NEWS, src/global.pri: bump version after release
        * NEWS: Prepare NEWS before release of 0.5.2.
        * src/sql/sqlengine.cpp: Remove conference/room records
          unconditionally from EVENT_ROOMS
diff --git a/NEWS b/NEWS
index b19dcbb1c23631fe0416ede734196ddf7e0ab455..00677a0be6a9a45a7b8fc0f6d3caae4bc8f24249 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,15 @@
 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.3
+* Add "jump to today" button to date navigator.
+  Thanks to Michael Schutte for the patch.
+  Fixes: #29
+* Don't die on importing a schedule that does not contain
+  a city field.
+  Thanks to Axel Beckert for the bug report.
+  Fixes: #32
+
 Version 0.5.2, 2011-07-23
 * Show close button in conference dialog also if there are no conferences
   yet.
diff --git a/README b/README
index 242ea507c4e238dd9739e63df95f384ea4f82810..51ade6c8c858a25634b80aa5f435ccee4edb5958 100644 (file)
--- a/README
+++ b/README
@@ -11,8 +11,8 @@ 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.
+the PentaBarf conference management system used by e.g. FOSDEM, DebConf,
+FrOSCon, and the CCC.
 
 ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
@@ -128,3 +128,4 @@ Tested pentabarf instances:
 - 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
+- FrOSCon (2011): http://programm.froscon.org/2011/schedule.xml
index b21d5aac8a67af27eb20d3d29402946576030c68..1eb4cb75e657fafb2a5dda4439041c4e300d024a 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.16)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -62,7 +62,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONFCLERK 1"
-.TH CONFCLERK 1 "2011-07-22" "Version 0.5.2" "Offlince conference scheduler"
+.TH CONFCLERK 1 "2011-08-15" "Version 0.5.3" "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
@@ -80,9 +80,9 @@ 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.
 .PP
-At the moment \fBConfClerk\fR is able to import schedules in \s-1XML\s0 format created by
-the PentaBarf conference management system used by e.g. \s-1FOSDEM\s0, DebConf, and
-the \s-1CCC\s0.
+At the moment \fBConfClerk\fR is able to import schedules in \s-1XML\s0 format created
+by the PentaBarf conference management system used by e.g. \s-1FOSDEM\s0, DebConf,
+FrOSCon, and the \s-1CCC\s0.
 .PP
 ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
index c9a8084542c3132dcf1abdfd0ea6cfe6cd76163a..9e681a97ca6232adaa1a1702ed0f93ed8c10f0dc 100644 (file)
Binary files a/data/confclerk.png and b/data/confclerk.png differ
index 664c348661e6b028c51588eb1f48c29e38919bc7..2e5bbd3f566ccf78571654a5348c826ea6fd8d9c 100644 (file)
@@ -16,9 +16,9 @@ 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 B<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.
+At the moment B<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.
 
 ConfClerk is targetted at mobile devices like the Nokia N810 and N900 but
 works on any sytem running Qt.
index 0db75aa0610cb7deac47d03be72aa3764b7e3fc7..b83a288e1145939664f0f633e5bb2a3ca02b9010 100644 (file)
@@ -3,6 +3,7 @@ TARGET = qalarm
 DESTDIR = ../bin
 CONFIG += static qdbus 
 QT += sql dbus
+QMAKE_CLEAN += ../bin/libqalarm.a
 
 # module dependencies
 LIBS += -lalarm
index f5af156ee49c641efd23eb1e7b03a7b0232c2371..55a06e5495c745777d07df21ce0fe120a8c2a42e 100644 (file)
@@ -4,7 +4,7 @@
 # USAGE: include(./global.pri)
 
 # VERSION
-VERSION = 0.5.2
+VERSION = 0.5.3
 DEFINES += VERSION=\\\"$$VERSION\\\"
 
 # Define 'MAEMO' specific CONFIG/DEFINE
index a812c93e4b3014a455c14f40258d78c0e1aa7544..95b5fc08a9dd5c10c54f6f64826861fabb93107c 100644 (file)
@@ -131,7 +131,7 @@ 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, 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, 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: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;
index ac7b08e40ccd8aec27ef4d242afde3c94c1fe55b..910a7d09deecd0aa1f7027f87c401e98546fd908 100644 (file)
@@ -89,11 +89,11 @@ void ConferenceEditor::itemSelected(const QModelIndex& current, const QModelInde
 
         conferenceTitle->setText(conf.title());
         conferenceSubtitle->setText(conf.subtitle());
-        conferenceWhere->setText(conf.city() + ", " + conf.venue());
+        conferenceWhere->setText(conf.city() + (!conf.venue().isEmpty() ? ", " + conf.venue() : ""));
         conferenceWhen->setText(
-                conf.start().toString("dd-MM-yyyy")
-                + ", " +
-                conf.end().toString("dd-MM-yyyy"));
+                conf.start().toString("yyyy-MM-dd")
+                + " - " +
+                conf.end().toString("yyyy-MM-dd"));
         conferenceInfo->setCurrentIndex(0);
         removeBtn->show();
     }
index 07d13bc5fc5873829fa2d773c0ad706289ab4730..8db754df4df2df7d2923214ec00c84b6ba3622dc 100644 (file)
@@ -34,6 +34,7 @@ DayNavigatorWidget::DayNavigatorWidget(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());
 }
@@ -63,24 +64,28 @@ void DayNavigatorWidget::setDates(const QDate &aStartDate, const QDate &aEndDate
     }
 }
 
+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);
-        // 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);
-
+        configureNavigation();
         emit(dateChanged(mCurDate));
-        selectedDate->update();
+        this->update();
     }
 }
 
@@ -89,19 +94,21 @@ void DayNavigatorWidget::nextDayButtonClicked()
     if(mCurDate<mEndDate)
     {
         mCurDate = mCurDate.addDays(1);
-        // 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);
+        configureNavigation();
+        emit(dateChanged(mCurDate));
+        this->update();
+    }
+}
 
+void DayNavigatorWidget::todayButtonClicked()
+{
+    QDate targetDate = QDate::currentDate();
+    if (targetDate>mStartDate && targetDate<mEndDate)
+    {
+        mCurDate = targetDate;
+        configureNavigation();
         emit(dateChanged(mCurDate));
-        selectedDate->update();
+        this->update();
     }
 }
 
@@ -112,8 +119,27 @@ void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
     QString selectedDateStr = mCurDate.toString("dddd\nyyyy-MM-dd");
     QPainter painter(this);
     painter.save();
-    QRect q(y()-height(), x(), height(), width());
+
+    // 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
     painter.rotate(270);
+
+    // font size adjustion, static on maemo, dynamically otherwise
+    QFont f = painter.font();
+#ifdef MAEMO
+    qreal factor = 0.8;
+#else
+    qreal factor = (qreal) 2 * q.width() / painter.fontMetrics().width(selectedDateStr);
+#endif
+    if (factor < 1) f.setPointSizeF(f.pointSizeF() * factor);
+    painter.setFont(f);
+
     painter.drawText(q, Qt::AlignCenter, selectedDateStr);
     painter.restore();
 }
index da5846dcd5e028d978020ceff2c9ef68877a9056..d4ddcea0ad2da1d06ec1bd9bdf08e9ed20259749 100644 (file)
@@ -79,7 +79,9 @@ class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget
         void setDates(const QDate &aStartDate, const QDate &aEndDate);
     protected:
         void paintEvent(QPaintEvent *);
+        void configureNavigation();
     private slots:
+        void todayButtonClicked();
         void prevDayButtonClicked();
         void nextDayButtonClicked();
     signals:
index cd4f9dc5ee601e1acf18bd6d453c57f95613de54..255790a96bc3f036cd85b0ef54dd52eda9f59f14 100644 (file)
@@ -25,6 +25,9 @@
   <layout class="QGridLayout" name="gridLayout">
    <item row="1" column="0">
     <layout class="QVBoxLayout" name="verticalLayout">
+     <property name="spacing">
+      <number>0</number>
+     </property>
      <item>
       <widget class="QToolButton" name="nextDayButton">
        <property name="text">
        </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>
    </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="../icons.qrc"/>
+ </resources>
  <connections/>
  <slots>
   <slot>prevDayButtonClicked()</slot>
   <slot>nextDayButtonClicked()</slot>
+  <slot>todayButtonClicked()</slot>
  </slots>
 </ui>
index 8f472eda7afcbeed7b2c380fe82900eca5aea53e..193c23f36379a2eacd2158a12037d3acbff17b1f 100644 (file)
@@ -9,5 +9,6 @@
     <file>icons/emblem-new.png</file>
     <file>icons/dialog-warning.png</file>
     <file>icons/search.png</file>
+    <file>icons/today.png</file>
   </qresource>
 </RCC>
diff --git a/src/icons/today.png b/src/icons/today.png
new file mode 100644 (file)
index 0000000..cec3de3
Binary files /dev/null and b/src/icons/today.png differ
index bfea3a464d2b2b8321fa0d1f971c5b20c32125d1..cd515c667cb135475153da5591554bfe821cfcd2 100644 (file)
@@ -52,6 +52,7 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
         QDomElement conferenceElement = scheduleElement.firstChildElement("conference");
         if (!conferenceElement.isNull())
         {
+            emit(parsingScheduleBegin());
             QHash<QString,QString> conference;
             conference["id"] = QString::number(0); // conference ID is assigned automatically, or obtained from the DB
             conference["title"] = conferenceElement.firstChildElement("title").text();
@@ -67,7 +68,6 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, const QString& url)
             SqlEngine::addConferenceToDB(conference);
             confId = conference["id"].toInt();
             conference_title = conference["title"];
-            emit(parsingScheduleBegin());
         }
 
         // we need to get count of all events in order to emit 'progressStatus' signal
index 9ee08ae7fa6865acef827a3bd8d203d5b97606b0..a8b32e9f1c3d22f240e613e16e11ebc90c0e77ae 100644 (file)
@@ -109,6 +109,11 @@ void SqlEngine::addConferenceToDB(QHash<QString,QString> &aConference)
 
         if(!confId) // conference 'aConference' isn't in the table => insert
         {
+            // HACK
+            // When city is empty, assign a dummy value. We probably want to find a way to change the database scheme ...
+            // cf. #32
+            if (aConference["city"].isEmpty()) aConference["city"] = "n/a";
+
             QSqlQuery query(db);
             query.prepare("INSERT INTO CONFERENCE (title,url,subtitle,venue,city,start,end,days,"
                                                     "day_change,timeslot_duration,active) "