mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Revamp the class link and unlink element command
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4001 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -547,41 +547,4 @@ class ChangeShapeStyleCommand : public QUndoCommand {
|
||||
Qt::PenStyle old_style, new_style;
|
||||
Diagram *diagram;
|
||||
};
|
||||
|
||||
class LinkElementsCommand : public QUndoCommand {
|
||||
public:
|
||||
// constructor destructor
|
||||
LinkElementsCommand (Element *elmt1, Element *elmt2, QUndoCommand *parent = 0);
|
||||
LinkElementsCommand (Element *elmt1, QList <Element *> &elmtList, QUndoCommand *parent = 0);
|
||||
virtual ~LinkElementsCommand();
|
||||
//methods
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
private:
|
||||
//attributes
|
||||
Diagram *diagram_;
|
||||
Element *element_;
|
||||
QList <Element *> elmt_list;
|
||||
QList <Element *> previous_linked;
|
||||
bool first_redo;
|
||||
};
|
||||
|
||||
class unlinkElementsCommand : public QUndoCommand {
|
||||
public:
|
||||
//constructor destructor
|
||||
unlinkElementsCommand (Element *elmt1, Element *elmt2 = 0, QUndoCommand *parent = 0);
|
||||
unlinkElementsCommand (Element *elmt1, QList <Element *> &elmtList, QUndoCommand *parent = 0);
|
||||
virtual ~unlinkElementsCommand();
|
||||
//methods
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
private:
|
||||
//attributes
|
||||
Diagram *diagram_;
|
||||
Element *element_;
|
||||
QList <Element *> elmt_list;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user