#include <PinGraphicsItem.h>


Signals | |
| void | parameterClicked (PinGraphicsItem *pinItem, Parameter *parameter) |
| Signal that is emitted when a parameter represented by the pin has been clicked. Is either emitted when a pin representing one parameter only itself has been clicked, or when an entry in the context menu of a pin representing a parameter group has been clicked. | |
Public Member Functions | |
| PinGraphicsItem (QGraphicsItem *parent, int index, Parameter *parameter) | |
| Constructor of the PinGraphicsItem class. Creates a pin graphics item representing the given parameter. | |
| PinGraphicsItem (QGraphicsItem *parent, int index, ParameterGroup *parameterGroup, Parameter::PinType pinType) | |
| Constructor of the PinGraphicsItem class. Creates a pin graphics item representing all parameters in the given parameter group. | |
| PinGraphicsItem (QGraphicsItem *parent, int index, ParameterGroup *parameterGroup, Parameter::PinType pinType, bool connected) | |
| Constructor of the PinGraphicsItem class. Creates a pin graphics item representing only connected or unconnected parameters in the given parameter group. | |
| ~PinGraphicsItem () | |
| Destructor of the PinGraphicsItem class. | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| Paints the graphics item into a graphics view. | |
| QPointF | center () const |
| Returns the center point of the pin item. | |
| void | setEnabled (bool enabled) |
| Enables or disables the graphics item. | |
| bool | setEnabled (Parameter::Type parameterType, Parameter::PinType pinType) |
| Enables the pin graphics item if it represents the given parameter type and pin type. | |
| Parameter::PinType | getPinType () const |
| Returns the pin's type. | |
| bool | represents (Parameter *parameter) const |
| Returns whether the pin represents the given parameter. | |
| bool | represents (Parameter::Type parameterType) const |
| Returns whether the pin represents parameters of the given type. | |
Protected Member Functions | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Event handler that reacts to mouse release events. | |
| void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| Event handler that reacts to context menu events. | |
Private Types | |
| enum | ConnectedType { CT_All, CT_Connected, CT_NonConnected } |
| Nested enumeration for the different types of connected states the pin represents. A pin can represent all parameters in a parameter group, just those that are connected, or just those that are not connected. More... | |
Private Slots | |
| void | removeParameter () |
| Removes the parameter (m_abstractParameter). E.g. on deletion. | |
Private Member Functions | |
| void | fillMenu (QMenu *menu, ParameterGroup *parameterGroup) |
| Fills the given menu with actions and sub menus for the parameters in the given parameter group. | |
Private Attributes | |
| AbstractParameter * | m_abstractParameter |
| The parameter or parameter group the pin represents. | |
| bool | m_isGroup |
| Represented parameter is group. | |
| bool | m_isRootGroup |
| Represented parameter is root group. | |
| Parameter::PinType | m_pinType |
| The type of parameters in a parameter group the pin represents. | |
| ConnectedType | m_connectedType |
| The connected type of parameters in a parameter group the pin represents. A pin can represent all parameters in a parameter group, just those that are connected, or just those that are not connected. | |
| Parameter::Type | m_parameterTypeFilter |
| The parameter type to filter in the context menu. | |
enum PinGraphicsItem::ConnectedType [private] |
| PinGraphicsItem::PinGraphicsItem | ( | QGraphicsItem * | parent, | |
| int | index, | |||
| Parameter * | parameter | |||
| ) |
Constructor of the PinGraphicsItem class. Creates a pin graphics item representing the given parameter.
Constructors and Destructors.
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameter | The parameter this pin item represents. |
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameter | The parameter this pin item represents. |
| PinGraphicsItem::PinGraphicsItem | ( | QGraphicsItem * | parent, | |
| int | index, | |||
| ParameterGroup * | parameterGroup, | |||
| Parameter::PinType | pinType | |||
| ) |
Constructor of the PinGraphicsItem class. Creates a pin graphics item representing all parameters in the given parameter group.
Constructor of the PinGraphicsItem class. Creates a pin graphics item representing the parameters in the given parameter group.
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameterGroup | The parameter group this pin item represents. | |
| pinType | The type that states whether the item represents input or output parameters in the given group. | |
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameterGroup | The parameter group this pin item represents. | |
| pinType | The type that states whether the item represents input or output parameters in the given group. | |
| connected | Flag that states whether the item represents connected parameters only. |
| PinGraphicsItem::PinGraphicsItem | ( | QGraphicsItem * | parent, | |
| int | index, | |||
| ParameterGroup * | parameterGroup, | |||
| Parameter::PinType | pinType, | |||
| bool | connected | |||
| ) |
Constructor of the PinGraphicsItem class. Creates a pin graphics item representing only connected or unconnected parameters in the given parameter group.
Constructor of the PinGraphicsItem class. Creates a pin graphics item representing the parameters in the given parameter group.
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameterGroup | The parameter group this pin item represents. | |
| pinType | The type that states whether the item represents input or output parameters in the given group. | |
| connected | Flag that states whether the item represents connected or unconnected parameters. | |
| parent | The graphics item this item will be a child of. | |
| index | The index of the pin in a list of pins. | |
| parameterGroup | The parameter group this pin item represents. | |
| pinType | The type that states whether the item represents input or output parameters in the given group. | |
| connected | Flag that states whether the item represents connected parameters only. |
| PinGraphicsItem::~PinGraphicsItem | ( | ) |
Destructor of the PinGraphicsItem class.
| void PinGraphicsItem::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget = 0 | |||
| ) | [virtual] |
Paints the graphics item into a graphics view.
Public Functions.
| painter | The object to use for painting. | |
| option | Style options for painting the graphics item. | |
| widget | The widget into which to paint the graphics item. |
| painter | The object to use for painting. | |
| option | Style options for painting the graphics item. | |
| widget | The widget into which to paint the graphics item. |
Implements BaseRectItem.
| QPointF PinGraphicsItem::center | ( | ) | const |
Returns the center point of the pin item.
| void PinGraphicsItem::setEnabled | ( | bool | enabled | ) |
Enables or disables the graphics item.
| enabled | The new enabled state for the item. |
| bool PinGraphicsItem::setEnabled | ( | Parameter::Type | parameterType, | |
| Parameter::PinType | pinType | |||
| ) |
Enables the pin graphics item if it represents the given parameter type and pin type.
| parameterType | The parameter type of pins to enable. | |
| pinType | The pin type of pins to enable. |
| Parameter::PinType PinGraphicsItem::getPinType | ( | ) | const |
Returns the pin's type.
| bool PinGraphicsItem::represents | ( | Parameter * | parameter | ) | const |
Returns whether the pin represents the given parameter.
| parameter | The parameter to check. |
| bool PinGraphicsItem::represents | ( | Parameter::Type | parameterType | ) | const |
Returns whether the pin represents parameters of the given type.
| parameterType | The parameter type to check. |
| void PinGraphicsItem::parameterClicked | ( | PinGraphicsItem * | pinItem, | |
| Parameter * | parameter | |||
| ) | [signal] |
Signal that is emitted when a parameter represented by the pin has been clicked. Is either emitted when a pin representing one parameter only itself has been clicked, or when an entry in the context menu of a pin representing a parameter group has been clicked.
| pinItem | The pin item emitting the signal. | |
| parameter | The parameter that was clicked. |
| void PinGraphicsItem::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Event handler that reacts to mouse release events.
Protected Functions.
| event | The object containing details about the event. |
| event | The object containing details about the event. |
Reimplemented from BaseRectItem.
| void PinGraphicsItem::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) | [protected] |
Event handler that reacts to context menu events.
| event | The object containing details about the event. |
| void PinGraphicsItem::fillMenu | ( | QMenu * | menu, | |
| ParameterGroup * | parameterGroup | |||
| ) | [private] |
Fills the given menu with actions and sub menus for the parameters in the given parameter group.
Private Functions.
| menu | The menu to which the actions and sub menus will be added. | |
| parameterGroup | The parameter group to create the context menu for. |
| menu | The menu to which the actions and sub menus will be added. | |
| parameterGroup | The parameter group to create the context menu for. |
| void PinGraphicsItem::removeParameter | ( | ) | [private, slot] |
Removes the parameter (m_abstractParameter). E.g. on deletion.
The parameter or parameter group the pin represents.
bool PinGraphicsItem::m_isGroup [private] |
Represented parameter is group.
bool PinGraphicsItem::m_isRootGroup [private] |
Represented parameter is root group.
Parameter::PinType PinGraphicsItem::m_pinType [private] |
The type of parameters in a parameter group the pin represents.
The connected type of parameters in a parameter group the pin represents. A pin can represent all parameters in a parameter group, just those that are connected, or just those that are not connected.
The parameter type to filter in the context menu.
1.5.9