Krita Source Code Documentation
Loading...
Searching...
No Matches
KisChangeOverlayWrapperCommand Struct Reference
+ Inheritance diagram for KisChangeOverlayWrapperCommand:

Public Member Functions

 KisChangeOverlayWrapperCommand (KisOverlayPaintDeviceWrapper::Private *d, KUndo2Command *parent=0)
 
void redo () override
 
void undo () override
 
- Public Member Functions inherited from KUndo2Command
QString actionText () const
 
virtual bool canAnnihilateWith (const KUndo2Command *other) const
 
const KUndo2Commandchild (int index) const
 
int childCount () const
 
virtual QTime endTime () const
 
KUndo2CommandExtraDataextraData () const
 
bool hasParent () const
 
virtual int id () const
 
virtual bool isMerged () const
 
 KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0)
 
 KUndo2Command (KUndo2Command *parent=0)
 
virtual QVector< KUndo2Command * > mergeCommandsVector () const
 
virtual bool mergeWith (const KUndo2Command *other)
 
virtual void redoMergedCommands ()
 
void setEndTime ()
 
virtual void setEndTime (const QTime &time)
 
void setExtraData (KUndo2CommandExtraData *data)
 
void setText (const KUndo2MagicString &text)
 
void setTime ()
 
virtual void setTime (const QTime &time)
 
virtual void setTimedID (int timedID)
 
KUndo2MagicString text () const
 
virtual QTime time () const
 
virtual int timedId () const
 
virtual bool timedMergeWith (KUndo2Command *other)
 
virtual void undoMergedCommands ()
 
virtual ~KUndo2Command ()
 

Public Attributes

KisOverlayPaintDeviceWrapper::Privatem_d
 
QSharedPointer< KisRectsGridm_newRectsGrid
 
QSharedPointer< KisRectsGridm_oldRectsGrid
 

Detailed Description

Definition at line 41 of file KisOverlayPaintDeviceWrapper.cpp.

Constructor & Destructor Documentation

◆ KisChangeOverlayWrapperCommand()

KisChangeOverlayWrapperCommand::KisChangeOverlayWrapperCommand ( KisOverlayPaintDeviceWrapper::Private * d,
KUndo2Command * parent = 0 )
inline

Definition at line 43 of file KisOverlayPaintDeviceWrapper.cpp.

44 : KUndo2Command(parent)
45 , m_d(d)
46 {
47 }
KUndo2CommandPrivate * d
Definition kundo2stack.h:88
KUndo2Command(KUndo2Command *parent=0)
KisOverlayPaintDeviceWrapper::Private * m_d

Member Function Documentation

◆ redo()

void KisChangeOverlayWrapperCommand::redo ( )
inlineoverridevirtual

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.

See also
undo()

Reimplemented from KUndo2Command.

Definition at line 55 of file KisOverlayPaintDeviceWrapper.cpp.

References KisOverlayPaintDeviceWrapper::Private::grid, m_d, m_newRectsGrid, KisOverlayPaintDeviceWrapper::Private::previousGrid, and KUndo2Command::redo().

◆ undo()

void KisChangeOverlayWrapperCommand::undo ( )
inlineoverridevirtual

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.

See also
redo()

Reimplemented from KUndo2Command.

Definition at line 49 of file KisOverlayPaintDeviceWrapper.cpp.

49 {
53 }
virtual void undo()
QSharedPointer< KisRectsGrid > m_oldRectsGrid

References KisOverlayPaintDeviceWrapper::Private::grid, m_d, m_oldRectsGrid, KisOverlayPaintDeviceWrapper::Private::previousGrid, and KUndo2Command::undo().

Member Data Documentation

◆ m_d

KisOverlayPaintDeviceWrapper::Private* KisChangeOverlayWrapperCommand::m_d

Definition at line 63 of file KisOverlayPaintDeviceWrapper.cpp.

◆ m_newRectsGrid

QSharedPointer<KisRectsGrid> KisChangeOverlayWrapperCommand::m_newRectsGrid

Definition at line 62 of file KisOverlayPaintDeviceWrapper.cpp.

◆ m_oldRectsGrid

QSharedPointer<KisRectsGrid> KisChangeOverlayWrapperCommand::m_oldRectsGrid

Definition at line 61 of file KisOverlayPaintDeviceWrapper.cpp.


The documentation for this struct was generated from the following file: