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:
blacksun
2018-03-24 13:45:48 +00:00
parent ae8f23f659
commit a58274c219
3 changed files with 33 additions and 10 deletions

View File

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