diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /kimagemapeditor/kimecommands.h | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimagemapeditor/kimecommands.h')
-rw-r--r-- | kimagemapeditor/kimecommands.h | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/kimagemapeditor/kimecommands.h b/kimagemapeditor/kimecommands.h new file mode 100644 index 00000000..946c09b4 --- /dev/null +++ b/kimagemapeditor/kimecommands.h @@ -0,0 +1,198 @@ +/*************************************************************************** + kimecommands.h - description + ------------------- + begin : Fri May 25 2001 + copyright : (C) 2001 by Jan Schäfer + email : janschaefer@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef KIMECOMMANDS_H +#define KIMECOMMANDS_H + + +#include <kcommand.h> + +#include <kdeversion.h> + +class KImageMapEditor; +class AreaSelection; + + + +class CutCommand : public + +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif + +{ + public: + CutCommand (KImageMapEditor * document, const AreaSelection & selection); + virtual ~CutCommand(); + + virtual void execute(); + virtual void unexecute(); + + protected: + AreaSelection *_cutAreaSelection; + KImageMapEditor* _document; + bool _cutted; +}; + +/** + * Does the same like the cut command + * only have a different name in the Undo-History + **/ +class DeleteCommand : public CutCommand +{ + public : + DeleteCommand (KImageMapEditor * document, const AreaSelection & selection); +}; + +class PasteCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + PasteCommand (KImageMapEditor * document, const AreaSelection & selection); + ~PasteCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + AreaSelection *_pasteAreaSelection; + KImageMapEditor* _document; + bool _pasted; + bool _wasUndoed; + +}; + +class MoveCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + MoveCommand (KImageMapEditor *document, AreaSelection *a,const QPoint & oldPoint); + ~MoveCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + QPoint _newPoint; + QPoint _oldPoint; + + KImageMapEditor* _document; + AreaSelection *_areaSelection; +//- Area *_oldArea; +}; + +class ResizeCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + ResizeCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea); + ~ResizeCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + + KImageMapEditor* _document; + AreaSelection *_areaSelection; + Area *_oldArea; + Area *_newArea; +}; + +class AddPointCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + AddPointCommand (KImageMapEditor *document, AreaSelection *a, const QPoint & p); + ~AddPointCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + + KImageMapEditor* _document; + AreaSelection *_areaSelection; + QPoint _point; + int _coordpos; +}; + +class RemovePointCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + RemovePointCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea); + ~RemovePointCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + + KImageMapEditor* _document; + AreaSelection *_areaSelection; + Area *_oldArea; + Area *_newArea; +}; + + +class CreateCommand : public +#if KDE_VERSION < 300 +KCommand +#else +KNamedCommand +#endif +{ + public: + CreateCommand (KImageMapEditor *document, Area *area); + ~CreateCommand (); + + virtual void execute(); + virtual void unexecute(); + + protected: + + KImageMapEditor* _document; + Area *_area; + bool _created; + bool _wasUndoed; +}; + + +#endif |