Changeset fbc1646
- Timestamp:
- 01/18/10 18:15:45 (13 years ago)
- Branches:
- master, qt5
- Children:
- a35aa83
- Parents:
- 28d9e28
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r28d9e28 rfbc1646 37 37 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &))); 38 38 connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &))); 39 connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(updateView(int)));39 //connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(updateView(int))); 40 40 41 41 // DAY EVENTS View … … 54 54 favTreeView->setModel(new EventModel()); 55 55 favTreeView->setItemDelegate(new Delegate(favTreeView)); 56 57 //ACTIVITIES View 58 activityDayTreeView->setHeaderHidden(true); 59 activityDayTreeView->setRootIsDecorated(false); 60 activityDayTreeView->setIndentation(0); 61 activityDayTreeView->setAnimated(true); 62 activityDayTreeView->setModel(new EventModel()); 63 activityDayTreeView->setItemDelegate(new Delegate(activityDayTreeView)); 64 56 65 // TESTING: load some 'fav' data 57 66 if(Conference::getAll().count()) // no conference(s) in the DB … … 63 72 64 73 if(!Conference::getAll().count()) // no conference(s) in the DB 74 { 65 75 dayNavigator->hide(); // hide DayNavigatorWidget 76 activityDayNavigator->hide(); 77 } 66 78 else 67 79 { 68 80 int confId = 1; 69 dayNavigator->setDates(Conference::getById(confId).start(),Conference::getById(confId).end()); 81 QDate aStartDate = Conference::getById(confId).start(); 82 QDate aEndDate = Conference::getById(confId).end(); 83 dayNavigator->setDates(aStartDate, aEndDate); 84 activityDayNavigator->setDates(aStartDate, aEndDate); 70 85 } 71 72 86 connect(static_cast<EventModel*>(dayTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView())); 73 connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavViewComplete())); 87 connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView())); 88 /* connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavViewComplete()));*/ 74 89 } 75 90 … … 138 153 favTreeView->reset(); //Necessary reset: 139 154 // if favourite event unselected as favourite is the only one in its time, and reset is not produced, crashed 155 156 dayNavigator->show(); 140 157 } 141 158 159 /* 142 160 void MainWindow::updateFavViewComplete() 143 161 { … … 146 164 updateDayView(Conference::getById(confId).start()); 147 165 } 166 */ 148 167 149 168 void MainWindow::updateActivitiesDayView(const QDate &aDate) … … 157 176 void MainWindow::updateView(int tabIndex) 158 177 { 159 //TODO korinpa: skraslit ! aj pre ine taby178 //TODO korinpa: change to enum or names ? 160 179 qDebug() << "updateView index: " << tabIndex; 161 if (tabIndex == 2) 180 if (tabIndex == 0) 181 { 182 QDate date = dayNavigator->getCurrentDate(); 183 updateDayView(date); 184 } 185 else if (tabIndex == 1) 186 { 187 updateFavView(); 188 } 189 else if (tabIndex == 2) 162 190 { 163 191 QDate date = activityDayNavigator->getCurrentDate(); -
src/gui/mainwindow.h
r28d9e28 rfbc1646 21 21 void updateDayView(const QDate &aDate); 22 22 void updateFavView(); 23 void updateFavViewComplete();23 /*void updateFavViewComplete();*/ 24 24 void updateActivitiesDayView(const QDate &aDate); 25 25 void updateView(int tabIndex); -
src/mvc/eventmodel.cpp
r28d9e28 rfbc1646 186 186 clearModel(); 187 187 if(Conference::getAll().count()) 188 189 190 191 188 { 189 qDebug() << "Loading Conference Data (by Activities): [" << Conference::getById(aConferenceId).title() << "] " << aDate; 190 mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId); 191 } 192 192 createActivityGroups(); 193 193 } -
src/orm/ormrecord.h
r28d9e28 rfbc1646 140 140 if (!query.exec()) 141 141 { 142 qDebug() << "Error: " << query.lastError().driverText() << "; Type: " << query.lastError().type(); 142 143 throw new OrmSqlException(query.lastError().text()); 143 144 }
Note: See TracChangeset
for help on using the changeset viewer.