kaddressbook Library API Documentation

undocmds.h

00001 #ifndef UNDOCMDS_H
00002 #define UNDOCMDS_H
00003 //
00004 // Commands for undo/redo functionality.
00005 
00006 #include <qstring.h>
00007 #include <qstringlist.h>
00008 
00009 #include <kabc/addressee.h>
00010 
00011 #include "undo.h"
00012 
00013 namespace KABC { 
00014   class AddressBook;
00015 }
00016 
00017 class PwDeleteCommand : public Command
00018 {
00019 public:
00020   PwDeleteCommand(KABC::AddressBook *doc, const QStringList &uidList );
00021   virtual ~PwDeleteCommand();
00022   virtual QString name();
00023   virtual void undo();
00024   virtual void redo();
00025 
00026 private:
00027   KABC::AddressBook *mDocument;
00028   KABC::Addressee::List mAddresseeList;
00029   QStringList mUidList;
00030 };
00031 
00032 class PwPasteCommand : public Command
00033 {
00034 public:
00035   PwPasteCommand(KABC::AddressBook *doc, const QString &clipboard );
00036   virtual QString name();
00037   virtual void undo();
00038   virtual void redo();
00039 
00040 private:
00041     KABC::AddressBook *mDocument;
00042     QStringList mUidList;
00043     QString mClipboard;
00044 };
00045 
00046 class PwCutCommand : public Command
00047 {
00048 public:
00049   PwCutCommand(KABC::AddressBook *doc, const QStringList &uidList);
00050   virtual QString name();
00051   virtual void undo();
00052   virtual void redo();
00053 
00054 private:
00055   KABC::AddressBook *mDocument;
00056   KABC::Addressee::List mAddresseeList;
00057   QStringList mUidList;
00058   QString mClipText;
00059   QString mOldText;
00060 };
00061 
00062 class PwNewCommand : public Command
00063 {
00064 public:
00065   PwNewCommand(KABC::AddressBook *doc, const KABC::Addressee &a );
00066   ~PwNewCommand();
00067   virtual QString name();
00068   virtual void undo();
00069   virtual void redo();
00070 
00071 private:
00072   KABC::AddressBook *mDocument;
00073   KABC::Addressee mA;
00074 };
00075 
00076 class PwEditCommand : public Command
00077 {
00078 public:
00079   PwEditCommand(KABC::AddressBook *doc,
00080                 const KABC::Addressee &oldA, 
00081                 const KABC::Addressee &newA);
00082   virtual ~PwEditCommand();
00083   virtual QString name();
00084   virtual void undo();
00085   virtual void redo();
00086 
00087 private:
00088   KABC::AddressBook *mDocument;
00089   KABC::Addressee mOldA;
00090   KABC::Addressee mNewA;
00091 };
00092 
00093 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:10 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001