18 #ifndef QPROPERTYUNDOCOMMAND_H 19 #define QPROPERTYUNDOCOMMAND_H 21 #include <QUndoCommand> 36 QPropertyUndoCommand(QObject *
object,
const char *property_name,
const QVariant &old_value,
const QVariant &new_value, QUndoCommand *parent =
nullptr);
37 QPropertyUndoCommand(QObject *
object,
const char *property_name,
const QVariant &old_value, QUndoCommand *parent =
nullptr);
42 void setAnimated(
bool animate =
true,
bool first_time =
true);
44 int id()
const override{
return 10000;}
45 bool mergeWith(
const QUndoCommand *other)
override;
57 #endif // QPROPERTYUNDOCOMMAND_H 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 ...