The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can use QPropertyAnimation to animate the change when undo/redo is call To use animation call setAnimated(true). By default animation is disable. Some QVariant date can't be animated and result this command don't work.
More...
#include <qpropertyundocommand.h>
Inherits QUndoCommand.
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can use QPropertyAnimation to animate the change when undo/redo is call To use animation call setAnimated(true). By default animation is disable. Some QVariant date can't be animated and result this command don't work.
◆ QPropertyUndoCommand() [1/3]
QPropertyUndoCommand::QPropertyUndoCommand |
( |
QObject * |
object, |
|
|
const char * |
property_name, |
|
|
const QVariant & |
old_value, |
|
|
const QVariant & |
new_value, |
|
|
QUndoCommand * |
parent = nullptr |
|
) |
| |
◆ QPropertyUndoCommand() [2/3]
QPropertyUndoCommand::QPropertyUndoCommand |
( |
QObject * |
object, |
|
|
const char * |
property_name, |
|
|
const QVariant & |
old_value, |
|
|
QUndoCommand * |
parent = nullptr |
|
) |
| |
QPropertyUndoCommand::QPropertyUndoCommand Default constructor with old value. Call setNewValue to setup the new value of the edited QObject This command don't take ownership of object.
- Parameters
-
object | |
property_name | |
old_value | |
parent | |
◆ QPropertyUndoCommand() [3/3]
◆ enableAnimation()
void QPropertyUndoCommand::enableAnimation |
( |
bool |
animate = true | ) |
|
◆ id()
int QPropertyUndoCommand::id |
( |
| ) |
const |
|
inlineoverride |
◆ mergeWith()
bool QPropertyUndoCommand::mergeWith |
( |
const QUndoCommand * |
other | ) |
|
|
override |
◆ redo()
void QPropertyUndoCommand::redo |
( |
| ) |
|
|
override |
◆ setAnimated()
void QPropertyUndoCommand::setAnimated |
( |
bool |
animate = true , |
|
|
bool |
first_time = true |
|
) |
| |
QPropertyUndoCommand::setAnimated.
- Parameters
-
animate | = true for animate this undo |
first_time | = if true, the first animation is done at the first call of redo if false, the first animation is done at the second call of redo. |
◆ setNewValue()
void QPropertyUndoCommand::setNewValue |
( |
const QVariant & |
new_value | ) |
|
◆ undo()
void QPropertyUndoCommand::undo |
( |
| ) |
|
|
override |
◆ m_animate
bool QPropertyUndoCommand::m_animate = false |
|
private |
◆ m_first_time
bool QPropertyUndoCommand::m_first_time = true |
|
private |
◆ m_new_value
QVariant QPropertyUndoCommand::m_new_value |
|
private |
◆ m_object
QObject* QPropertyUndoCommand::m_object = nullptr |
|
private |
◆ m_old_value
QVariant QPropertyUndoCommand::m_old_value |
|
private |
◆ m_property_name
const char* QPropertyUndoCommand::m_property_name |
|
private |
The documentation for this class was generated from the following files: