45
|
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 Notes Editor Plugin Interface.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef NOTESEDITORINTERFACE_H
|
|
20 |
#define NOTESEDITORINTERFACE_H
|
|
21 |
|
|
22 |
// System includes
|
|
23 |
#include <QObject>
|
|
24 |
#include <QtPlugin>
|
|
25 |
#include <qglobal.h>
|
|
26 |
|
|
27 |
// Forward declarations
|
|
28 |
class QFile;
|
|
29 |
class QString;
|
|
30 |
class AgendaUtil;
|
|
31 |
class AgendaEntry;
|
|
32 |
|
|
33 |
#define NOTES_EDITOR_PLUGIN_PATH QString("z:/resource/qt/plugins/notes")
|
|
34 |
#define NOTES_EDITOR_PLUGIN_NAME QString("noteseditorplugin.qtplugin")
|
|
35 |
|
|
36 |
class NotesEditorInterface : public QObject
|
|
37 |
{
|
|
38 |
Q_OBJECT
|
|
39 |
|
|
40 |
public:
|
|
41 |
enum CreateType{
|
|
42 |
CreateNote = 0,
|
|
43 |
CreateTodo,
|
|
44 |
CreateTypeUnKnown = -1
|
|
45 |
};
|
|
46 |
enum CloseType{
|
|
47 |
CloseWithSave = 0,
|
|
48 |
CloseWithoutSave,
|
|
49 |
CloseTypeUnKnown = -1
|
|
50 |
};
|
|
51 |
|
|
52 |
virtual ~NotesEditorInterface(){}
|
|
53 |
|
|
54 |
public:
|
|
55 |
virtual void edit(const QString &string, AgendaUtil *agendaUtil=0) = 0;
|
|
56 |
virtual void edit(const QFile &handle, AgendaUtil *agendaUtil=0) = 0;
|
|
57 |
virtual void edit(AgendaEntry entry, AgendaUtil *agendaUtil=0) = 0;
|
|
58 |
virtual void edit(ulong id, AgendaUtil *agendaUtil=0) = 0;
|
|
59 |
virtual void create(CreateType type, AgendaUtil *agendaUtil=0) = 0;
|
|
60 |
virtual ulong close(CloseType type, AgendaUtil *agendaUtil=0) = 0;
|
|
61 |
|
|
62 |
signals:
|
|
63 |
void editingCompleted(bool status = true);
|
|
64 |
};
|
|
65 |
|
|
66 |
Q_DECLARE_INTERFACE(NotesEditorInterface,
|
|
67 |
"org.nokia.notes.NotesEditorInterface/1.0")
|
|
68 |
|
|
69 |
#endif // NOTESEDITORINTERFACE_H
|
|
70 |
|
|
71 |
// End of file --Don't remove this.
|