Changeset bf6be88


Ignore:
Timestamp:
09/21/11 22:30:03 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
1825f82
Parents:
66ec7cb
Message:

The dateChanged signal is transmitted to the tabcontainers now.

Location:
src/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/gui/daynavigatorwidget.cpp

    r66ec7cb rbf6be88  
    3030    connect(nextDayButton, SIGNAL(clicked()), SLOT(nextDayButtonClicked()));
    3131    connect(todayButton, SIGNAL(clicked()), SLOT(todayButtonClicked()));
     32
     33    configureNavigation();
    3234}
    3335
     
    7173
    7274void DayNavigatorWidget::configureNavigation() {
    73     prevDayButton->setDisabled(mCurDate == mStartDate);
    74     nextDayButton->setDisabled(mCurDate == mEndDate);
     75    prevDayButton->setDisabled(!mStartDate.isValid() || mCurDate == mStartDate);
     76    nextDayButton->setDisabled(!mEndDate.isValid() || mCurDate == mEndDate);
    7577}
    7678
     
    103105    Q_UNUSED(aEvent);
    104106
    105     QString selectedDateStr = mCurDate.toString("dddd\nyyyy-MM-dd");
     107    QString selectedDateStr = mCurDate.isValid() ? mCurDate.toString("dddd\nyyyy-MM-dd") : tr("No date");
    106108    QPainter painter(this);
    107109    painter.save();
  • src/gui/mainwindow.cpp

    r66ec7cb rbf6be88  
    9292    connect(searchTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    9393
     94    // date has changed
     95    connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(setCurDate(QDate)));
     96    connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(setCurDate(QDate)));
     97    connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(setCurDate(QDate)));
     98    connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(setCurDate(QDate)));
     99    connect(dayNavigator, SIGNAL(dateChanged(QDate)), nowTabContainer, SLOT(setCurDate(QDate)));
     100    connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(setCurDate(QDate)));
     101
    94102    connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp()));
    95103    connect(settingsAction, SIGNAL(triggered()), SLOT(setup()));
  • src/gui/tabcontainer.cpp

    r66ec7cb rbf6be88  
    112112}
    113113
     114
     115void TabContainer::setCurDate(const QDate& curDate) {
     116    updateTreeView(curDate);
     117}
     118
     119
    114120void TabContainer::setDates(const QDate &aStart, const QDate &aEnd)
    115121{
  • src/gui/tabcontainer.h

    r66ec7cb rbf6be88  
    4646public slots:
    4747    virtual void updateTreeViewModel(int aEventId, bool aReloadModel = false);
     48    void setCurDate(const QDate& curDate);
    4849    void setDates(const QDate &aStart, const QDate &aEnd);
    4950
Note: See TracChangeset for help on using the changeset viewer.