libs/flake
KoPathToolSelection Class Reference
Handle the selection of points. More...
#include <KoPathToolSelection.h>

Signals | |
| void | selectionChanged () |
Public Member Functions | |
| KoPathToolSelection (KoPathTool *tool) | |
| ~KoPathToolSelection () | |
| void | add (KoPathPoint *point, bool clear) |
| void | clear () |
| bool | contains (KoPathPoint *point) |
| virtual bool | hasSelection () |
| int | objectCount () const |
| void | paint (QPainter &painter, const KoViewConverter &converter) |
| void | remove (KoPathPoint *point) |
| void | repaint () |
| const QSet< KoPathPoint * > & | selectedPoints () const |
| QList< KoPathPointData > | selectedPointsData () const |
| QList< KoPathPointData > | selectedSegmentsData () const |
| QList< KoPathShape * > | selectedShapes () const |
| void | selectPoints (const QRectF &rect, bool clearSelection) |
| void | setSelectedShapes (const QList< KoPathShape * > shapes) |
| int | size () const |
| void | update () |
Detailed Description
Handle the selection of points.
This class handles the selection of points. It makes sure the canvas is repainted when the selection changes.
Definition at line 41 of file KoPathToolSelection.h.
Constructor & Destructor Documentation
| KoPathToolSelection::KoPathToolSelection | ( | KoPathTool * | tool | ) | [explicit] |
Definition at line 33 of file KoPathToolSelection.cpp.
| KoPathToolSelection::~KoPathToolSelection | ( | ) |
Definition at line 38 of file KoPathToolSelection.cpp.
Member Function Documentation
| void KoPathToolSelection::add | ( | KoPathPoint * | point, | |
| bool | clear | |||
| ) |
Add a point to the selection.
- Parameters:
-
point to add to the selection clear if true the selection will be cleared before adding the point
Definition at line 60 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::clear | ( | ) |
Clear the selection.
Definition at line 102 of file KoPathToolSelection.cpp.
| bool KoPathToolSelection::contains | ( | KoPathPoint * | point | ) |
Check if a point is in the selection.
- Returns:
- true when the point is in the selection, false otherwise
Definition at line 138 of file KoPathToolSelection.cpp.
| bool KoPathToolSelection::hasSelection | ( | ) | [virtual] |
reimplemented from KoToolSelection
Reimplemented from KoToolSelection.
Definition at line 243 of file KoPathToolSelection.cpp.
| int KoPathToolSelection::objectCount | ( | ) | const |
Get the number of path objects in the selection.
- Returns:
- number of path object in the point selection
Definition at line 128 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::paint | ( | QPainter & | painter, | |
| const KoViewConverter & | converter | |||
| ) |
Draw the selected points.
Definition at line 42 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::remove | ( | KoPathPoint * | point | ) |
Remove a point form the selection.
- Parameters:
-
point to remove from the selection
Definition at line 89 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::repaint | ( | ) |
trigger a repaint
Definition at line 201 of file KoPathToolSelection.cpp.
| const QSet< KoPathPoint * > & KoPathToolSelection::selectedPoints | ( | ) | const |
Get all selected points.
- Returns:
- set of selected points
Definition at line 143 of file KoPathToolSelection.cpp.
| QList< KoPathPointData > KoPathToolSelection::selectedPointsData | ( | ) | const |
Get the point data of all selected points.
This is subject to change
Definition at line 148 of file KoPathToolSelection.cpp.
| QList< KoPathPointData > KoPathToolSelection::selectedSegmentsData | ( | ) | const |
Get the point data of all selected segments.
This is subject to change
Definition at line 158 of file KoPathToolSelection.cpp.
| QList< KoPathShape * > KoPathToolSelection::selectedShapes | ( | ) | const |
Returns list of selected shapes.
Definition at line 191 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::selectionChanged | ( | ) | [signal] |
| void KoPathToolSelection::selectPoints | ( | const QRectF & | rect, | |
| bool | clearSelection | |||
| ) |
Select points in rect.
- Parameters:
-
rect the selection rectangle in document coordinates clearSelection if set clear the current selection before the selection
Definition at line 110 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::setSelectedShapes | ( | const QList< KoPathShape * > | shapes | ) |
Sets list of selected shapes.
Definition at line 196 of file KoPathToolSelection.cpp.
| int KoPathToolSelection::size | ( | ) | const |
Get the number of path points in the selection.
- Returns:
- number of points in the selection
Definition at line 133 of file KoPathToolSelection.cpp.
| void KoPathToolSelection::update | ( | ) |
Update the selection to contain only valid points.
This function checks which points are no longer valid and removes them from the selection. If e.g. some points are selected and the shape which contains the points is removed by undo, the points are no longer valid and have therefore to be removed from the selection.
Definition at line 209 of file KoPathToolSelection.cpp.
The documentation for this class was generated from the following files:
