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 // TODO: Need to add more types |
48 // TODO: Need to add more types |
49 TypeUnKnown = -1 |
49 TypeUnKnown = -1 |
50 }; |
50 }; |
51 |
51 |
52 explicit CalenEditor(QObject *parent = 0); |
52 CALENEDITOR_EXPORT explicit CalenEditor(QObject *parent = 0); |
53 explicit CalenEditor(AgendaUtil *agendaUtil, QObject *parent = 0); |
53 CALENEDITOR_EXPORT explicit CalenEditor(AgendaUtil *agendaUtil, QObject *parent = 0); |
54 virtual ~CalenEditor(); |
54 CALENEDITOR_EXPORT virtual ~CalenEditor(); |
55 |
55 CALENEDITOR_EXPORT void edit(const QFile &handle, bool launchCalendar); |
56 public: |
56 CALENEDITOR_EXPORT void edit(AgendaEntry entry, bool launchCalendar); |
57 void edit(const QFile &handle, bool launchCalendar); |
57 CALENEDITOR_EXPORT void edit(ulong id, bool launchCalendar); |
58 void edit(AgendaEntry entry, bool launchCalendar); |
58 CALENEDITOR_EXPORT void create(QDateTime newEntryDateTime, |
59 void edit(ulong id, bool launchCalendar); |
|
60 void create(QDateTime newEntryDateTime, |
|
61 bool launchCalendar, |
59 bool launchCalendar, |
62 CalenEditor::CreateType type = TypeAppointment); |
60 CalenEditor::CreateType type = TypeAppointment); |
63 void create(AgendaEntry entry, |
61 CALENEDITOR_EXPORT void create(AgendaEntry entry, |
64 bool launchCalendar, |
62 bool launchCalendar, |
65 CalenEditor::CreateType type = TypeAppointment); |
63 CalenEditor::CreateType type = TypeAppointment); |
|
64 /** |
|
65 * This Function saves the entries |
|
66 * should only calls after edit or create function has called |
|
67 */ |
|
68 CALENEDITOR_EXPORT void saveAndCloseEditor(); |
66 |
69 |
67 signals: |
70 signals: |
68 void entrySaved(); |
71 void entrySaved(); |
69 void dialogClosed(); |
72 void dialogClosed(); |
70 void calendarLaunchFailed(int error); |
73 void calendarLaunchFailed(int error); |