|
Krita Source Code Documentation
|
#include <KisImageAnimSettingCommand.h>
Inheritance diagram for KisImageAnimSettingCommand:Classes | |
| struct | Settings |
Private Attributes | |
| Settings | m_after |
| KisImageAnimationInterface * | m_animInterface |
| Settings | m_before |
Definition at line 18 of file KisImageAnimSettingCommand.h.
|
delete |
|
delete |
| KisImageAnimSettingCommand::KisImageAnimSettingCommand | ( | KisImageAnimationInterface *const | p_animInterface, |
| Settings | p_after, | ||
| KUndo2Command * | parent = nullptr ) |
Definition at line 12 of file KisImageAnimSettingCommand.cpp.
References KisImageAnimationInterface::documentPlaybackRange(), KisTimeSpan::end(), KisImageAnimationInterface::framerate(), m_before, and KisTimeSpan::start().
|
overridevirtual |
command can be merged with (*this) command using KUndo2Command::mergeWith() call.WARNING: if canMergeWith() returned true, then mergeWith() must also return true. Otherwise KisSavedMacroCommand will be able to enter inconsistent state and assert.
Implements KisAsynchronouslyMergeableCommandInterface.
Definition at line 51 of file KisImageAnimSettingCommand.cpp.
|
overridevirtual |
Returns the ID of this command.
A command ID is used in command compression. It must be an integer unique to this command's class, or -1 if the command doesn't support compression.
If the command supports compression this function must be overridden in the derived class to return the correct ID. The base implementation returns -1.
KUndo2QStack::push() will only try to merge two commands if they have the same ID, and the ID is not -1.
Reimplemented from KUndo2Command.
Definition at line 46 of file KisImageAnimSettingCommand.cpp.
References KisCommandUtils::ImageAnimSettingCommandId.
|
overridevirtual |
Attempts to merge this command with command. Returns true on success; otherwise returns false.
If this function returns true, calling this command's redo() must have the same effect as redoing both this command and command. Similarly, calling this command's undo() must have the same effect as undoing command and this command.
KUndo2QStack will only try to merge two commands if they have the same id, and the id is not -1.
The default implementation returns false.
Reimplemented from KUndo2Command.
Definition at line 58 of file KisImageAnimSettingCommand.cpp.
References m_after.
|
delete |
|
overridevirtual |
Applies a change to the document. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.
The default implementation calls redo() on all child commands.
Reimplemented from KUndo2Command.
Definition at line 24 of file KisImageAnimSettingCommand.cpp.
References KisImageAnimSettingCommand::Settings::endFrame, KisImageAnimSettingCommand::Settings::FPS, KisTimeSpan::fromTimeToTime(), KIS_ASSERT, m_after, m_animInterface, KUndo2Command::redo(), KisImageAnimationInterface::setDocumentRange(), KisImageAnimationInterface::setFramerate(), and KisImageAnimSettingCommand::Settings::startFrame.
|
overridevirtual |
Reverts a change to the document. After undo() is called, the state of the document should be the same as before redo() was called. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.
The default implementation calls undo() on all child commands in reverse order.
Reimplemented from KUndo2Command.
Definition at line 35 of file KisImageAnimSettingCommand.cpp.
References KisImageAnimSettingCommand::Settings::endFrame, KisImageAnimSettingCommand::Settings::FPS, KisTimeSpan::fromTimeToTime(), KIS_ASSERT, m_animInterface, m_before, KisImageAnimationInterface::setDocumentRange(), KisImageAnimationInterface::setFramerate(), KisImageAnimSettingCommand::Settings::startFrame, and KUndo2Command::undo().
|
private |
Definition at line 44 of file KisImageAnimSettingCommand.h.
|
private |
Definition at line 41 of file KisImageAnimSettingCommand.h.
|
private |
Definition at line 43 of file KisImageAnimSettingCommand.h.