Changeset c5324ca for src/gui/mainwindow.cpp
- Timestamp:
- 01/19/10 10:45:59 (13 years ago)
- Branches:
- master, qt5
- Children:
- ec67a0b
- Parents:
- 9afc0ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r9afc0ee rc5324ca 39 39 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &))); 40 40 connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &))); 41 //connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(updateView(int)));42 41 43 42 // DAY EVENTS View … … 96 95 activityDayNavigator->setDates(aStartDate, aEndDate); 97 96 } 98 connect(static_cast<EventModel*>(dayTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView())); 99 connect( static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView()));100 /* connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavViewComplete()));*/ 97 98 connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTab(int))); 99 101 100 } 102 101 … … 152 151 } 153 152 154 void MainWindow::updateDayView(const QDate &aDate)153 void MainWindow::updateDayView(const QDate aDate) 155 154 { 156 155 int confId = 1; 157 static_cast<EventModel*>(dayTreeView->model())->loadEvents( aDate,confId);156 static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId); 158 157 dayTreeView->reset(); 159 158 dayNavigator->show(); 160 159 } 161 160 162 void MainWindow::update FavView()161 void MainWindow::updateTab(const int n) 163 162 { 164 163 int confId = 1; 165 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 166 favTreeView->reset(); //Necessary reset: 167 // if favourite event unselected as favourite is the only one in its time, and reset is not produced, crashed 168 164 if(n) //index 1 of tabWidget: favouriteTab 165 { 166 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 167 favTreeView->reset(); 168 } 169 else //index 0 of tabWidget: dayViewTab 170 { 171 static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId); 172 dayTreeView->reset(); 173 } 174 //TODO: update of activitiesTab needed? 169 175 dayNavigator->show(); 170 176 } 171 177 172 /*173 void MainWindow::updateFavViewComplete()174 {175 int confId = 1;176 updateFavView();177 updateDayView(Conference::getById(confId).start());178 }179 */180 178 181 179 void MainWindow::updateActivitiesDayView(const QDate &aDate)
Note: See TracChangeset
for help on using the changeset viewer.