knotes

KNotesAppIface.h

00001 /*******************************************************************
00002  KNotesIface.h  --  This file defines the DCOP interface for KNotes.
00003 
00004  Copyright (C) 2004 by Michael Brade <brade@kde.org>
00005 
00006  This program is free software; you can redistribute it and/or
00007  modify it under the terms of the GNU General Public License
00008  as published by the Free Software Foundation; either version 2
00009  of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with this program; if not, write to the Free Software
00018  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020  In addition, as a special exception, the copyright holders give
00021  permission to link the code of this program with any edition of
00022  the Qt library by Trolltech AS, Norway (or with modified versions
00023  of Qt that use the same license as Qt), and distribute linked
00024  combinations including the two.  You must obey the GNU General
00025  Public License in all respects for all of the code used other than
00026  Qt.  If you modify this file, you may extend this exception to
00027  your version of the file, but you are not obligated to do so.  If
00028  you do not wish to do so, delete this exception statement from
00029  your version.
00030 *******************************************************************/
00031 
00032 #ifndef __KNotesAppIface_h__
00033 #define __KNotesAppIface_h__
00034 
00035 #include <qstring.h>
00036 #include <qmap.h>
00037 
00038 #include <dcopobject.h>
00039 
00040 
00041 class KNotesAppIface : virtual public DCOPObject
00042 {
00043     K_DCOP
00044 k_dcop:
00052     virtual QString newNote( const QString& name = QString::null,
00053                              const QString& text = QString::null ) = 0;
00054 
00063     virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
00064 
00069     virtual ASYNC killNote( const QString& noteId ) = 0;
00070 
00076     virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
00077 
00082     virtual QMap<QString,QString> notes() const = 0;
00083 
00089     virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
00090 
00096     virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
00097 
00103     virtual QString fgColor( const QString& noteId ) const = 0;
00104 
00110     virtual QString bgColor( const QString& noteId ) const = 0;
00111 
00118     virtual ASYNC setColor( const QString& noteId, const QString& fgColor,
00119                                                    const QString& bgColor ) = 0;
00120 
00126     virtual QString name( const QString& noteId ) const = 0;
00127 
00133     virtual QString text( const QString& noteId ) const = 0;
00134 
00135 
00136     /******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/
00137 
00142     virtual ASYNC showNote( const QString& noteId ) const = 0;
00143 
00148     virtual ASYNC hideNote( const QString& noteId ) const = 0;
00149 
00153     virtual ASYNC showAllNotes() const = 0;
00154 
00158     virtual ASYNC hideAllNotes() const = 0;
00159 
00165     virtual int width( const QString& noteId ) const = 0;
00166 
00172     virtual int height( const QString& noteId ) const = 0;
00173 
00180     virtual ASYNC move( const QString& noteId, int x, int y ) const = 0;
00181 
00188     virtual ASYNC resize( const QString& noteId, int width, int height ) const = 0;
00189 
00194     virtual ASYNC sync( const QString& app ) = 0;
00195 
00203     virtual bool isNew( const QString& app, const QString& noteId ) const = 0;
00204 
00212     virtual bool isModified( const QString& app, const QString& noteId ) const = 0;
00213 };
00214 
00215 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys