Ignore:
Timestamp:
01/13/10 21:51:06 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
6a624f7
Parents:
69393c0
Message:

implemented day navigator widget

  • to switch between conference days
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/model/eventmodel.cpp

    r69393c0 r969a840  
    44EventModel::EventModel()
    55{
    6 
    7     loadEvents();
     6    mEvents.clear();
    87}
    98
     
    119118}
    120119
    121 void EventModel::loadEvents()
     120void EventModel::loadEvents(const QDate &aDate, int aConferenceId)
    122121{
    123122    mEvents.clear();
    124123
    125     mConfId = 1; // current conference selected: we have only one DB so far
    126     // check for existence of conference in the DB
     124    // check for existence of the conference in the DB
    127125    if(Conference::getAll().count())
    128126    {
    129         mCurrentDate = Conference::getById(mConfId).start();
    130         qDebug() << "Loading Conference Data: [" << Conference::getById(mConfId).title() << "] " << mCurrentDate;
    131         mEvents = Event::getByDate(QDate(mCurrentDate.year(), mCurrentDate.month(), mCurrentDate.day()), mConfId);
     127        qDebug() << "Loading Conference Data: [" << Conference::getById(aConferenceId).title() << "] " << aDate;
     128        mEvents = Event::getByDate(QDate(aDate.year(), aDate.month(), aDate.day()), aConferenceId);
    132129    }
    133     mEvents = Event::getByDate(QDate(mCurrentDate.year(), mCurrentDate.month(), mCurrentDate.day()), mConfId);
    134130    createTimeGroups();
    135131}
Note: See TracChangeset for help on using the changeset viewer.