mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
diagram image: add undo/redo command and save/load to .qet file
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2498 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -561,4 +561,22 @@ class ChangeSeveralConductorsPropertiesCommand : public QUndoCommand {
|
||||
/// track whether post-change properties were set
|
||||
bool new_settings_set;
|
||||
};
|
||||
|
||||
class ImageResizerCommand : public QUndoCommand {
|
||||
//constructor and destructor
|
||||
public:
|
||||
ImageResizerCommand (DiagramImageItem *image, qreal &old_, qreal &new_, QUndoCommand *parent = 0);
|
||||
virtual ~ImageResizerCommand();
|
||||
|
||||
//methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
//attributes
|
||||
private:
|
||||
DiagramImageItem *image_;
|
||||
qreal old_size, new_size;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user