From: korrco Date: Mon, 18 Jan 2010 18:15:41 +0000 (+0000) Subject: grouping by time equation changed - beter group deviding, also according to favourites X-Git-Tag: 0.5.0~285 X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/commitdiff_plain/a35aa83bb2ac9c0585eb2a7c09289f7ffc9596e4 grouping by time equation changed - beter group deviding, also according to favourites --- diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index d068c74..b527e48 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -120,7 +120,10 @@ void MainWindow::importSchedule() { int confId = 1; // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates - dayNavigator->setDates(Conference::getById(confId).start(), Conference::getById(confId).end()); + QDate aStartDate = Conference::getById(confId).start(); + QDate aEndDate = Conference::getById(confId).end(); + dayNavigator->setDates(aStartDate, aEndDate); + activityDayNavigator->setDates(aStartDate, aEndDate); } } @@ -172,24 +175,3 @@ void MainWindow::updateActivitiesDayView(const QDate &aDate) activityDayTreeView->reset(); activityDayNavigator->show(); } - -void MainWindow::updateView(int tabIndex) -{ - //TODO korinpa: change to enum or names ? - qDebug() << "updateView index: " << tabIndex; - if (tabIndex == 0) - { - QDate date = dayNavigator->getCurrentDate(); - updateDayView(date); - } - else if (tabIndex == 1) - { - updateFavView(); - } - else if (tabIndex == 2) - { - QDate date = activityDayNavigator->getCurrentDate(); - updateActivitiesDayView(date); - } -} - diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 4c1c483..20e72a8 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -22,7 +22,6 @@ private slots: void updateFavView(); /*void updateFavViewComplete();*/ void updateActivitiesDayView(const QDate &aDate); - void updateView(int tabIndex); private: SqlEngine *mSqlEngine; ScheduleXmlParser *mXmlParser; diff --git a/src/mvc/eventmodel.cpp b/src/mvc/eventmodel.cpp index d41aab8..2753223 100644 --- a/src/mvc/eventmodel.cpp +++ b/src/mvc/eventmodel.cpp @@ -27,7 +27,7 @@ void EventModel::createTimeGroups() { QTime eventTime = mEvents.at(i).start().time(); - if (nextGroupTime < eventTime) + if (nextGroupTime <= eventTime) { mGroups.last().mChildCount = i - mGroups.last().mFirstEventIndex; mGroups << EventModel::Group(QString("%1 - %2").arg(nextGroupTime.toString("HH:mm"),