![]() |
OpenWalnut
1.5.0dev
|
This class represents the ports a module have. More...
#include <WQtNetworkInputPort.h>
Inheritance diagram for WQtNetworkInputPort:
Collaboration diagram for WQtNetworkInputPort:Public Types | |
| enum | { Type = UserType + 11 } |
| This customize the return value of type() More... | |
Public Member Functions | |
| WQtNetworkInputPort (std::shared_ptr< WModuleInputConnector > connector) | |
| Constructor. More... | |
| ~WQtNetworkInputPort () | |
| Destructor. More... | |
| int | type () const |
| Reimplementation from QGraphicsItem. More... | |
| std::shared_ptr< WModuleInputConnector > | getConnector () |
| Returns the WModuleInputConnecter that belongs to this object. More... | |
Public Member Functions inherited from WQtNetworkPort | |
| virtual void | updateArrows () |
| The position of every arrow connected with this port is updating its position in the scene. More... | |
| virtual void | removeArrow (WQtNetworkArrow *arrow) |
| Removes a specific arrow. More... | |
| virtual void | removeArrows () |
| Removes all connected arrows. More... | |
| void | alignPosition (int size, int portNumber, QRectF rect, bool outPort) |
| Calculates the position inside a item for each port to get a correct alignment. More... | |
| virtual void | setOutPort (bool type) |
| Set the type of the port. More... | |
| virtual bool | isOutPort () |
| Returns the porttype - true if outputport, false if inputport. More... | |
| virtual QString | getPortName () |
| Returns the portname. More... | |
| virtual void | setPortName (QString str) |
| Set the Name. More... | |
| virtual int | getNumberOfArrows () |
| Return the number of connections. More... | |
| virtual void | addArrow (WQtNetworkArrow *arrow) |
| Adds an arrow to the port. More... | |
| virtual QList< WQtNetworkArrow * > | getArrowList () |
| Get a QList of all arrows connected to this port. More... | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| Actually paints the port. More... | |
Private Attributes | |
| std::shared_ptr< WModuleInputConnector > | m_connector |
| the related WModuleInputConnector More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from WQtNetworkPort | |
| static float | getMultiplePortWidth (size_t nbPorts) |
| Calculates the spaced needed for the given amount of ports. More... | |
Protected Member Functions inherited from WQtNetworkPort | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| Start drawing an arrow temporary. More... | |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| Double click on port. More... | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| Updates the temporary arrows endpoint. More... | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| Send a connect request to kernel when start- and endport are connectable. More... | |
Protected Attributes inherited from WQtNetworkPort | |
| QList< WQtNetworkArrow * > | m_arrows |
| the connected arrows More... | |
| bool | m_isOutPort |
| is the port an outport More... | |
| QString | m_name |
| the portname More... | |
This class represents the ports a module have.
Two ports from different modules can be connected by the corresponding ports.
Definition at line 40 of file WQtNetworkInputPort.h.
| anonymous enum |
This customize the return value of type()
Definition at line 58 of file WQtNetworkInputPort.h.
|
explicit |
Constructor.
| connector | the related WModuleInputConnector |
Definition at line 29 of file WQtNetworkInputPort.cpp.
References WQtNetworkPort::getPortName(), WQtNetworkPort::isOutPort(), m_connector, WQtNetworkPort::setOutPort(), and WQtNetworkPort::setPortName().
Here is the call graph for this function:| WQtNetworkInputPort::~WQtNetworkInputPort | ( | ) |
Destructor.
Definition at line 60 of file WQtNetworkInputPort.cpp.
| std::shared_ptr< WModuleInputConnector > WQtNetworkInputPort::getConnector | ( | ) |
Returns the WModuleInputConnecter that belongs to this object.
Definition at line 69 of file WQtNetworkInputPort.cpp.
References m_connector.
Referenced by WQtNetworkArrow::doneDrag(), WQtNetworkEditor::event(), WQtNetworkArrow::findNearestCompatibleInput(), and WQtNetworkPort::mouseDoubleClickEvent().
Here is the caller graph for this function:
|
virtual |
Reimplementation from QGraphicsItem.
Implements WQtNetworkPort.
Definition at line 64 of file WQtNetworkInputPort.cpp.
|
private |
the related WModuleInputConnector
Definition at line 76 of file WQtNetworkInputPort.h.
Referenced by getConnector(), and WQtNetworkInputPort().