OpenWalnut  1.5.0dev
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
WQtNetworkItem Class Reference

This class represents a WModule as QGraphicsItem and contains a reference to its in- and outports. More...

#include <WQtNetworkItem.h>

+ Inheritance diagram for WQtNetworkItem:
+ Collaboration diagram for WQtNetworkItem:

Public Types

enum  { Type = UserType + 20 }
 This customize the return value of type() More...
 

Public Slots

void positionChanged ()
 Called whenever the item moves around. More...
 

Signals

void dead (WQtNetworkItem *item)
 The item is now dead. More...
 

Public Member Functions

 WQtNetworkItem (WQtNetworkEditor *editor, std::shared_ptr< WModule > module)
 Constructs new item in the network scene. More...
 
virtual ~WQtNetworkItem ()
 Destructor. More...
 
int type () const
 Reimplementation from QGraphicsItem. More...
 
virtual QRectF boundingRect () const
 The bounding area of the item. More...
 
void addInputPort (WQtNetworkInputPort *inPort)
 Add a port to the item. More...
 
void addOutputPort (WQtNetworkOutputPort *outPort)
 Add a port to the item. More...
 
QList< WQtNetworkInputPort * > getInPorts ()
 Returns the item inports. More...
 
QList< WQtNetworkOutputPort * > getOutPorts ()
 Returns the item outports. More...
 
void fitLook (float maximumWidth=WNETWORKITEM_MAXIMUM_WIDTH, float minimumWidth=WNETWORKITEM_MINIMUM_WIDTH)
 This method aligns the in- and outports as well as the modulename in a regular way. More...
 
void setTextItem (QGraphicsTextItem *text)
 Set the QGraphicsTextItem ( the caption ) of the item. More...
 
QString getText ()
 Get the caption as QString. More...
 
std::shared_ptr< WModulegetModule ()
 Get the WModule represented by this object. More...
 
void activate (bool active)
 Here the module can be enabled when the WModule is ready. More...
 
virtual void updater ()
 Can be used for polling the module states. More...
 
void setCrashed ()
 Mark this module as crashed. More...
 
QTimeLine * die ()
 Animate removal and finally, instruct the owning network editor to remove the item. More...
 
void animatedMoveTo (QPointF pos)
 Move item to specified position smoothly, via animation. More...
 
void animatedMoveTo (qreal x, qreal y)
 Move item to specified position smoothly, via animation. More...
 
void moveTo (QPointF pos)
 Move item to specified position smoothly, no animation. More...
 
void moveTo (qreal x, qreal y)
 Move item to specified position smoothly, no animation. More...
 
void setLayedOut (bool layedOut=true)
 Marks the item as already layed out. More...
 
bool wasLayedOut () const
 Checks whether the item was layed out earlier. More...
 
void setManuallyPlaced (bool manual=true)
 Mark item as manually placed. More...
 
bool wasManuallyPlaced () const
 Item was placed by hand. More...
 

Protected Member Functions

virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 If the item is changed we want to get notified. More...
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
 If the WQtNetworkItem is moved, then the contained ports have to update the connected WQtNetworkArrows for correct alignment. More...
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Reimplemented from QGraphicsRectItem. More...
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 Mouse was released. More...
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 Called upon double click. More...
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 If the cursor enters the item, the item gets a green color. More...
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 If the cursor leaves the item, the item gets his default color. More...
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *w)
 Draw some customized stuff in the scene. More...
 
void setText (std::string text)
 Set the new title text. More...
 

Private Types

enum  State { Disabled = 0 , Normal , Crashed }
 Denotes the current state this item is in. More...
 

Private Slots

void removalAnimationDone ()
 Called when the m_removalAnimationTimer finishes. More...
 
void animationBlendOutTick (qreal value)
 Called when the animation timers tick and progress in timeline. More...
 
void animationBlendInTick (qreal value)
 Called when the animation timers tick and progress in timeline. More...
 
void moveFinished ()
 Called whenever a animated move was finished. More...
 

Private Member Functions

void changeState (State state)
 Update the visual state of the item. More...
 
void runtimeNameChanged ()
 Update name as it has been changed. More...
 
void runtimeNameChangedGT ()
 Update name as it has been changed. More...
 

Private Attributes

