#include <vselection.h>
Public Member Functions | |
| VSelection (VObject *parent=0L) | |
| VSelection (const VSelection &selection) | |
| virtual | ~VSelection () |
| void | draw (VPainter *painter, double zoomFactor) const |
| virtual const KoRect & | boundingBox () const |
| virtual VSelection * | clone () const |
| virtual void | accept (VVisitor &visitor) |
| void | append () |
| void | append (VObject *object) |
| void | append (const VObjectList &objects) |
| bool | append (const KoRect &rect, bool selectObjects=true, bool exclusive=true) |
| void | take (VObject &object) |
| bool | take (const KoRect &rect, bool selectObjects=true, bool exclusive=true) |
| void | clear () |
| const VObjectList & | objects () const |
| TQPtrList< VSegment > | getSegments (const KoRect &rect) |
| void | selectNodes (bool select=true) |
| VHandleNode | handleNode (const KoPoint &point) const |
| void | showHandle (bool handle=true) |
| virtual void | setSelectObjects (bool selectObjects=true) |
| Public Member Functions inherited from VObject | |
| VObject (VObject *parent, VState state=edit) | |
| VObject (const VObject &obj) | |
| virtual | ~VObject () |
| virtual DCOPObject * | dcopObject () |
| virtual void | draw (VPainter *painter, const KoRect *rect=0L) const |
| bool | boundingBoxIsInvalid () const |
| void | invalidateBoundingBox () |
| void | setParent (VObject *parent) |
| VObject * | parent () const |
| VState | state () const |
| virtual void | setState (const VState state) |
| virtual VStroke * | stroke () const |
| virtual VFill * | fill () const |
| virtual void | setStroke (const VStroke &stroke) |
| virtual void | setFill (const VFill &fill) |
| virtual void | save (TQDomElement &element) const |
| virtual void | saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const |
| virtual void | load (const TQDomElement &element) |
| virtual bool | loadOasis (const TQDomElement &element, KoOasisLoadingContext &context) |
| virtual void | insertInfrontOf (VObject *newObject, VObject *oldObject) |
| virtual TQString | name () const |
| void | setName (const TQString &s) |
| VDocument * | document () const |
| Public Member Functions inherited from VVisitor | |
| VVisitor () | |
| virtual bool | visit (VObject &object) |
| virtual void | visitVObject (VObject &object) |
| virtual void | visitVPath (VPath &composite) |
| virtual void | visitVDocument (VDocument &document) |
| virtual void | visitVGroup (VGroup &group) |
| virtual void | visitVLayer (VLayer &layer) |
| virtual void | visitVSubpath (VSubpath &path) |
| virtual void | visitVSelection (VSelection &selection) |
| virtual void | visitVText (VText &text) |
| virtual void | visitVImage (VImage &img) |
| bool | success () const |
Static Public Member Functions | |
| static void | setHandleSize (uint size) |
| static uint | handleSize () |
Additional Inherited Members | |
| Public Types inherited from VObject | |
| enum | VState { normal = 0 , normal_locked = 1 , hidden = 2 , hidden_locked = 3 , deleted = 4 , selected = 5 , edit = 6 } |
| Protected Member Functions inherited from VObject | |
| void | addStyles (const TQDomElement *style, KoOasisLoadingContext &context) |
| virtual void | saveOasisFill (KoGenStyles &mainStyles, KoGenStyle &stylesojectauto) const |
| Protected Member Functions inherited from VVisitor | |
| virtual | ~VVisitor () |
| void | setSuccess (bool success=true) |
| Protected Attributes inherited from VObject | |
| KoRect | m_boundingBox |
| VState | m_state: 8 |
| bool | m_boundingBoxIsInvalid: 1 |
| VStroke * | m_stroke |
| VFill * | m_fill |
| DCOPObject * | m_dcop |
Detailed Description
VSelection manages a set of selected vobjects.
Definition at line 61 of file vselection.h.
Constructor & Destructor Documentation
◆ VSelection() [1/2]
| VSelection::VSelection | ( | VObject * | parent = 0L | ) |
Constructs a vselection with the specified parent.
- Parameters
-
parent the selection's parent
Definition at line 35 of file vselection.cpp.
◆ VSelection() [2/2]
| VSelection::VSelection | ( | const VSelection & | selection | ) |
Constructs a vselection by copying the specified selection.
- Parameters
-
selection the selection to copy from
Definition at line 45 of file vselection.cpp.
◆ ~VSelection()
|
virtual |
Destroys the selection.
Definition at line 58 of file vselection.cpp.
Member Function Documentation
◆ accept()
|
virtual |
◆ append() [1/4]
| void VSelection::append | ( | ) |
Adds all objects to the selection.
Definition at line 121 of file vselection.cpp.
◆ append() [2/4]
| bool VSelection::append | ( | const KoRect & | rect, |
| bool | selectObjects = true, | ||
| bool | exclusive = true ) |
Adds all objects ( selectObjects == true ) or all nodes ( selectObjects == false ) within rect to the selection.
Definition at line 154 of file vselection.cpp.
◆ append() [3/4]
| void VSelection::append | ( | const VObjectList & | objects | ) |
Adds all objects of the specified object list to the selection.
- Parameters
-
objects the list of objects to add
Definition at line 146 of file vselection.cpp.
◆ append() [4/4]
| void VSelection::append | ( | VObject * | object | ) |
Adds an object to the selection.
Definition at line 133 of file vselection.cpp.
◆ boundingBox()
|
virtual |
Calculates the tightest bounding box around the object.
- Returns
- the bounding box.
Reimplemented from VObject.
Definition at line 273 of file vselection.cpp.
◆ clear()
| void VSelection::clear | ( | ) |
Removes the references to all objects, not the objects themselves.
Definition at line 195 of file vselection.cpp.
◆ clone()
|
virtual |
Create an exact copy of this object.
- Returns
- the exact object copy
Implements VObject.
Definition at line 65 of file vselection.cpp.
◆ draw()
| void VSelection::draw | ( | VPainter * | painter, |
| double | zoomFactor ) const |
Paint selected objects outline and handle.
Definition at line 213 of file vselection.cpp.
◆ getSegments()
| TQPtrList< VSegment > VSelection::getSegments | ( | const KoRect & | rect | ) |
Returns a list of segments that have at least one control point inside the specified rect.
- Parameters
-
rect the selection rect
- Returns
- the list of segments
Definition at line 306 of file vselection.cpp.
◆ handleNode()
| VHandleNode VSelection::handleNode | ( | const KoPoint & | point | ) | const |
Returns the handle node id, the KoPoint is inside.
- Parameters
-
point the selection point
- Returns
- the handle the point is inside or node_none if point is not inside any node
Definition at line 294 of file vselection.cpp.
◆ handleSize()
|
inlinestatic |
Definition at line 178 of file vselection.h.
◆ objects()
|
inline |
Read only access to the selected objects.
Definition at line 136 of file vselection.h.
◆ selectNodes()
| void VSelection::selectNodes | ( | bool | select = true | ) |
Selects or deselects all nodes.
- Parameters
-
select controls if nodes are selected or deselected
Definition at line 318 of file vselection.cpp.
◆ setHandleSize()
|
inlinestatic |
Definition at line 175 of file vselection.h.
◆ setSelectObjects()
|
inlinevirtual |
Toggles selection of objects/nodes.
- Parameters
-
selectObjects controls if objects or nodes are selected
Definition at line 173 of file vselection.h.
◆ showHandle()
|
inline |
Toggle selection handles on/off.
- Parameters
-
handle controls if handle are shown or not
Definition at line 166 of file vselection.h.
◆ take() [1/2]
| bool VSelection::take | ( | const KoRect & | rect, |
| bool | selectObjects = true, | ||
| bool | exclusive = true ) |
Removes all objects ( selectObjects == true ) or all nodes ( selectObjects == false ) within rect from the selection.
Definition at line 86 of file vselection.cpp.
◆ take() [2/2]
| void VSelection::take | ( | VObject & | object | ) |
Removes the reference to the object, not the object itself.
Definition at line 77 of file vselection.cpp.
The documentation for this class was generated from the following files:
