From d1fb9ee8f1f72d595b2e086a638799dc098560c3 Mon Sep 17 00:00:00 2001 From: korrco Date: Wed, 20 Jan 2010 13:18:49 +0000 Subject: [PATCH] activities viewed ordered by activity id and start time --- src/gui/mainwindow.cpp | 2 +- src/mvc/eventmodel.cpp | 4 +++- src/mvc/eventmodel.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 4abb672..241cf9f 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -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 &))); diff --git a/src/mvc/eventmodel.cpp b/src/mvc/eventmodel.cpp index cefea46..498677c 100644 --- a/src/mvc/eventmodel.cpp +++ b/src/mvc/eventmodel.cpp @@ -2,6 +2,8 @@ #include #include +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(); } diff --git a/src/mvc/eventmodel.h b/src/mvc/eventmodel.h index 962d130..55c3840 100644 --- a/src/mvc/eventmodel.h +++ b/src/mvc/eventmodel.h @@ -7,6 +7,8 @@ class EventModel : public QAbstractItemModel { +public: + static const QString COMMA_SEPARATOR; public: EventModel(); QVariant data(const QModelIndex& index, int role) const; -- 2.39.5