organizer_plat/notes_editor_api/inc/noteseditor.h
branchGCC_SURGE
changeset 54 e6894b852bc6
parent 40 4b686cfad39d
parent 53 e08ac1a3ba2b
equal deleted inserted replaced
40:4b686cfad39d 54:e6894b852bc6
     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 NotesEditor class.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef NOTESEDITOR_H
       
    20 #define NOTESEDITOR_H
       
    21 
       
    22 // System includes
       
    23 #include <QObject>
       
    24 #include <qglobal.h>
       
    25 
       
    26 // Forward declarations
       
    27 class QFile;
       
    28 class QString;
       
    29 class AgendaUtil;
       
    30 class AgendaEntry;
       
    31 class NotesEditorPrivate;
       
    32 
       
    33 #ifdef NOTESEDITOR_LIB
       
    34 #	define NOTESEDITOR_EXPORT Q_DECL_EXPORT
       
    35 #else
       
    36 #	define NOTESEDITOR_EXPORT Q_DECL_IMPORT
       
    37 #endif
       
    38 
       
    39 class NOTESEDITOR_EXPORT NotesEditor : public QObject
       
    40 {
       
    41 	Q_OBJECT
       
    42 
       
    43 public:
       
    44 	enum CreateType{
       
    45 		CreateNote = 0,
       
    46 		CreateTodo,
       
    47 		CreateTypeUnKnown = -1
       
    48 	};
       
    49 	enum CloseType{
       
    50 		CloseWithSave = 0,
       
    51 		CloseWithoutSave,
       
    52 		CloseTypeUnKnown = -1
       
    53 	};
       
    54 
       
    55 	explicit NotesEditor(QObject *parent = 0);
       
    56 	explicit NotesEditor(AgendaUtil *agendaUtil, QObject *parent = 0);
       
    57 	virtual ~NotesEditor();
       
    58 
       
    59 public:
       
    60 	void edit(const QString &string);
       
    61 	void edit(const QFile &handle);
       
    62 	void edit(AgendaEntry entry);
       
    63 	void edit(ulong id);
       
    64 	void create(CreateType type);
       
    65 	ulong close(CloseType type);
       
    66 
       
    67 signals:
       
    68 	void editingCompleted(bool status = true);
       
    69 
       
    70 private:
       
    71 	NotesEditorPrivate *d_ptr;
       
    72 	Q_DECLARE_PRIVATE_D(d_ptr, NotesEditor)
       
    73 	Q_DISABLE_COPY(NotesEditor)
       
    74 };
       
    75 
       
    76 #endif // NOTESEDITOR_H
       
    77 
       
    78 // End of file	--Don't remove this.