#include "GraphicsConnectionCfg.h"
Public Types | |
| enum class | ConnectionShape { DirectLine , SmoothLine , XYLine , YXLine , AutoXYLine } |
Public Member Functions | |
| GraphicsConnectionCfg () | |
| GraphicsConnectionCfg (const ot::UID &_originUid, const std::string &_originConnectableName, const ot::UID &_destinationUid, const std::string &_destinationName) | |
| GraphicsConnectionCfg (const GraphicsConnectionCfg &_other) | |
| virtual | ~GraphicsConnectionCfg () |
| GraphicsConnectionCfg & | operator= (const GraphicsConnectionCfg &_other) |
| bool | operator== (const GraphicsConnectionCfg &_other) const |
| virtual void | addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override |
| Add the object contents to the provided JSON object. | |
| virtual void | setFromJsonObject (const ConstJsonObject &_object) override |
| Will set the object contents from the provided JSON object. | |
| GraphicsConnectionCfg | getReversedConnection (void) const |
| Create a copy of this connection but the origin an destination are swapped. | |
| void | setOriginUid (const ot::UID &_uid) |
| const ot::UID & | getOriginUid (void) const |
| void | setOriginConnectable (const std::string &_name) |
| const std::string & | getOriginConnectable (void) const |
| void | setDestUid (const ot::UID &_uid) |
| const ot::UID & | getDestinationUid (void) const |
| void | setDestConnectable (const std::string &_name) |
| const std::string & | getDestConnectable (void) const |
| void | setUid (const ot::UID &_uid) |
| const ot::UID & | getUid (void) const |
| void | setLineShape (ConnectionShape _shape) |
| ConnectionShape | getLineShape (void) const |
| void | setLineWidth (double _width) |
| double | getLineWidth (void) const |
| void | setLineColor (const ot::Color &_color) |
| void | setLinePainter (ot::Painter2D *_painter) |
| Set the line painter. The item takes ownership of the painter. | |
| const ot::Painter2D * | getLinePainter (void) const |
| Returns the current painter. The item keeps ownership of the painter. | |
| void | setLineStyle (LineStyle _style) |
| void | setLineStyle (const OutlineF &_style) |
| const OutlineF & | getLineStyle (void) const |
| std::string | createConnectionKey (void) const |
| std::string | createConnectionKeyReverse (void) const |
| void | setHandlesState (bool _handleState) |
| bool | getHandleState (void) const |
Public Member Functions inherited from ot::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0 |
| Add the object contents to the provided JSON object. | |
Static Public Member Functions | |
| static std::string | shapeToString (ConnectionShape _shape) |
| static ConnectionShape | stringToShape (const std::string _shape) |
|
strong |
| ot::GraphicsConnectionCfg::GraphicsConnectionCfg | ( | ) |
| ot::GraphicsConnectionCfg::GraphicsConnectionCfg | ( | const ot::UID & | _originUid, |
| const std::string & | _originConnectableName, | ||
| const ot::UID & | _destinationUid, | ||
| const std::string & | _destinationName ) |
| ot::GraphicsConnectionCfg::GraphicsConnectionCfg | ( | const GraphicsConnectionCfg & | _other | ) |
|
virtual |
|
overridevirtual |
Add the object contents to the provided JSON object.
| _document | The JSON document (used to get the allocator) |
| _object | The JSON object to add the contents to |
| std::string ot::GraphicsConnectionCfg::createConnectionKey | ( | void | ) | const |
| std::string ot::GraphicsConnectionCfg::createConnectionKeyReverse | ( | void | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the current painter. The item keeps ownership of the painter.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| ot::GraphicsConnectionCfg ot::GraphicsConnectionCfg::getReversedConnection | ( | void | ) | const |
Create a copy of this connection but the origin an destination are swapped.
|
inline |
| ot::GraphicsConnectionCfg & ot::GraphicsConnectionCfg::operator= | ( | const GraphicsConnectionCfg & | _other | ) |
| bool ot::GraphicsConnectionCfg::operator== | ( | const GraphicsConnectionCfg & | _other | ) | const |
|
inline |
|
inline |
|
overridevirtual |
Will set the object contents from the provided JSON object.
| _object | The JSON object containing the information |
| Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Implements ot::Serializable.
|
inline |
|
inline |
|
inline |
Set the line painter. The item takes ownership of the painter.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
static |