}
+void DayNavigatorWidget::unsetDates() {
+ mStartDate= QDate();
+ mEndDate = QDate();
+ mCurDate = QDate();
+
+ configureNavigation();
+ emit(dateChanged(mCurDate));
+ this->update();
+}
+
+
void DayNavigatorWidget::configureNavigation() {
prevDayButton->setDisabled(!mStartDate.isValid() || mCurDate == mStartDate);
nextDayButton->setDisabled(!mEndDate.isValid() || mCurDate == mEndDate);
void setDates(const QDate &aStartDate, const QDate &aEndDate);
void setCurDate(const QDate& curDate);
QDate curDate() const {return mCurDate;}
+ void unsetDates();
protected:
void paintEvent(QPaintEvent *);
void configureNavigation();
clearTabs();
}
- // TODO: open conferences at startup?
- #if 0
- if(!confCount)
- tabWidget->setCurrentIndex(6); // 6 - conference tab
- }
- #endif
-
// open dialog for given Event ID
// this is used in case Alarm Dialog request application to start
if(aEventId)
searchTabContainer->setDates(startDate, endDate);
searchTabContainer->searchAgainClicked();
nowTabContainer->updateTreeView(QDate::currentDate());
+ dayNavigator->setDates(startDate, endDate);
}
}
void MainWindow::unsetConference()
{
clearTabs();
+ dayNavigator->unsetDates();
setWindowTitle(saved_title);
}
treeView->setModel(new EventModel());
treeView->setItemDelegate(new Delegate(treeView));
- connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &)));
+ // connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &)));
connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));