Changeset c53a3f4 for src/gui/mainwindow.cpp
- Timestamp:
- 01/19/10 18:34:18 (13 years ago)
- Branches:
- master, qt5
- Children:
- 395d6d3
- Parents:
- 02c1e09
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r02c1e09 rc53a3f4 17 17 #include "daynavigatorwidget.h" 18 18 #include "mapwindow.h" 19 20 const int confId = 1; 19 21 20 22 MainWindow::MainWindow(QWidget *parent) … … 65 67 actTreeView->setItemDelegate(new Delegate(actTreeView)); 66 68 67 // event doubleclicked68 connect(dayTreeView, SIGNAL( doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));69 connect(favTreeView, SIGNAL( doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));70 connect(actTreeView, SIGNAL( doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));69 // event clicked 70 connect(dayTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 71 connect(favTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 72 connect(actTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 71 73 // request for map to be displayed 72 74 connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); … … 78 80 if(Conference::getAll().count()) // no conference(s) in the DB 79 81 { 80 int confId = 1;81 82 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 82 83 favTreeView->reset(); … … 90 91 else 91 92 { 92 int confId = 1;93 93 QDate aStartDate = Conference::getById(confId).start(); 94 94 QDate aEndDate = Conference::getById(confId).end(); … … 130 130 if(Conference::getAll().count()) 131 131 { 132 int confId = 1;133 132 // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates 134 133 QDate aStartDate = Conference::getById(confId).start(); … … 155 154 void MainWindow::updateDayView(const QDate &aDate) 156 155 { 157 int confId = 1;158 156 static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,confId); 159 157 dayTreeView->reset(); … … 163 161 void MainWindow::updateTab(const int aIndex) 164 162 { 165 int confId = 1;166 163 switch(aIndex) 167 164 { … … 192 189 } 193 190 }; 194 195 196 191 } 197 192 198 193 void MainWindow::updateActivitiesDayView(const QDate &aDate) 199 194 { 200 int confId = 1;201 195 static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(aDate,confId); 202 196 actTreeView->reset(); … … 206 200 void MainWindow::updateFavouritesDayView(const QDate &aDate) 207 201 { 208 int confId = 1;209 202 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId); 210 203 favTreeView->reset(); … … 212 205 } 213 206 214 void MainWindow::item DoubleClicked(const QModelIndex &aIndex)207 void MainWindow::itemClicked(const QModelIndex &aIndex) 215 208 { 216 209 // have to handle only events, not time-groups
Note: See TracChangeset
for help on using the changeset viewer.