roviz  0.7
Code Documentation of roviz
Signals | Public Member Functions | List of all members
ItemInput Class Reference

The ItemInput class represents an input that belongs to an item. More...

#include <item_input.h>

Inheritance diagram for ItemInput:
Inheritance graph
Collaboration diagram for ItemInput:
Collaboration graph

Signals

void outputDisconnected ()
 This signal is emitted whenever the output this input is connected to is disconnected. More...
 
void outputConnected ()
 This signal is emitted whenever this input is connected to a new output. More...
 
void dataChanged ()
 This signal is emitted whenever the data provided by this input has changed.
 
- Signals inherited from AbstractItemInputOutputBase
void positionChanged ()
 This signal is emitted whenever this objects local or scene position has changed. More...
 

Public Member Functions

 ItemInput (AbstractItem *owner, int transportType, QString const &description, QRectF const &shape={0, 0, 0, 0})
 Constructs an ItemInput. More...
 
virtual bool isConnected () const
 
ItemOutputoutput () const
 
QObject * data () const
 
virtual QPointF scenePosition () const
 Returns the scene position of this object. More...
 
void disconnectOutput ()
 Disconnects the output this input is connected to, if any. More...
 
bool connectOutput (ItemOutput *output)
 Connects this input to the output output. More...
 
- Public Member Functions inherited from AbstractItemInputOutputBase
 AbstractItemInputOutputBase (class AbstractItem *parent, int transportType, QString const &description, QRectF const &shape)
 Constructs an AbstractItemInputOutputBase. More...
 
int transportType () const
 Returns the type of data this object handles. More...
 
AbstractItemowner () const
 Returns the owner of this object. More...
 
virtual QPointF localPosition () const
 Returns the local position of this object. More...
 
virtual QRectF boundingRect () const
 
virtual void paint (QPainter *painter, QStyleOptionGraphicsItem const *option, QWidget *widget)
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractItemInputOutputBase
void setLocalPosition (QPointF const &position)
 Sets the local position of this object. More...
 
void updateScenePosition ()
 Updates the scene position. Causes this objects position within the item scene to be updated. More...
 

Detailed Description

The ItemInput class represents an input that belongs to an item.

An input can be connected to zero or one output from which it receives data.

An inputs transport type specifies what type of data it supports. Only inputs and outputs that have the same transport type may be connected to each other. See the AbstractItem class for a description of the transport type.

See also
Item
ItemOutput
ItemInputOutputBase

Constructor & Destructor Documentation

◆ ItemInput()

ItemInput::ItemInput ( AbstractItem owner,
int  transportType,
QString const &  description,
QRectF const &  shape = {0, 0, 0, 0} 
)

Constructs an ItemInput.

Parameters
ownerThe Item this input belongs to
transportTypeThe type of data this input accepts
descriptionA description of this input that is shown to the user
shapeThe shape of this input

Member Function Documentation

◆ connectOutput()

bool ItemInput::connectOutput ( ItemOutput output)

Connects this input to the output output.

Parameters
outputThe output this input is to be connected to
Returns
true upon success, false otherwise. The function fails if this input is alread connected to an output, a NULL output is provided or the types of data of the input and output do not match.
See also
disconnectOutput
output
Here is the call graph for this function:

◆ data()

QObject * ItemInput::data ( ) const
virtual
Returns
A pointer to the data provided by this input

Implements AbstractItemInputOutputBase.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnectOutput()

void ItemInput::disconnectOutput ( )

Disconnects the output this input is connected to, if any.

See also
connectOutput
output
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isConnected()

bool ItemInput::isConnected ( ) const
virtual
Returns
true if this input is connected to an output, false otherwise
See also
connectOutput
disconnectOutput

Implements AbstractItemInputOutputBase.

Here is the caller graph for this function:

◆ output()

ItemOutput * ItemInput::output ( ) const
Returns
A pointer to the output this input is connected to, or NULL if this input is not connected to any output.
See also
connectOutput
disconnectOutput
Here is the caller graph for this function:

◆ outputConnected

void ItemInput::outputConnected ( )
signal

This signal is emitted whenever this input is connected to a new output.

See also
outputDisconnected

◆ outputDisconnected

void ItemInput::outputDisconnected ( )
signal

This signal is emitted whenever the output this input is connected to is disconnected.

See also
outputConnected

◆ scenePosition()

QPointF ItemInput::scenePosition ( ) const
virtual

Returns the scene position of this object.

Returns
The scene position of this object
See also
localPosition

Reimplemented from AbstractItemInputOutputBase.

Here is the call graph for this function:

The documentation for this class was generated from the following files: