19 #include <QPropertyAnimation> 32 m_property_name(property_name),
33 m_old_value(old_value),
34 m_new_value(new_value)
49 m_property_name(property_name),
50 m_old_value(old_value)
61 setText(other->text());
102 if (
id() != other->id() || other->childCount())
return false;
122 animation->start(QAbstractAnimation::DeleteWhenStopped);
131 QUndoCommand::redo();
147 animation->start(QAbstractAnimation::DeleteWhenStopped);
153 QUndoCommand::undo();
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
QPropertyUndoCommand(QObject *object, const char *property_name, const QVariant &old_value, const QVariant &new_value, QUndoCommand *parent=nullptr)
QPropertyUndoCommand::QPropertyUndoCommand Default constructor with old and new value This command do...
void enableAnimation(bool animate=true)
QPropertyUndoCommand::enableAnimation True to enable animation.
const char * m_property_name
void undo() override
QPropertyUndoCommand::undo Undo this command.
bool mergeWith(const QUndoCommand *other) override
QPropertyUndoCommand::mergeWith Try to merge this command with other command.
void redo() override
QPropertyUndoCommand::redo Redo this command.
void setAnimated(bool animate=true, bool first_time=true)
QPropertyUndoCommand::setAnimated.
void setNewValue(const QVariant &new_value)
QPropertyUndoCommand::setNewValue Set the new value of the property (set with redo) to ...