mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-22 19:29:58 +02:00
Minor : dynamic element text item, the undo is now animated when user edit the text from the dock widget
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5273 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -39,6 +39,7 @@ class QPropertyUndoCommand : public QUndoCommand
|
||||
|
||||
void setNewValue(const QVariant &new_value);
|
||||
void enableAnimation (bool animate = true);
|
||||
void setAnimated(bool animate = true, bool first_time = true);
|
||||
|
||||
int id() const override{return 10000;}
|
||||
bool mergeWith(const QUndoCommand *other) override;
|
||||
@@ -46,10 +47,11 @@ class QPropertyUndoCommand : public QUndoCommand
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
QObject *m_object;
|
||||
QObject *m_object = nullptr;
|
||||
const char *m_property_name;
|
||||
QVariant m_old_value, m_new_value;
|
||||
bool m_animate;
|
||||
bool m_animate = false,
|
||||
m_first_time = true;
|
||||
};
|
||||
|
||||
#endif // QPROPERTYUNDOCOMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user