- Timestamp:
- 01/27/10 22:08:37 (13 years ago)
- Branches:
- master, qt5
- Children:
- 0401cc2
- Parents:
- 21d7cc0
- Location:
- src/mvc
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mvc/event.cpp
r21d7cc0 rd49254d 69 69 } 70 70 71 QList<Event> Event::conflictEvents(int aEventId, int conferenceId) 72 { 73 QSqlQuery query; 74 query.prepare( selectQuery() + QString("WHERE id IN ( SELECT conflict_event FROM event_conflict WHERE xid_event = :id AND xid_conference = :conf ) ORDER BY %1").arg("start")); 75 query.bindValue(":id", aEventId); 76 query.bindValue(":conf", conferenceId); 77 78 return load(query); 79 } 80 71 81 QList<Event> Event::getFavByDate(const QDate& date, int conferenceId) 72 82 { -
src/mvc/event.h
r21d7cc0 rd49254d 28 28 static QList<Event> getByTrack(int id); 29 29 static QList<Event> getByDateAndRoom(const QDate& date, int conferenceId); 30 static QList<Event> conflictEvents(int aEventId, int conferenceId); 30 31 public: 31 32 int id() const { return value("id").toInt(); } -
src/mvc/eventmodel.cpp
r21d7cc0 rd49254d 275 275 } 276 276 277 void EventModel::loadConflictEvents(int aEventId, int aConferenceId) 278 { 279 clearModel(); 280 // check for existence of the conference in the DB 281 if(Conference::getAll().count()) 282 { 283 qDebug() << "Loading Conference Data: [" << Conference::getById(aConferenceId).title() << "] in conflict with " << aEventId; 284 mEvents = Event::conflictEvents(aEventId, aConferenceId); 285 } 286 createTimeGroups(); 287 } 288 277 289 void EventModel::updateModel(int aEventId) 278 290 { -
src/mvc/eventmodel.h
r21d7cc0 rd49254d 23 23 void loadNowEvents(int aConferenceId); // loads Now events from the DB 24 24 void loadEventsByRoom(const QDate &aDate, int aConferenceId); 25 void loadConflictEvents(int aEventId, int aConferenceId); // loads events in conflict 25 26 26 27 private:
Note: See TracChangeset
for help on using the changeset viewer.