Text item : reduce a lot of code for several text item

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3379 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-10-17 21:30:42 +00:00
parent 7f4d2cc317
commit 243cd16e72
16 changed files with 158 additions and 547 deletions

View File

@@ -185,35 +185,6 @@ class MoveElementsCommand : public QUndoCommand {
bool first_redo;
};
/**
This command moves text items related to elements on a particular diagram.
*/
class MoveElementsTextsCommand : public QUndoCommand {
// constructors, destructor
public:
MoveElementsTextsCommand(Diagram *, const QSet<ElementTextItem *> &, const QPointF &m, QUndoCommand * = 0);
virtual ~MoveElementsTextsCommand();
private:
MoveElementsTextsCommand(const MoveElementsTextsCommand &);
// methods
public:
virtual void undo();
virtual void redo();
virtual void move(const QPointF &);
// attributes
private:
/// diagram the movement takes place on.
Diagram *diagram;
/// text items to be moved
QSet<ElementTextItem *> texts_to_move;
/// applied movement
QPointF movement;
/// prevent the first call to redo()
bool first_redo;
};
/**
This command moves text items related to conductors on a particular
diagram.