mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user