std::shared_ptr< WModulem_module
 the module More...
 
QList< WQtNetworkInputPort * > m_inPorts
 the input ports of the item More...
 
QList< WQtNetworkOutputPort * > m_outPorts
 the output ports of the item More...
 
QRectF m_rect
 the size of the items rect More...
 
float m_width
 the width of the rect More...
 
float m_height
 the height of the rect More...
 
std::string m_textFull
 always contains the unclipped text of m_text More...
 
QGraphicsTextItem * m_text
 the caption More...
 
std::string m_subtitleFull
 always contains the unclipped text of m_subtitle More...
 
QGraphicsTextItem * m_subtitle
 the caption More...
 
WQtNetworkEditorm_networkEditor
 the related WQtNetworkEditor More...
 
QColor m_itemColor
 the color of the item. Depends on type (source, sink, ...). More...
 
State m_currentState
 denotes the state the item currently is in More...
 
WQtNetworkItemActivatorm_hidden
 indicator showing if module's graphics are activated (allows to activate it) More...
 
bool m_isHovered
 If true, the item is hovered. More...
 
bool m_isSelected
 If true, the item is selected. More...
 
bool m_busyIsDetermined
 If true, a percentage is shown. More...
 
float m_busyPercent
 Counter used for busy indication. More...
 
bool m_busyIndicatorShow
 If true, the busy indication is active. More...
 
bool m_forceUpdate
 If true, the next call to update() will force a redraw. More...
 
float m_itemBestWidth
 Optimal width for this module. More...
 
QWidget * m_propertyToolWindow
 The property toolbox window if any. More...
 
QGraphicsItemAnimation * m_animation
 Animation for appearance and deletion. More...
 
QTimeLine * m_animationTimer
 Timer for the animation. More...
 
QGraphicsItemAnimation * m_removalAnimation
 Animation for appearance and deletion. More...
 
QTimeLine * m_removalAnimationTimer
 Timer for the animation. More...
 
QPointF m_dragStartPosition
 Keep track of the mouse dragging of this item. More...
 
bool m_dragging
 Dragging? More...
 
QPointF m_draggingStart
 Start position of dragging. More...
 
bool m_wasLayedOut
 Mark item as already positioned. More...
 
bool m_wasManuallyPlaced
 Item has been placed manually. More...
 
bool m_noDrag
 If true, the mouse events do not cause a drag and move operation. More...
 
boost::signals2::connection m_runtimeNameConnection
 Keep track of runtime name changes of this module. More...
 

Detailed Description

This class represents a WModule as QGraphicsItem and contains a reference to its in- and outports.

Definition at line 52 of file WQtNetworkItem.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

This customize the return value of type()

Definition at line 73 of file WQtNetworkItem.h.

◆ State

enum WQtNetworkItem::State
private

Denotes the current state this item is in.

Definition at line 314 of file WQtNetworkItem.h.

Constructor & Destructor Documentation

◆ WQtNetworkItem()

WQtNetworkItem::WQtNetworkItem ( WQtNetworkEditor editor,
std::shared_ptr< WModule module 
)

Constructs new item in the network scene.

Parameters
editorthe editor containing this item
modulethe module represented by the item

Definition at line 49 of file WQtNetworkItem.cpp.

References activate(), addInputPort(), addOutputPort(), animationBlendInTick(), animationBlendOutTick(), boundingRect(), fitLook(), m_animation, m_animationTimer, m_hidden, m_inPorts, m_itemBestWidth, m_itemColor, m_module, m_networkEditor, m_outPorts, m_removalAnimation, m_removalAnimationTimer, m_runtimeNameConnection, m_subtitle, m_subtitleFull, m_text, m_textFull, positionChanged(), removalAnimationDone(), and runtimeNameChanged().

+ Here is the call graph for this function:

◆ ~WQtNetworkItem()

WQtNetworkItem::~WQtNetworkItem ( )
virtual

Member Function Documentation

◆ activate()

void WQtNetworkItem::activate ( bool  active)

Here the module can be enabled when the WModule is ready.

Parameters
activetrue if module is ready.

Definition at line 803 of file WQtNetworkItem.cpp.

References changeState(), and m_module.

Referenced by WQtNetworkEditor::event(), and WQtNetworkItem().

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

◆ addInputPort()

