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:
xavierqet
2007-09-27 17:42:02 +00:00
parent 27e8ced638
commit 2c184a46da
6 changed files with 129 additions and 12 deletions

View File

@@ -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