Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDeselectGlobalSelectionCommand Class Reference

The command for deselection the global selection of KisImage. More...

#include <kis_deselect_global_selection_command.h>

+ Inheritance diagram for KisDeselectGlobalSelectionCommand:

Public Member Functions

 KisDeselectGlobalSelectionCommand (KisImageWSP image, KUndo2Command *parent=0)
 
void populateChildCommands () override
 
 ~KisDeselectGlobalSelectionCommand () override
 
- Public Member Functions inherited from KisCommandUtils::AggregateCommand
 AggregateCommand (const KUndo2MagicString &text, KUndo2Command *parent=0)
 
 AggregateCommand (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 KUndo2Command * child (int index) const
 
int childCount () const
 
virtual QTime endTime () const
 
KUndo2CommandExtraData * extraData () 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 ()
 

Protected Attributes

KisImageWSP m_image
 

Additional Inherited Members

- Protected Member Functions inherited from KisCommandUtils::AggregateCommand
void addCommand (KUndo2Command *cmd)
 

Detailed Description

The command for deselection the global selection of KisImage.

Definition at line 15 of file kis_deselect_global_selection_command.h.

Constructor & Destructor Documentation

◆ KisDeselectGlobalSelectionCommand()

KisDeselectGlobalSelectionCommand::KisDeselectGlobalSelectionCommand ( KisImageWSP image,
KUndo2Command * parent = 0 )

Constructor

Parameters
imagethe image
parentthe parent command

Definition at line 20 of file kis_deselect_global_selection_command.cpp.

22 , m_image(image)
23{
24}
KUndo2MagicString kundo2_i18n(const char *text)
The AggregateCommand struct is a command with delayed initialization. On first redo() populateChildCo...

◆ ~KisDeselectGlobalSelectionCommand()

KisDeselectGlobalSelectionCommand::~KisDeselectGlobalSelectionCommand ( )
override

Definition at line 26 of file kis_deselect_global_selection_command.cpp.

27{
28}

Member Function Documentation

◆ populateChildCommands()

void KisDeselectGlobalSelectionCommand::populateChildCommands ( )
overridevirtual

Implements KisCommandUtils::AggregateCommand.

Definition at line 30 of file kis_deselect_global_selection_command.cpp.

31{
34
35 KisSelectionMaskSP selectionMask = image->rootLayer()->selectionMask();
36 if (selectionMask) {
38 addCommand(new KisChangeDeselectedMaskCommand(image, selectionMask));
39 addCommand(new KisImageLayerRemoveCommand(image, selectionMask, false, false));
41 }
42}
KisGroupLayerSP rootLayer() const
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
void addCommand(KUndo2Command *cmd)
virtual KisSelectionMaskSP selectionMask() const
Definition kis_layer.cc:504

References KisCommandUtils::AggregateCommand::addCommand(), KisCommandUtils::FlipFlopCommand::FINALIZING, KisCommandUtils::FlipFlopCommand::INITIALIZING, KIS_SAFE_ASSERT_RECOVER_RETURN, m_image, KisImage::rootLayer(), KisLayer::selectionMask(), and KisWeakSharedPtr< T >::toStrongRef().

Member Data Documentation

◆ m_image

KisImageWSP KisDeselectGlobalSelectionCommand::m_image
protected

Definition at line 29 of file kis_deselect_global_selection_command.h.


The documentation for this class was generated from the following files: