|
1 /* |
|
2 * Copyright (c) 2010 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: Header file for AgendaEventViewer class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef AGENDAEVENTVIEWER_H |
|
19 #define AGENDAEVENTVIEWER_H |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 #include <qglobal.h> |
|
24 #include <QDate> |
|
25 |
|
26 // Forward declarations |
|
27 class QFile; |
|
28 class QString; |
|
29 class AgendaUtil; |
|
30 class AgendaEntry; |
|
31 class AgendaEventViewerPrivate; |
|
32 |
|
33 |
|
34 #ifdef AGENDAEVENTVIEWER_LIB |
|
35 # define AGENDAEVENTVIEWER_EXPORT Q_DECL_EXPORT |
|
36 #else |
|
37 # define AGENDAEVENTVIEWER_EXPORT Q_DECL_IMPORT |
|
38 #endif |
|
39 |
|
40 class AgendaEventViewer: public QObject |
|
41 { |
|
42 Q_OBJECT |
|
43 Q_ENUMS(Actions) |
|
44 |
|
45 public: |
|
46 enum Actions { |
|
47 ActionNothing, |
|
48 ActionEdit = 0x01, |
|
49 ActionDelete = 0x02, |
|
50 ActionEditDelete = ActionEdit | ActionDelete, |
|
51 ActionSave = 0x04 |
|
52 }; |
|
53 AGENDAEVENTVIEWER_EXPORT explicit AgendaEventViewer(QObject *parent = 0); |
|
54 AGENDAEVENTVIEWER_EXPORT explicit AgendaEventViewer(AgendaUtil *agendaUtil, |
|
55 QObject *parent = 0); |
|
56 AGENDAEVENTVIEWER_EXPORT virtual ~AgendaEventViewer(); |
|
57 |
|
58 public: |
|
59 AGENDAEVENTVIEWER_EXPORT void view(const ulong id, |
|
60 Actions action = ActionNothing); |
|
61 AGENDAEVENTVIEWER_EXPORT void view(const QFile &fileHandle, |
|
62 Actions action = ActionNothing); |
|
63 AGENDAEVENTVIEWER_EXPORT void view(AgendaEntry entry, |
|
64 Actions action = ActionNothing); |
|
65 |
|
66 AGENDAEVENTVIEWER_EXPORT void saveAndCloseEditor(); |
|
67 |
|
68 AGENDAEVENTVIEWER_EXPORT void closeAgendaEventView(); |
|
69 |
|
70 signals: |
|
71 void viewingCompleted(const QDate date = QDate()); |
|
72 void editingStarted(); |
|
73 void editingCompleted(); |
|
74 void deletingStarted(); |
|
75 void deletingCompleted(); |
|
76 |
|
77 private: |
|
78 AgendaEventViewerPrivate *d_ptr; |
|
79 Q_DECLARE_PRIVATE_D(d_ptr, AgendaEventViewer) |
|
80 Q_DISABLE_COPY(AgendaEventViewer) |
|
81 }; |
|
82 |
|
83 #endif // AGENDAEVENTVIEWER_H |
|
84 |
|
85 // End of file |