Ignore:
Timestamp:
01/19/10 13:55:24 (12 years ago)
Author:
fortefr <fortefr@…>
Branches:
master, qt5
Children:
0c658c1
Parents:
2fc2878
Message:

Favourites dayNavigator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r2fc2878 r7f84a70  
    3939    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
    4040    connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &)));
     41    connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesDayView(const QDate &)));
    4142
    4243    // DAY EVENTS View
     
    9495        dayNavigator->setDates(aStartDate, aEndDate);
    9596        activityDayNavigator->setDates(aStartDate, aEndDate);
     97        favouriteDayNavigator->setDates(aStartDate, aEndDate);
    9698    }
    9799
     
    168170            static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId);
    169171            dayTreeView->reset();
     172            dayNavigator->show();
    170173        }
    171174        break;
    172175    case 1: //index 1 of tabWidget: favouritesTab
    173176        {
    174                 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
    175                 favTreeView->reset();
     177            static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
     178            favTreeView->reset();
     179            favouriteDayNavigator->show();
     180        }
     181        break;
     182    case 2: //index 2 of tabWidget: activitiesTab
     183        {
     184            static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(),confId);
     185            actTreeView->reset();
     186            activityDayNavigator->show();
    176187        }
    177188        break;
    178189    default:
    179190        {
    180             //TODO: update of activitiesTab needed?
     191
    181192        }
    182193    };
    183194
    184     dayNavigator->show();
    185 }
    186 
     195
     196}
    187197
    188198void MainWindow::updateActivitiesDayView(const QDate &aDate)
     
    192202    actTreeView->reset();
    193203    activityDayNavigator->show();
     204}
     205
     206void MainWindow::updateFavouritesDayView(const QDate &aDate)
     207{
     208    int confId = 1;
     209    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId);
     210    favTreeView->reset();
     211    favouriteDayNavigator->show();
    194212}
    195213
Note: See TracChangeset for help on using the changeset viewer.