summaryrefslogtreecommitdiffstats
path: root/knotes/KNotesIface.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /knotes/KNotesIface.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knotes/KNotesIface.h')
-rw-r--r--knotes/KNotesIface.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/knotes/KNotesIface.h b/knotes/KNotesIface.h
new file mode 100644
index 000000000..b1d22de3a
--- /dev/null
+++ b/knotes/KNotesIface.h
@@ -0,0 +1,103 @@
+/*******************************************************************
+ KNotesIface.h -- This file defines the DCOP interface for KNotes.
+
+ Copyright (C) 2000 by Adriaan de Groot
+ 2001-2004 by Michael Brade <brade@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*******************************************************************/
+
+#ifndef __KNotesIface_h__
+#define __KNotesIface_h__
+
+#include <qstring.h>
+#include <qmap.h>
+
+#include <dcopobject.h>
+
+
+class KNotesIface : virtual public DCOPObject
+{
+ K_DCOP
+k_dcop:
+ /**
+ * Create a new note.
+ * @param name the name (title) of the new note, if it is empty,
+ * KNotes will choose an appropriate name
+ * @param text the body of the new note
+ * @return the new notes' id
+ */
+ virtual QString newNote( const QString& name = QString::null,
+ const QString& text = QString::null ) = 0;
+
+ /**
+ * Create a new note and inserts the current text in the clipboard
+ * as text.
+ *
+ * @param name the name (title) of the new note, if it is empty,
+ * KNotes will choose an appropriate name
+ * @return the new notes' id
+ */
+ virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
+
+ /**
+ * Deletes a note forever.
+ * @param noteId the id of the note to kill
+ */
+ virtual ASYNC killNote( const QString& noteId ) = 0;
+
+ /**
+ * Deletes a note forever.
+ * @param noteId the id of the note to kill
+ * @param force do not request confirmation
+ */
+ virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
+
+ /**
+ * Get all the notes including their ids.
+ * @return a QMap that maps the id of a note to its name
+ */
+ virtual QMap<QString,QString> notes() const = 0;
+
+ /**
+ * Changes the title/name of a note.
+ * @param noteId the id of the note to be modified
+ * @param newName the new title
+ */
+ virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
+
+ /**
+ * Sets the text of a note. This will delete the old text!
+ * @param noteId the id of the note
+ * @param newText the new text for the note
+ */
+ virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
+
+ /**
+ * Returns the title/name of a note.
+ * @param noteId the id of the note in question
+ * @return the name as a QString
+ */
+ virtual QString name( const QString& noteId ) const = 0;
+
+ /**
+ * Returns the text of a note.
+ * @param noteId the id of the note in question
+ * @return the body as a QString
+ */
+ virtual QString text( const QString& noteId ) const = 0;
+};
+
+#endif