void WQtNetworkItem::addInputPort ( WQtNetworkInputPort inPort)

Add a port to the item.

Parameters
inPortthe input port

Definition at line 614 of file WQtNetworkItem.cpp.

References m_inPorts.

Referenced by WQtNetworkItem().

+ Here is the caller graph for this function:

◆ addOutputPort()

void WQtNetworkItem::addOutputPort ( WQtNetworkOutputPort outPort)

Add a port to the item.

Parameters
outPortthe output port

Definition at line 619 of file WQtNetworkItem.cpp.

References m_outPorts.

Referenced by WQtNetworkItem().

+ Here is the caller graph for this function:

◆ animatedMoveTo() [1/2]

void WQtNetworkItem::animatedMoveTo ( QPointF  pos)

Move item to specified position smoothly, via animation.

Parameters
posposition in world space

Definition at line 866 of file WQtNetworkItem.cpp.

References m_noDrag, and moveFinished().

Referenced by animatedMoveTo(), and WQtNetworkItemGrid::physicalMoveTo().

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

◆ animatedMoveTo() [2/2]

void WQtNetworkItem::animatedMoveTo ( qreal  x,
qreal  y 
)

Move item to specified position smoothly, via animation.

Parameters
xx coord in world space
yy coord in world space

Definition at line 902 of file WQtNetworkItem.cpp.

References animatedMoveTo().

+ Here is the call graph for this function:

◆ animationBlendInTick

void WQtNetworkItem::animationBlendInTick ( qreal  value)
privateslot

Called when the animation timers tick and progress in timeline.

Used to blend the item in.

Parameters
valuethe value between 0 and 1

Definition at line 861 of file WQtNetworkItem.cpp.

Referenced by WQtNetworkItem().

+ Here is the caller graph for this function:

◆ animationBlendOutTick

void WQtNetworkItem::animationBlendOutTick ( qreal  value)
privateslot

Called when the animation timers tick and progress in timeline.

Used to blend the item out.

Parameters
valuethe value between 0 and 1

Definition at line 856 of file WQtNetworkItem.cpp.

Referenced by WQtNetworkItem().

+ Here is the caller graph for this function:

◆ boundingRect()

QRectF WQtNetworkItem::boundingRect ( ) const
virtual

The bounding area of the item.

Returns
the bounding rect

Definition at line 247 of file WQtNetworkItem.cpp.

References m_rect.

Referenced by WQtNetworkItem().

+ Here is the caller graph for this function:

◆ changeState()

void WQtNetworkItem::changeState ( State  state)
private

Update the visual state of the item.

Draw the item according to the state specified.

Parameters
statethe state

Definition at line 791 of file WQtNetworkItem.cpp.

References m_currentState, and m_forceUpdate.

Referenced by activate(), and setCrashed().

+ Here is the caller graph for this function:

◆ dead

void WQtNetworkItem::dead ( WQtNetworkItem item)
signal

The item is now dead.

Animation completed and item was removed from scene. Do not use this to delete the item.

Parameters
itemthe item.

Referenced by removalAnimationDone().

+ Here is the caller graph for this function:

◆ die()

QTimeLine * WQtNetworkItem::die ( )

Animate removal and finally, instruct the owning network editor to remove the item.

Returns
the timer for the removal animation. Use this to start the animation.

Definition at line 826 of file WQtNetworkItem.cpp.

References m_hidden, m_module, and m_removalAnimationTimer.

Referenced by WQtNetworkEditor::event().

+ Here is the caller graph for this function:

◆ fitLook()

void WQtNetworkItem::fitLook ( float  maximumWidth = WNETWORKITEM_MAXIMUM_WIDTH,
float  minimumWidth = WNETWORKITEM_MINIMUM_WIDTH 
)

This method aligns the in- and outports as well as the modulename in a regular way.

Parameters
maximumWidththe maximal width of the item.
minimumWidththe minimal width of the item.

Definition at line 661 of file WQtNetworkItem.cpp.

References WQtNetworkPort::alignPosition(), WQtNetworkPort::getMultiplePortWidth(), m_height, m_inPorts, m_outPorts, m_rect, m_subtitle, m_subtitleFull, m_text, m_textFull, and m_width.

Referenced by updater(), and WQtNetworkItem().

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

