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

Public Member Functions

void redo () override
 
 SetKeyStrokeColorsCommand (const QList< KeyStroke > newList, QList< KeyStroke > *list, KisColorizeMaskSP node)
 
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 ()
 

Private Attributes

QList< KeyStroke > * m_list
 
QList< KeyStrokem_newList
 
KisColorizeMaskSP m_node
 
QList< KeyStrokem_oldList
 

Detailed Description

Definition at line 900 of file kis_colorize_mask.cpp.

Constructor & Destructor Documentation

◆ SetKeyStrokeColorsCommand()

SetKeyStrokeColorsCommand::SetKeyStrokeColorsCommand ( const QList< KeyStroke > newList,
QList< KeyStroke > * list,
KisColorizeMaskSP node )
inline

Definition at line 901 of file kis_colorize_mask.cpp.

902 : m_newList(newList),
903 m_oldList(*list),
904 m_list(list),
905 m_node(node) {}

Member Function Documentation

◆ redo()

void SetKeyStrokeColorsCommand::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 907 of file kis_colorize_mask.cpp.

907 {
908 *m_list = m_newList;
909
910 m_node->setNeedsUpdate(true);
912 m_node->setDirty();
913 }
void setNeedsUpdate(bool value)
void sigKeyStrokesListChanged()
virtual void setDirty()
Definition kis_node.cpp:577

◆ undo()

void SetKeyStrokeColorsCommand::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 915 of file kis_colorize_mask.cpp.

915 {
916 *m_list = m_oldList;
917
918 m_node->setNeedsUpdate(true);
920 m_node->setDirty();
921 }

Member Data Documentation

◆ m_list

QList<KeyStroke>* SetKeyStrokeColorsCommand::m_list
private

Definition at line 926 of file kis_colorize_mask.cpp.

◆ m_newList

QList<KeyStroke> SetKeyStrokeColorsCommand::m_newList
private

Definition at line 924 of file kis_colorize_mask.cpp.

◆ m_node

KisColorizeMaskSP SetKeyStrokeColorsCommand::m_node
private

Definition at line 927 of file kis_colorize_mask.cpp.

◆ m_oldList

QList<KeyStroke> SetKeyStrokeColorsCommand::m_oldList
private

Definition at line 925 of file kis_colorize_mask.cpp.


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