README
[n9profile] / calendar.h
1 /** \file calendar.h
2   \brief   contain class for saving calendar data
3   \author Jakub Šplíchal <jakub.bzouk@gmail.com>
4  */
5 #ifndef CALENDAR_H
6 #define CALENDAR_H
7 #include <QtCore/QVector>
8 #include <QObject>
9 #include <QtGui/QIcon>
10 class Event;
11 class QDateTime;
12
13 /** \class Calendar
14   \brief class for saving calendar data
15   class store calendar data and events in calendar
16  */
17 class Calendar : public QObject
18 {
19 Q_OBJECT
20 public:
21     explicit Calendar(QObject *parent = 0);
22     void AddEvent(QString id, QString des ,QString sum, QDateTime SDate, QDateTime EDate);
23     void SetName(QString n);
24     void SetId(int i);
25     int GetId();
26     QString GetName();
27     Event * findEvent(QString i);
28     void SetIcon(QIcon ico);
29     QIcon GetIcon();
30     QVector<Event *> FindEventsNow();
31     void DeleteOldEvents();
32     void DeleteEvent(QString id);
33 signals:
34     void s_eventStart(Event *);
35     void s_eventStop(Event *);
36
37 private slots:
38     void EventChanged(Event * ev);
39
40 private:
41     int Id_cal;
42     QString name_of_calendar;
43     QVector<Event *> vector_calendars_events;
44     QIcon icon;
45
46 };
47
48 #endif // CALENDAR_H