◆ getInPorts()

QList< WQtNetworkInputPort * > WQtNetworkItem::getInPorts ( )

Returns the item inports.

Returns
the item inports

Definition at line 624 of file WQtNetworkItem.cpp.

References m_inPorts.

Referenced by WQtNetworkEditor::event().

+ Here is the caller graph for this function:

◆ getModule()

std::shared_ptr< WModule > WQtNetworkItem::getModule ( )

Get the WModule represented by this object.

Returns
the related WModule

Definition at line 798 of file WQtNetworkItem.cpp.

References m_module.

Referenced by WQtNetworkSceneLayout::addItem(), WQtControlPanel::deleteModule(), and WQtNetworkEditor::findItemByModule().

+ Here is the caller graph for this function:

◆ getOutPorts()

QList< WQtNetworkOutputPort * > WQtNetworkItem::getOutPorts ( )

Returns the item outports.

Returns
the item outports

Definition at line 629 of file WQtNetworkItem.cpp.

References m_outPorts.

Referenced by WQtNetworkEditor::event().

+ Here is the caller graph for this function:

◆ getText()

QString WQtNetworkItem::getText ( )

Get the caption as QString.

Returns
the caption.

Definition at line 775 of file WQtNetworkItem.cpp.

References m_textFull.

◆ hoverEnterEvent()

void WQtNetworkItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

If the cursor enters the item, the item gets a green color.

Parameters
eventthe hover event

Definition at line 369 of file WQtNetworkItem.cpp.

References m_isHovered.

◆ hoverLeaveEvent()

void WQtNetworkItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

If the cursor leaves the item, the item gets his default color.

Parameters
eventthe hover event

Definition at line 376 of file WQtNetworkItem.cpp.

References m_isHovered.

◆ itemChange()

QVariant WQtNetworkItem::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
protectedvirtual

If the item is changed we want to get notified.

Parameters
change
value
Returns

Definition at line 598 of file WQtNetworkItem.cpp.

References m_isSelected, and positionChanged().

+ Here is the call graph for this function:

◆ mouseDoubleClickEvent()

void WQtNetworkItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Called upon double click.

Parameters
eventthe click event

Definition at line 547 of file WQtNetworkItem.cpp.

References WQtPropertyGroupWidget::createPropertyGroupBox(), m_module, m_networkEditor, and m_propertyToolWindow.

+ Here is the call graph for this function:

◆ mouseMoveEvent()

void WQtNetworkItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  mouseEvent)
protectedvirtual

If the WQtNetworkItem is moved, then the contained ports have to update the connected WQtNetworkArrows for correct alignment.

Parameters
mouseEventthe mouse event

Definition at line 454 of file WQtNetworkItem.cpp.

References WQtNetworkItemGrid::disableBoundsUpdate(), WQtNetworkSceneLayout::getGrid(), WQtNetworkEditor::getLayout(), m_dragging, m_draggingStart, m_networkEditor, m_noDrag, and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the call graph for this function:

◆ mousePressEvent()

void WQtNetworkItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Reimplemented from QGraphicsRectItem.

Used to enable selection of network items with right-click and left-click.

Parameters
eventthe mouse event

Definition at line 482 of file WQtNetworkItem.cpp.

References WQtNetworkSceneLayout::blendIn(), WQtNetworkEditor::getLayout(), WQtNetworkEditor::getScene(), m_dragging, m_draggingStart, m_networkEditor, and m_noDrag.

+ Here is the call graph for this function:

◆ mouseReleaseEvent()

void WQtNetworkItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Mouse was released.

Parameters
eventthe mouse event

Definition at line 509 of file WQtNetworkItem.cpp.

References WQtNetworkSceneLayout::blendOut(), WQtNetworkEditorView::ensureVisibleSmooth(), WQtNetworkEditor::getLayout(), m_dragging, m_networkEditor, m_noDrag, and WQtNetworkSceneLayout::snapAccept().

+ Here is the call graph for this function:

◆ moveFinished

void WQtNetworkItem::moveFinished ( )
privateslot

Called whenever a animated move was finished.

Definition at line 918 of file WQtNetworkItem.cpp.

References WQtNetworkEditorView::focusOn(), WQtNetworkEditor::getView(), m_networkEditor, m_noDrag, and positionChanged().

