activities viewed ordered by activity id and start time
authorkorrco <korrco@localhost>
Wed, 20 Jan 2010 13:18:49 +0000 (13:18 +0000)
committerkorrco <korrco@localhost>
Wed, 20 Jan 2010 13:18:49 +0000 (13:18 +0000)
src/gui/mainwindow.cpp
src/mvc/eventmodel.cpp
src/mvc/eventmodel.h

index 4abb672..241cf9f 100644 (file)
@@ -39,7 +39,7 @@ MainWindow::MainWindow(QWidget *parent)
     connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int)));
     statusBar()->showMessage(tr("Ready"));
 
-    //create activity map
+    //update activity map
     Activity::updateActivityMap();
 
     connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
index cefea46..498677c 100644 (file)
@@ -2,6 +2,8 @@
 #include <conference.h>
 #include <activity.h>
 
+const QString EventModel::COMMA_SEPARATOR = ", ";
+
 EventModel::EventModel()
 {
     mEvents.clear();
@@ -188,7 +190,7 @@ void EventModel::loadEventsByActivities(const QDate &aDate, int aConferenceId)
     if(Conference::getAll().count())
     {
         qDebug() << "Loading Conference Data (by Activities): [" << Conference::getById(aConferenceId).title() << "] " << aDate;
-        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, Event::XID_ACTIVITY);
+        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, Event::XID_ACTIVITY + COMMA_SEPARATOR + Event::START);
     }
     createActivityGroups();
 }
index 962d130..55c3840 100644 (file)
@@ -7,6 +7,8 @@
 
 class EventModel : public QAbstractItemModel
 {
+public:
+    static const QString COMMA_SEPARATOR;
 public:
     EventModel();
     QVariant data(const QModelIndex& index, int role) const;