|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * The header file for CalenEditor class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CALENEDITOR_H |
|
20 #define CALENEDITOR_H |
|
21 |
|
22 // System includes |
|
23 #include <QObject> |
|
24 #include <qglobal.h> |
|
25 #include <hbview.h> |
|
26 |
|
27 // Forward declarations |
|
28 class QFile; |
|
29 class QString; |
|
30 class QDateTime; |
|
31 class AgendaUtil; |
|
32 class AgendaEntry; |
|
33 class CalenEditorPrivate; |
|
34 |
|
35 #ifdef CALENEDITOR_LIB |
|
36 # define CALENEDITOR_EXPORT Q_DECL_EXPORT |
|
37 #else |
|
38 # define CALENEDITOR_EXPORT Q_DECL_IMPORT |
|
39 #endif |
|
40 |
|
41 class CALENEDITOR_EXPORT CalenEditor : public QObject //HbView |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 public: |
|
46 enum CreateType{ |
|
47 TypeAppointment = 0, |
|
48 TypeUnKnown = -1 |
|
49 }; |
|
50 |
|
51 explicit CalenEditor(QObject *parent = 0); |
|
52 explicit CalenEditor(AgendaUtil *agendaUtil, QObject *parent = 0); |
|
53 virtual ~CalenEditor(); |
|
54 |
|
55 public: |
|
56 void edit(const QFile &handle, bool launchCalendar); |
|
57 void edit(AgendaEntry entry, bool launchCalendar); |
|
58 void edit(ulong id, bool launchCalendar); |
|
59 void create(QDateTime newEntryDateTime, |
|
60 bool launchCalendar, |
|
61 CalenEditor::CreateType type = TypeAppointment); |
|
62 void create(AgendaEntry entry, |
|
63 bool launchCalendar, |
|
64 CalenEditor::CreateType type = TypeAppointment); |
|
65 |
|
66 signals: |
|
67 void entrySaved(); |
|
68 void dialogClosed(); |
|
69 void calendarLaunchFailed(int error); |
|
70 |
|
71 private: |
|
72 #ifdef TESTCALENEDITOR |
|
73 friend class TestCalenEditor; |
|
74 #endif |
|
75 CalenEditorPrivate *d_ptr; |
|
76 Q_DECLARE_PRIVATE_D(d_ptr, CalenEditor) |
|
77 Q_DISABLE_COPY(CalenEditor) |
|
78 }; |
|
79 |
|
80 #endif // CALENEDITOR_H |
|
81 |
|
82 // End of file --Don't remove this. |