Referenced by animatedMoveTo(), and moveTo().

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

◆ moveTo() [1/2]

void WQtNetworkItem::moveTo ( QPointF  pos)

Move item to specified position smoothly, no animation.

Parameters
posposition in world space

Definition at line 907 of file WQtNetworkItem.cpp.

Referenced by WQtNetworkItemGrid::physicalMoveTo().

+ Here is the caller graph for this function:

◆ moveTo() [2/2]

void WQtNetworkItem::moveTo ( qreal  x,
qreal  y 
)

Move item to specified position smoothly, no animation.

Parameters
xx coord in world space
yy coord in world space

Definition at line 912 of file WQtNetworkItem.cpp.

References moveFinished().

+ Here is the call graph for this function:

◆ paint()

void WQtNetworkItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  w 
)
protectedvirtual

Draw some customized stuff in the scene.

Parameters
painter
option
w

Definition at line 383 of file WQtNetworkItem.cpp.

References m_busyIndicatorShow, m_busyIsDetermined, m_busyPercent, m_currentState, m_height, m_isHovered, m_isSelected, m_itemColor, m_rect, and m_width.

◆ positionChanged

void WQtNetworkItem::positionChanged ( )
slot

Called whenever the item moves around.

Definition at line 252 of file WQtNetworkItem.cpp.

References m_inPorts, m_outPorts, and WQtNetworkPort::updateArrows().

Referenced by itemChange(), moveFinished(), and WQtNetworkItem().

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

◆ removalAnimationDone

void WQtNetworkItem::removalAnimationDone ( )
privateslot

Called when the m_removalAnimationTimer finishes.

Definition at line 840 of file WQtNetworkItem.cpp.

References dead(), WQtNetworkEditor::getLayout(), m_networkEditor, and WQtNetworkSceneLayout::removeItem().

Referenced by WQtNetworkItem().

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

◆ runtimeNameChanged()

void WQtNetworkItem::runtimeNameChanged ( )
private

Update name as it has been changed.

Definition at line 950 of file WQtNetworkItem.cpp.

References WQtGui::execInGUIThreadAsync(), m_module, and setText().

Referenced by WQtNetworkItem().

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

◆ runtimeNameChangedGT()

void WQtNetworkItem::runtimeNameChangedGT ( )
private

Update name as it has been changed.

Runs in GUI thread.

◆ setCrashed()

void WQtNetworkItem::setCrashed ( )

Mark this module as crashed.

Definition at line 786 of file WQtNetworkItem.cpp.

References changeState().

Referenced by WQtNetworkEditor::event().

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

◆ setLayedOut()

void WQtNetworkItem::setLayedOut ( bool  layedOut = true)

Marks the item as already layed out.

Parameters
layedOutthe layout flag

Definition at line 930 of file WQtNetworkItem.cpp.

References m_wasLayedOut.

Referenced by WQtNetworkSceneLayout::addItem(), and WQtNetworkSceneLayout::connection().

+ Here is the caller graph for this function:

◆ setManuallyPlaced()

void WQtNetworkItem::setManuallyPlaced ( bool  manual = true)

Mark item as manually placed.

This flag is used by the layouter to avoid re-layouting these kind of items.

Parameters
manualtrue if manually placed.

Definition at line 940 of file WQtNetworkItem.cpp.

References m_wasManuallyPlaced.

Referenced by WQtNetworkSceneLayout::addItem(), and WQtNetworkSceneLayout::snapAccept().

+ Here is the caller graph for this function:

◆ setText()

void WQtNetworkItem::setText ( std::string  text)
protected

Set the new title text.

Forces update.

Parameters
textthe text

Definition at line 780 of file WQtNetworkItem.cpp.

References m_textFull, and updater().

Referenced by runtimeNameChanged().

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

◆ setTextItem()

void WQtNetworkItem::setTextItem ( QGraphicsTextItem *  text)

Set the QGraphicsTextItem ( the caption ) of the item.

Parameters
textthe caption

Definition at line 770 of file WQtNetworkItem.cpp.

References m_text.

◆ type()

int WQtNetworkItem::type ( ) const

Reimplementation from QGraphicsItem.

Returns
the type of the item as int

Definition at line 242 of file WQtNetworkItem.cpp.

