libs/flake
KoConnectionShape Class Reference
API docs go here. More...
#include <KoConnectionShape.h>

Public Types | |
| enum | Type { Standard, Lines, Straight, Curve } |
Public Member Functions | |
| KoConnectionShape () | |
| virtual | ~KoConnectionShape () |
| bool | connectFirst (KoShape *shape, int connectionPointIndex) |
| bool | connectSecond (KoShape *shape, int connectionPointIndex) |
| void | finishLoadingConnection () |
| int | firstConnectionIndex () const |
| KoShape * | firstShape () const |
| virtual bool | loadOdf (const KoXmlElement &element, KoShapeLoadingContext &context) |
| virtual QString | pathShapeId () const |
| virtual void | saveOdf (KoShapeSavingContext &context) const |
| int | secondConnectionIndex () const |
| KoShape * | secondShape () const |
| void | setType (Type connectionType) |
| Type | type () const |
| void | updateConnections () |
Protected Member Functions | |
| void | moveHandleAction (int handleId, const QPointF &point, Qt::KeyboardModifiers modifiers=Qt::NoModifier) |
| virtual void | shapeChanged (ChangeType type, KoShape *shape) |
| void | updatePath (const QSizeF &size) |
Detailed Description
API docs go here.
Definition at line 35 of file KoConnectionShape.h.
Member Enumeration Documentation
- Enumerator:
Definition at line 38 of file KoConnectionShape.h.
Constructor & Destructor Documentation
| KoConnectionShape::KoConnectionShape | ( | ) |
Definition at line 243 of file KoConnectionShape.cpp.
| KoConnectionShape::~KoConnectionShape | ( | ) | [virtual] |
Definition at line 260 of file KoConnectionShape.cpp.
Member Function Documentation
| bool KoConnectionShape::connectFirst | ( | KoShape * | shape, | |
| int | connectionPointIndex | |||
| ) |
Sets the first shape this connector is connected to.
Passing a null pointer as the first parameter will sever the connection.
- Parameters:
-
shape the shape to connect to or null to reset the connection connectionPointIndex the index of the connection point to connect to
- Returns:
- true if connection could be established, otherwise false
Definition at line 514 of file KoConnectionShape.cpp.
| bool KoConnectionShape::connectSecond | ( | KoShape * | shape, | |
| int | connectionPointIndex | |||
| ) |
Sets the second shape the connector is connected to.
Passing a null pointer as the first parameter will sever the connection.
- Parameters:
-
shape the shape to connect to or null to reset the connection connectionPointIndex the index of the connection point to connect to
- Returns:
- true if connection could be established, otherwise false
Definition at line 536 of file KoConnectionShape.cpp.
| void KoConnectionShape::finishLoadingConnection | ( | ) |
Finishes the loading of a connection.
Definition at line 409 of file KoConnectionShape.cpp.
| int KoConnectionShape::firstConnectionIndex | ( | ) | const |
Return the connection-index in the first shape we are connected to.
In case we are not connected to a first shape the return value is undefined.
- See also:
- firstShape(), KoShape::connectionPoints()
Definition at line 564 of file KoConnectionShape.cpp.
| KoShape * KoConnectionShape::firstShape | ( | ) | const |
Return the first shape this connection is attached to, or null if none.
Definition at line 558 of file KoConnectionShape.cpp.
| bool KoConnectionShape::loadOdf | ( | const KoXmlElement & | element, | |
| KoShapeLoadingContext & | context | |||
| ) | [virtual] |
Load a shape from odf.
- Parameters:
-
context the KoShapeLoadingContext used for loading element element which represents the shape in odf
- Returns:
- false if loading failed
Reimplemented from KoPathShape.
Definition at line 316 of file KoConnectionShape.cpp.
| void KoConnectionShape::moveHandleAction | ( | int | handleId, | |
| const QPointF & | point, | |||
| Qt::KeyboardModifiers | modifiers = Qt::NoModifier | |||
| ) | [protected, virtual] |
| QString KoConnectionShape::pathShapeId | ( | ) | const [virtual] |
Returns the specific path shape id.
Path shape derived shapes have a different shape id which link them to their respective shape factories. In most cases they do not have a special tool for editing them. This function returns the specific shape id for finding the shape factory from KoShapeRegistry. The default KoPathShapeId is returned from KoShape::shapeId() so that the generic path editing tool gets activated when the shape is selected.
- Returns:
- the specific shape id
Reimplemented from KoPathShape.
Definition at line 635 of file KoConnectionShape.cpp.
| void KoConnectionShape::saveOdf | ( | KoShapeSavingContext & | context | ) | const [virtual] |
store the shape data as ODF XML.
This is the method that will be called when saving a shape as a described in OpenDocument 9.2 Drawing Shapes.
- See also:
- saveOdfAttributes
Reimplemented from KoPathShape.
Definition at line 269 of file KoConnectionShape.cpp.
| int KoConnectionShape::secondConnectionIndex | ( | ) | const |
Return the connection-index in the second shape we are connected to.
In case we are not connected to a second shape the return value is undefined.
- See also:
- firstShape(), KoShape::connectionPoints()
Definition at line 576 of file KoConnectionShape.cpp.
| KoShape * KoConnectionShape::secondShape | ( | ) | const |
Return the second shape this connection is attached to, or null if none.
Definition at line 570 of file KoConnectionShape.cpp.
| void KoConnectionShape::setType | ( | Type | connectionType | ) |
Sets the connection type.
Definition at line 588 of file KoConnectionShape.cpp.
| void KoConnectionShape::shapeChanged | ( | ChangeType | type, | |
| KoShape * | shape | |||
| ) | [protected, virtual] |
reimplemented
Definition at line 595 of file KoConnectionShape.cpp.
| KoConnectionShape::Type KoConnectionShape::type | ( | ) | const |
Returns connection type.
Definition at line 582 of file KoConnectionShape.cpp.
| void KoConnectionShape::updateConnections | ( | ) |
Updates connections to shapes.
Definition at line 207 of file KoConnectionShape.cpp.
| void KoConnectionShape::updatePath | ( | const QSizeF & | size | ) | [protected, virtual] |
The documentation for this class was generated from the following files:
