36 # define CALENEDITOR_EXPORT Q_DECL_EXPORT |
36 # define CALENEDITOR_EXPORT Q_DECL_EXPORT |
37 #else |
37 #else |
38 # define CALENEDITOR_EXPORT Q_DECL_IMPORT |
38 # define CALENEDITOR_EXPORT Q_DECL_IMPORT |
39 #endif |
39 #endif |
40 |
40 |
41 class CALENEDITOR_EXPORT CalenEditor : public QObject //HbView |
41 class CalenEditor : public QObject //HbView |
42 { |
42 { |
43 Q_OBJECT |
43 Q_OBJECT |
44 |
44 |
45 public: |
45 public: |
46 enum CreateType{ |
46 enum CreateType{ |
47 TypeAppointment = 0, |
47 TypeAppointment = 0, |
48 TypeUnKnown = -1 |
48 TypeUnKnown = -1 |
49 }; |
49 }; |
50 |
50 |
51 explicit CalenEditor(QObject *parent = 0); |
51 CALENEDITOR_EXPORT explicit CalenEditor(QObject *parent = 0); |
52 explicit CalenEditor(AgendaUtil *agendaUtil, QObject *parent = 0); |
52 CALENEDITOR_EXPORT explicit CalenEditor(AgendaUtil *agendaUtil, QObject *parent = 0); |
53 virtual ~CalenEditor(); |
53 CALENEDITOR_EXPORT virtual ~CalenEditor(); |
54 |
54 CALENEDITOR_EXPORT void edit(const QFile &handle, bool launchCalendar); |
55 public: |
55 CALENEDITOR_EXPORT void edit(AgendaEntry entry, bool launchCalendar); |
56 void edit(const QFile &handle, bool launchCalendar); |
56 CALENEDITOR_EXPORT void edit(ulong id, bool launchCalendar); |
57 void edit(AgendaEntry entry, bool launchCalendar); |
57 CALENEDITOR_EXPORT void create(QDateTime newEntryDateTime, |
58 void edit(ulong id, bool launchCalendar); |
|
59 void create(QDateTime newEntryDateTime, |
|
60 bool launchCalendar, |
58 bool launchCalendar, |
61 CalenEditor::CreateType type = TypeAppointment); |
59 CalenEditor::CreateType type = TypeAppointment); |
62 void create(AgendaEntry entry, |
60 CALENEDITOR_EXPORT void create(AgendaEntry entry, |
63 bool launchCalendar, |
61 bool launchCalendar, |
64 CalenEditor::CreateType type = TypeAppointment); |
62 CalenEditor::CreateType type = TypeAppointment); |
|
63 /** |
|
64 * This Function saves the entries |
|
65 * Should only be called after edit or create function has been called |
|
66 */ |
|
67 CALENEDITOR_EXPORT void saveAndCloseEditor(); |
65 |
68 |
66 signals: |
69 signals: |
67 void entrySaved(); |
70 void entrySaved(); |
68 void dialogClosed(); |
71 void dialogClosed(); |
69 void calendarLaunchFailed(int error); |
72 void calendarLaunchFailed(int error); |