Title block template editor: implemented cut operation.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1561 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-03-11 16:06:43 +00:00
parent ab3caba9ef
commit f6b2037fb9
4 changed files with 98 additions and 8 deletions

View File

@@ -22,8 +22,8 @@
#include <QUndoCommand>
#include "dimension.h"
#include "templatecellsset.h"
#include "titleblockcell.h"
class TitleBlockTemplateView;
class TitleBlockCell;
class TitleBlockTemplate;
/**
@@ -251,6 +251,30 @@ class ChangeTemplateInformationsCommand : public QUndoCommand {
QString new_information_;
};
/**
This class represents the action of cutting a cells set.
*/
class CutTemplateCellsCommand : public TitleBlockTemplateCommand {
// constructors, destructor
public:
CutTemplateCellsCommand(TitleBlockTemplate *, QUndoCommand * = 0);
virtual ~CutTemplateCellsCommand();
private:
CutTemplateCellsCommand(const CutTemplateCellsCommand &);
// methods
public:
virtual void undo();
virtual void redo();
virtual void setCutCells(const QList<TitleBlockCell *> &);
protected:
virtual void updateText();
// attributes
public:
/// Cut cells
QHash<TitleBlockCell *, TitleBlockCell::TemplateCellType> cut_cells_;
};
/**
This class represents the action of pasting a cells set.