18#ifndef QPROPERTYUNDOCOMMAND_H
19#define QPROPERTYUNDOCOMMAND_H
21#include <QUndoCommand>
37 const char *property_name,
38 const QVariant &old_value,
39 const QVariant &new_value,
40 QUndoCommand *parent =
nullptr);
42 const char *property_name,
43 const QVariant &old_value,
44 QUndoCommand *parent =
nullptr);
49 void setAnimated(
bool animate =
true,
bool first_time =
true);
51 int id()
const override{
return 10000;}
52 bool mergeWith(
const QUndoCommand *other)
override;
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
Definition qpropertyundocommand.h:34
int id() const override
Definition qpropertyundocommand.h:51
void undo() override
QPropertyUndoCommand::undo Undo this command.
Definition qpropertyundocommand.cpp:154
bool m_animate
Definition qpropertyundocommand.h:60
bool m_first_time
Definition qpropertyundocommand.h:61
QVariant m_old_value
Definition qpropertyundocommand.h:59
void enableAnimation(bool animate=true)
QPropertyUndoCommand::enableAnimation True to enable animation.
Definition qpropertyundocommand.cpp:92
QObject * m_object
Definition qpropertyundocommand.h:57
void setAnimated(bool animate=true, bool first_time=true)
QPropertyUndoCommand::setAnimated.
Definition qpropertyundocommand.cpp:103
QVariant m_new_value
Definition qpropertyundocommand.h:59
void redo() override
QPropertyUndoCommand::redo Redo this command.
Definition qpropertyundocommand.cpp:129
const char * m_property_name
Definition qpropertyundocommand.h:58
bool mergeWith(const QUndoCommand *other) override
QPropertyUndoCommand::mergeWith Try to merge this command with other command.
Definition qpropertyundocommand.cpp:115
void setNewValue(const QVariant &new_value)
QPropertyUndoCommand::setNewValue Set the new value of the property (set with redo) to new_value.
Definition qpropertyundocommand.cpp:83