00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef UNDOCMDS_H
00025
#define UNDOCMDS_H
00026
00027
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