Changeset 5842349
- Timestamp:
- 01/18/10 15:00:32 (13 years ago)
- Branches:
- master, qt5
- Children:
- 5ff01fe
- Parents:
- ffd878f
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fosdem.pro
rffd878f r5842349 4 4 maemo : SUBDIRS += alarm 5 5 #SUBDIRS += test 6 CONFIG += ordered 6 CONFIG += ordered debug 7 7 -
src/gui/mainwindow.cpp
rffd878f r5842349 37 37 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &))); 38 38 39 39 40 // DAY EVENTS View 40 41 dayTreeView->setHeaderHidden(true); … … 67 68 dayNavigator->setDates(Conference::getById(confId).start(),Conference::getById(confId).end()); 68 69 } 70 71 connect(static_cast<EventModel*>(dayTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView())); 72 connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView())); 69 73 } 70 74 … … 127 131 } 128 132 133 void MainWindow::updateFavView() 134 { 135 int confId = 1; 136 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 137 favTreeView->reset(); 138 updateDayView(Conference::getById(confId).start()); 139 } -
src/gui/mainwindow.h
rffd878f r5842349 20 20 void aboutApp(); 21 21 void updateDayView(const QDate &aDate); 22 void updateFavView(); 22 23 private: 23 24 SqlEngine *mSqlEngine; -
src/mvc/event.h
rffd878f r5842349 27 27 public: 28 28 static Event getById(int id, int conferenceId); 29 static Event getVirtualById(int id, int conferenceId);30 29 static QList<Event> getByDate(const QDate& date, int conferenceId); 31 30 static QList<Event> getFavByDate(const QDate& date, int conferenceId); // get Favourities by Date -
src/mvc/eventmodel.cpp
rffd878f r5842349 48 48 { 49 49 if (index.internalId() == 0) 50 { //range of time data 51 //qDebug() << qVariantValue<QString>(mGroups.at(index.row()).mTitle); 50 { 52 51 return mGroups.at(index.row()).mTitle; 53 52 } 54 53 else //event data 55 54 { 56 //qDebug() << qVariantValue<QString>(static_cast<Event*>(index.internalPointer())->id());57 //return static_cast<Event*>(index.internalPointer())->id();58 //qDebug() << Event::getVirtualById(static_cast<Event*>(index.internalPointer())->id(), 1).title();// Id Conference is 1 by now59 //return 1;60 55 return static_cast<Event*>(index.internalPointer())->id(); 61 56 } -
src/mvc/treeview.h
rffd878f r5842349 3 3 4 4 #include <QTreeView> 5 5 6 6 7 class TreeView : public QTreeView
Note: See TracChangeset
for help on using the changeset viewer.