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 EventViewer Plugin Interface |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef EVENTVIEWERPLUGININTERFACE_H |
|
19 #define EVENTVIEWERPLUGININTERFACE_H |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 #include <QtPlugin> |
|
24 #include <QDate> |
|
25 #include <qglobal.h> |
|
26 |
|
27 // Forward declarations |
|
28 class QFile; |
|
29 class QString; |
|
30 class AgendaUtil; |
|
31 class AgendaEntry; |
|
32 |
|
33 #define CALENDAR_EVENTVIEWER_PLUGIN_PATH QString("z:/resource/qt/plugins/calendar") |
|
34 #define CALENDAR_EVENTVIEWER_PLUGIN_NAME QString("agendaeventviewerplugin.qtplugin") |
|
35 |
|
36 class EventViewerPluginInterface : public QObject |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: |
|
41 enum Actions { |
|
42 ActionNothing, |
|
43 ActionEdit = 0x01, |
|
44 ActionDelete = 0x02, |
|
45 ActionEditDelete = ActionEdit | ActionDelete, |
|
46 ActionSave = 0x04 |
|
47 }; |
|
48 virtual ~EventViewerPluginInterface() {} |
|
49 |
|
50 |
|
51 |
|
52 public: |
|
53 virtual void viewEvent(const ulong id, |
|
54 Actions action = ActionNothing, |
|
55 AgendaUtil *agendaUtil = 0) = 0; |
|
56 virtual void viewEvent(const QFile &fileHandle, |
|
57 Actions action = ActionNothing, |
|
58 AgendaUtil *agendaUtil = 0) = 0; |
|
59 virtual void viewEvent(AgendaEntry entry, |
|
60 Actions action = ActionNothing, |
|
61 AgendaUtil *agendaUtil = 0) = 0; |
|
62 |
|
63 signals: |
|
64 void viewingCompleted(const QDate date = QDate()); |
|
65 void editingStarted(); |
|
66 void editingCompleted(); |
|
67 void deletingStarted(); |
|
68 void deletingCompleted(); |
|
69 |
|
70 }; |
|
71 |
|
72 Q_DECLARE_INTERFACE(EventViewerPluginInterface, |
|
73 "org.nokia.calendar.EventViewerPluginInterface/1.0") |
|
74 |
|
75 #endif // EVENTVIEWERPLUGININTERFACE_H |
|
76 |
|
77 // End of file |
|