Krita Source Code Documentation
Loading...
Searching...
No Matches
SelectionHandler Class Reference
+ Inheritance diagram for SelectionHandler:

Public Member Functions

bool hasSelection () override
 return true if the tool currently has something selected that can be copied or deleted.
 
 SelectionHandler (DefaultTool *parent)
 
- Public Member Functions inherited from KoToolSelection
 KoToolSelection (QObject *parent=0)
 
 ~KoToolSelection () override
 

Private Attributes

DefaultTool * m_parent
 

Detailed Description

Definition at line 404 of file DefaultTool.cpp.

Constructor & Destructor Documentation

◆ SelectionHandler()

SelectionHandler::SelectionHandler ( DefaultTool * parent)
inline

Definition at line 407 of file DefaultTool.cpp.

408 : KoToolSelection(parent)
409 , m_parent(parent)
410 {
411 }
KoToolSelection(QObject *parent=0)
DefaultTool * m_parent

Member Function Documentation

◆ hasSelection()

bool SelectionHandler::hasSelection ( )
inlineoverridevirtual

return true if the tool currently has something selected that can be copied or deleted.

Reimplemented from KoToolSelection.

Definition at line 413 of file DefaultTool.cpp.

413 {
414 KoSelection *selection = m_parent->koSelection();
415 if (selection) {
416 return selection->count() > 0;
417 }
418 return false;
419 }
virtual KoSelection * koSelection() const
int count() const
return the selection count, i.e. the number of all selected shapes

References KoSelection::count(), DefaultTool::koSelection(), and m_parent.

Member Data Documentation

◆ m_parent

DefaultTool* SelectionHandler::m_parent
private

Definition at line 422 of file DefaultTool.cpp.


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