|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
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;
64 #endif // QPROPERTYUNDOCOMMAND_H
void enableAnimation(bool animate=true)
QPropertyUndoCommand::enableAnimation True to enable animation.
Definition: qpropertyundocommand.cpp:92
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...
Definition: qpropertyundocommand.cpp:31
QVariant m_new_value
Definition: qpropertyundocommand.h:59
bool mergeWith(const QUndoCommand *other) override
QPropertyUndoCommand::mergeWith Try to merge this command with other command.
Definition: qpropertyundocommand.cpp:115
void redo() override
QPropertyUndoCommand::redo Redo this command.
Definition: qpropertyundocommand.cpp:129
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
bool m_first_time
Definition: qpropertyundocommand.h:61
QObject * m_object
Definition: qpropertyundocommand.h:57
const char * m_property_name
Definition: qpropertyundocommand.h:58
void setAnimated(bool animate=true, bool first_time=true)
QPropertyUndoCommand::setAnimated.
Definition: qpropertyundocommand.cpp:103
void undo() override
QPropertyUndoCommand::undo Undo this command.
Definition: qpropertyundocommand.cpp:154
QVariant m_old_value
Definition: qpropertyundocommand.h:59
bool m_animate
Definition: qpropertyundocommand.h:60
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