Ignore:
Timestamp:
01/19/10 14:45:57 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
cfd615d
Parents:
0c658c1
Message:

work on alarm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/treeview.cpp

    r0c658c1 r6bd729b  
    55#include "event.h"
    66#include "eventmodel.h"
     7
     8#ifdef MAEMO
     9#include <alarm.h>
     10#endif
    711
    812#include <QDebug>
     
    6367                    static_cast<Event*>(aIndex.internalPointer())->setHasAlarm(false); // list of events
    6468                    event.setHasAlarm(false); // update DB
     69#ifdef MAEMO
     70                    // remove alarm from the 'alarmd' alrms list
     71                    Alarm alarm;
     72                    alarm.deleteAlarm(event.id());
     73                    // TODO: test if removing was successfull
     74#endif /* MAEMO */
    6575                }
    6676                else
     
    6878                    static_cast<Event*>(aIndex.internalPointer())->setHasAlarm(true); // list of events
    6979                    event.setHasAlarm(true);
     80#ifdef MAEMO
     81                    // add alarm to the 'alarmd'
     82                    Alarm alarm;
     83                    int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10));
     84                    qDebug() << "cookie: " << cookie;
     85#endif /* MAEMO */
    7086                }
    7187                qDebug() << " ALARM [" << qVariantValue<QString>(aIndex.data()) << "] -> " << event.hasAlarm();
Note: See TracChangeset for help on using the changeset viewer.