Changeset 3a09de6 in confclerk_git for src/mvc


Ignore:
Timestamp:
04/16/13 22:52:25 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
e619be9
Parents:
097e1f4
Message:

Alarms are reported via QSystemTray now (see ticket #46).

Location:
src/mvc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    r097e1f4 r3a09de6  
    9595
    9696
     97QList<Event> Event::getImminentAlarmEvents(int maxSecToAlarm, int conferenceId) {
     98    QSqlQuery query;
     99    query.prepare(selectQuery() + "WHERE xid_conference = :conf AND (start < :start AND alarm = 1) ORDER BY start, duration");
     100    query.bindValue(":conf", conferenceId);
     101    query.bindValue(":start", convertToDb(QDateTime::currentDateTime().addSecs(maxSecToAlarm), QVariant::DateTime));
     102    return load(query);
     103}
     104
     105
    97106QList<Event> Event::getFavByDate(const QDate& date, int conferenceId)
    98107{
  • src/mvc/event.h

    r097e1f4 r3a09de6  
    5050    static QList<Event> getByDateAndRoom(const QDate& date, int conferenceId);
    5151    static QList<Event> conflictEvents(int aEventId, int conferenceId);
     52    static QList<Event> getImminentAlarmEvents(int maxSecToAlarm, int conferenceId);
    5253public:
    5354    int id() const { return value("id").toInt(); }
  • src/mvc/treeview.cpp

    r097e1f4 r3a09de6  
    111111                    // add alarm to the 'alarmd'
    112112                    Alarm alarm;
    113                     alarm.addAlarm(event.conferenceId(), event.id(), event.title(),event.start().addSecs(PRE_EVENT_ALARM_SEC));
     113                    alarm.addAlarm(event.conferenceId(), event.id(), event.title(),event.start().addSecs(-AppSettings::preEventAlarmSec()));
    114114#endif /* MAEMO */
    115115                }
Note: See TracChangeset for help on using the changeset viewer.