#include <conference.h>
#include <track.h>
+const QString EventModel::COMMA_SEPARATOR = ", ";
+
EventModel::EventModel()
{
mEvents.clear();
if(Conference::getAll().count())
{
qDebug() << "Loading Conference Data: [" << Conference::getById(aConferenceId).title() << "] " << aDate;
- mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start");
+ mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, Event::START);
}
createTimeGroups();
}
createTimeGroups();
}
+void EventModel::loadSearchResultEvents(const QDate &aDate, int aConferenceId)
+{
+ clearModel();
+ // check for existence of the conference in the DB
+ if(Conference::getAll().count())
+ {
+ qDebug() << "Loading search result Data: [" << Conference::getById(aConferenceId).title() << "] " << aDate;
+ mEvents = Event::getSearchResultByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId, "start");
+ }
+ createTimeGroups();
+}
+
void EventModel::loadEventsByTrack(const QDate &aDate, int aConferenceId)
{
clearModel();