kaddressbook Library API Documentation

undocmds.h

00001 /* 00002 This file is part of KAddressBook. 00003 Copyright (C) 1999 Don Sanders <sanders@kde.org> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 00019 As a special exception, permission is given to link this program 00020 with any edition of Qt, and distribute the resulting executable, 00021 without including the source code for Qt in the source distribution. 00022 */ 00023 00024 #ifndef UNDOCMDS_H 00025 #define UNDOCMDS_H 00026 00027 // Commands for undo/redo functionality. 00028 00029 #include <qstring.h> 00030 #include <qstringlist.h> 00031 00032 #include <kabc/addressee.h> 00033 00034 #include "undo.h" 00035 00036 namespace KAB { 00037 class Core; 00038 } 00039 00040 class PwDeleteCommand : public Command 00041 { 00042 public: 00043 PwDeleteCommand( KABC::AddressBook *ab, const QStringList &uidList ); 00044 virtual ~PwDeleteCommand(); 00045 00046 virtual QString name(); 00047 virtual bool undo(); 00048 virtual bool redo(); 00049 00050 private: 00051 KABC::Addressee::List mAddresseeList; 00052 QStringList mUIDList; 00053 }; 00054 00055 class PwPasteCommand : public Command 00056 { 00057 public: 00058 PwPasteCommand( KAB::Core *core, const KABC::Addressee::List &list ); 00059 00060 virtual QString name(); 00061 virtual bool undo(); 00062 virtual bool redo(); 00063 00064 private: 00065 KAB::Core *mCore; 00066 KABC::Addressee::List mAddresseeList; 00067 }; 00068 00069 class PwCutCommand : public Command 00070 { 00071 public: 00072 PwCutCommand( KABC::AddressBook *ab, const QStringList &uidList ); 00073 00074 virtual QString name(); 00075 virtual bool undo(); 00076 virtual bool redo(); 00077 00078 private: 00079 KABC::Addressee::List mAddresseeList; 00080 QStringList mUIDList; 00081 QString mClipText; 00082 QString mOldText; 00083 }; 00084 00085 class PwNewCommand : public Command 00086 { 00087 public: 00088 PwNewCommand( KABC::AddressBook *ab, const KABC::Addressee &a ); 00089 ~PwNewCommand(); 00090 00091 virtual QString name(); 00092 virtual bool undo(); 00093 virtual bool redo(); 00094 00095 private: 00096 KABC::Addressee mAddr; 00097 }; 00098 00099 class PwEditCommand : public Command 00100 { 00101 public: 00102 PwEditCommand( KABC::AddressBook *ab, const KABC::Addressee &oldAddr, 00103 const KABC::Addressee &newAddr ); 00104 virtual ~PwEditCommand(); 00105 00106 virtual QString name(); 00107 virtual bool undo(); 00108 virtual bool redo(); 00109 00110 private: 00111 KABC::Addressee mOldAddr; 00112 KABC::Addressee mNewAddr; 00113 }; 00114 00115 #endif
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:09 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003