mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-27 22:30:53 +01:00
Les modifications de conducteur sont desormais annulables
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@140 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "qet.h"
|
||||
#include "diagram.h"
|
||||
#include "diagramtextitem.h"
|
||||
#include "conducer.h"
|
||||
#include <QtGui>
|
||||
/**
|
||||
Cette classe represente l'action d'ajouter un element au schema
|
||||
@@ -182,7 +183,6 @@ class ChangeDiagramTextCommand : public QUndoCommand {
|
||||
QString text_after;
|
||||
/// booleen pour ne pas executer le premier redo()
|
||||
bool first_redo;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -206,4 +206,32 @@ class RotateElementsCommand : public QUndoCommand {
|
||||
/// texte avant changement
|
||||
QHash<Element *, QET::Orientation> elements_to_rotate;
|
||||
};
|
||||
|
||||
/**
|
||||
Cette classe represente l'action de modifier un conducteur
|
||||
*/
|
||||
class ChangeConducerCommand : public QUndoCommand {
|
||||
// constructeurs, destructeur
|
||||
public:
|
||||
ChangeConducerCommand(Conducer *, const ConducerProfile &, const ConducerProfile &, QUndoCommand * = 0);
|
||||
virtual ~ChangeConducerCommand();
|
||||
private:
|
||||
ChangeConducerCommand(const ChangeConducerCommand &);
|
||||
|
||||
// methodes
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
// attributs
|
||||
private:
|
||||
/// DiagramTextItem modifie
|
||||
Conducer *conducer;
|
||||
/// texte avant changement
|
||||
ConducerProfile old_profile;
|
||||
/// texte apres changement
|
||||
ConducerProfile new_profile;
|
||||
/// booleen pour ne pas executer le premier redo()
|
||||
bool first_redo;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user