◆ updater()

void WQtNetworkItem::updater ( )
virtual

Can be used for polling the module states.

It is called by a timer.

Definition at line 264 of file WQtNetworkItem.cpp.

References WQtTreeItem::createTooltip(), fitLook(), m_busyIndicatorShow, m_busyIsDetermined, m_busyPercent, m_currentState, m_forceUpdate, m_itemBestWidth, m_module, m_propertyToolWindow, m_subtitleFull, and string_utils::toString().

Referenced by setText().

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

◆ wasLayedOut()

bool WQtNetworkItem::wasLayedOut ( ) const

Checks whether the item was layed out earlier.

Returns
true if already positioned

Definition at line 935 of file WQtNetworkItem.cpp.

References m_wasLayedOut.

Referenced by WQtNetworkSceneLayout::connection(), and WQtNetworkEditorProjectFileIO::save().

+ Here is the caller graph for this function:

◆ wasManuallyPlaced()

bool WQtNetworkItem::wasManuallyPlaced ( ) const

Item was placed by hand.

Used as a flag to avoid re-layouting these items.

Returns
true if manually placed.

Definition at line 945 of file WQtNetworkItem.cpp.

References m_wasManuallyPlaced.

Referenced by WQtNetworkSceneLayout::connection(), and WQtNetworkEditorProjectFileIO::save().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_animation

QGraphicsItemAnimation* WQtNetworkItem::m_animation
private

Animation for appearance and deletion.

Definition at line 396 of file WQtNetworkItem.h.

Referenced by WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_animationTimer

QTimeLine* WQtNetworkItem::m_animationTimer
private

Timer for the animation.

Definition at line 401 of file WQtNetworkItem.h.

Referenced by WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_busyIndicatorShow

bool WQtNetworkItem::m_busyIndicatorShow
private

If true, the busy indication is active.

Definition at line 376 of file WQtNetworkItem.h.

Referenced by paint(), and updater().

◆ m_busyIsDetermined

bool WQtNetworkItem::m_busyIsDetermined
private

If true, a percentage is shown.

If not, an animated bar walking around.

Definition at line 366 of file WQtNetworkItem.h.

Referenced by paint(), and updater().

◆ m_busyPercent

float WQtNetworkItem::m_busyPercent
private

Counter used for busy indication.

Definition at line 371 of file WQtNetworkItem.h.

Referenced by paint(), and updater().

◆ m_currentState

State WQtNetworkItem::m_currentState
private

denotes the state the item currently is in

Definition at line 349 of file WQtNetworkItem.h.

Referenced by changeState(), paint(), and updater().

◆ m_dragging

bool WQtNetworkItem::m_dragging
private

Dragging?

Definition at line 421 of file WQtNetworkItem.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

◆ m_draggingStart

QPointF WQtNetworkItem::m_draggingStart
private

Start position of dragging.

Definition at line 426 of file WQtNetworkItem.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

◆ m_dragStartPosition

QPointF WQtNetworkItem::m_dragStartPosition
private

Keep track of the mouse dragging of this item.

Definition at line 416 of file WQtNetworkItem.h.

◆ m_forceUpdate

bool WQtNetworkItem::m_forceUpdate
private

If true, the next call to update() will force a redraw.

Avoid setting this to true permanently.

Definition at line 381 of file WQtNetworkItem.h.

Referenced by changeState(), and updater().

◆ m_height

float WQtNetworkItem::m_height
private

the height of the rect

Definition at line 338 of file WQtNetworkItem.h.

Referenced by fitLook(), and paint().

◆ m_hidden

WQtNetworkItemActivator* WQtNetworkItem::m_hidden
private

indicator showing if module's graphics are activated (allows to activate it)

Definition at line 351 of file WQtNetworkItem.h.

