Changeset 6f39595 for src/mvc/event.cpp


Ignore:
Timestamp:
01/17/10 18:18:22 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
9f473ba
Parents:
c790268
Message:

started work on 'favourities'

  • created tavourities tree view in the MainWindow? 'Favourities' tab
  • listed some testing 'fav' events
  • TODO: list isn't updated dynamically, which means that the list isn't updated if the user adds/removes an event(s) to/from the 'favourities' list
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    rc790268 r6f39595  
    4848}
    4949
     50QList<Event> Event::getFavByDate(const QDate& date, int conferenceId)
     51{
     52    QSqlQuery query;
     53    query.prepare(selectQueryJoin2T("id") + "WHERE event.xid_conference = :conf AND event.start >= :start AND event.start < :end AND event.favourite = 1 ORDER BY event.start");
     54    query.bindValue(":conf", conferenceId);
     55    query.bindValue(":start", convertToDb(date, QVariant::DateTime));
     56    query.bindValue(":end", convertToDb(date.addDays(1), QVariant::DateTime));
     57
     58    return load(query);
     59}
     60
Note: See TracChangeset for help on using the changeset viewer.