notes/notesui/noteseditor/inc/noteseditor.h
changeset 45 b6db4fd4947b
equal deleted inserted replaced
23:fd30d51f876b 45:b6db4fd4947b
       
     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 // User includes
       
    27 #include "noteseditordefines.h"
       
    28 
       
    29 // Forward declarations
       
    30 class QFile;
       
    31 class QString;
       
    32 class AgendaUtil;
       
    33 class AgendaEntry;
       
    34 class NotesEditorPrivate;
       
    35 
       
    36 class NOTESEDITOR_EXPORT NotesEditor : 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 	explicit NotesEditor(QObject *parent = 0);
       
    53 	explicit NotesEditor(AgendaUtil *agendaUtil, QObject *parent = 0);
       
    54 	virtual ~NotesEditor();
       
    55 
       
    56 public:
       
    57 	void edit(const QString &string);
       
    58 	void edit(const QFile &handle);
       
    59 	void edit(AgendaEntry entry);
       
    60 	void edit(ulong id);
       
    61 	void create(CreateType type);
       
    62 	ulong close(CloseType type);
       
    63 
       
    64 signals:
       
    65 	void editingCompleted(bool status = true);
       
    66 
       
    67 private:
       
    68 	NotesEditorPrivate *d_ptr;
       
    69 	Q_DECLARE_PRIVATE_D(d_ptr, NotesEditor)
       
    70 	Q_DISABLE_COPY(NotesEditor)
       
    71 };
       
    72 
       
    73 #endif // NOTESEDITOR_H
       
    74 
       
    75 // End of file	--Don't remove this.