Referenced by die(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_inPorts

QList< WQtNetworkInputPort* > WQtNetworkItem::m_inPorts
private

the input ports of the item

Definition at line 330 of file WQtNetworkItem.h.

Referenced by addInputPort(), fitLook(), getInPorts(), positionChanged(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_isHovered

bool WQtNetworkItem::m_isHovered
private

If true, the item is hovered.

Definition at line 356 of file WQtNetworkItem.h.

Referenced by hoverEnterEvent(), hoverLeaveEvent(), and paint().

◆ m_isSelected

bool WQtNetworkItem::m_isSelected
private

If true, the item is selected.

Definition at line 361 of file WQtNetworkItem.h.

Referenced by itemChange(), and paint().

◆ m_itemBestWidth

float WQtNetworkItem::m_itemBestWidth
private

Optimal width for this module.

Calculated during construction.

Definition at line 386 of file WQtNetworkItem.h.

Referenced by updater(), and WQtNetworkItem().

◆ m_itemColor

QColor WQtNetworkItem::m_itemColor
private

the color of the item. Depends on type (source, sink, ...).

Definition at line 347 of file WQtNetworkItem.h.

Referenced by paint(), and WQtNetworkItem().

◆ m_module

std::shared_ptr< WModule > WQtNetworkItem::m_module
private

◆ m_networkEditor

WQtNetworkEditor* WQtNetworkItem::m_networkEditor
private

◆ m_noDrag

bool WQtNetworkItem::m_noDrag
private

If true, the mouse events do not cause a drag and move operation.

Definition at line 441 of file WQtNetworkItem.h.

Referenced by animatedMoveTo(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and moveFinished().

◆ m_outPorts

QList< WQtNetworkOutputPort* > WQtNetworkItem::m_outPorts
private

the output ports of the item

Definition at line 332 of file WQtNetworkItem.h.

Referenced by addOutputPort(), fitLook(), getOutPorts(), positionChanged(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_propertyToolWindow

QWidget* WQtNetworkItem::m_propertyToolWindow
private

The property toolbox window if any.

Definition at line 391 of file WQtNetworkItem.h.

Referenced by mouseDoubleClickEvent(), updater(), and ~WQtNetworkItem().

◆ m_rect

QRectF WQtNetworkItem::m_rect
private

the size of the items rect

Definition at line 334 of file WQtNetworkItem.h.

Referenced by boundingRect(), fitLook(), and paint().

◆ m_removalAnimation

QGraphicsItemAnimation* WQtNetworkItem::m_removalAnimation
private

Animation for appearance and deletion.

Definition at line 406 of file WQtNetworkItem.h.

Referenced by WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_removalAnimationTimer

QTimeLine* WQtNetworkItem::m_removalAnimationTimer
private

Timer for the animation.

Definition at line 411 of file WQtNetworkItem.h.

Referenced by die(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_runtimeNameConnection

boost::signals2::connection WQtNetworkItem::m_runtimeNameConnection
private

Keep track of runtime name changes of this module.

Definition at line 446 of file WQtNetworkItem.h.

Referenced by WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_subtitle

QGraphicsTextItem* WQtNetworkItem::m_subtitle
private

the caption

Definition at line 343 of file WQtNetworkItem.h.

Referenced by fitLook(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_subtitleFull

std::string WQtNetworkItem::m_subtitleFull
private

always contains the unclipped text of m_subtitle

Definition at line 342 of file WQtNetworkItem.h.

Referenced by fitLook(), updater(), and WQtNetworkItem().

◆ m_text

QGraphicsTextItem* WQtNetworkItem::m_text
private

the caption

Definition at line 341 of file WQtNetworkItem.h.

Referenced by fitLook(), setTextItem(), WQtNetworkItem(), and ~WQtNetworkItem().

◆ m_textFull

std::string WQtNetworkItem::m_textFull
private

always contains the unclipped text of m_text

Definition at line 340 of file WQtNetworkItem.h.

Referenced by fitLook(), getText(), setText(), and WQtNetworkItem().

◆ m_wasLayedOut

bool WQtNetworkItem::m_wasLayedOut
private

Mark item as already positioned.

Definition at line 431 of file WQtNetworkItem.h.

Referenced by setLayedOut(), and wasLayedOut().

◆ m_wasManuallyPlaced

bool WQtNetworkItem::m_wasManuallyPlaced
private

Item has been placed manually.

This flag is used by the layouter to avoid moving around manually placed items.

Definition at line 436 of file WQtNetworkItem.h.

Referenced by setManuallyPlaced(), and wasManuallyPlaced().

◆ m_width

float WQtNetworkItem::m_width
private

the width of the rect

Definition at line 336 of file WQtNetworkItem.h.

Referenced by fitLook(), and paint().


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