Frapper  1.0a
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Frapper::NetworkGraphicsView Class Reference

Class representing a graphics view for displaying and editing a network of nodes. More...

#include <NetworkGraphicsView.h>

Inheritance diagram for Frapper::NetworkGraphicsView:
Inheritance graph
[legend]
Collaboration diagram for Frapper::NetworkGraphicsView:
Collaboration graph
[legend]

Public Slots

void displayAllPins ()
 Sets the pin display mode for selected or all node items to show all pins.
 
void displayConnectedPins ()
 Sets the pin display mode for selected or all node items to show only connected pins.
 
void displayPinsCollapsed ()
 Sets the pin display mode for selected or all node items to show all pins as one collapsed pin.
 
- Public Slots inherited from Frapper::BaseGraphicsView
void homeView ()
 Resets the network graphics view's matrix.
 
void frameAll ()
 Changes the viewing transformation so that all items are visible at maximum zoom level.
 
void frameSelected ()
 Changes the viewing transformation so that the selected items are visible at maximum zoom level.
 
void toggleScrollbars (bool visible)
 Toggles the visibility of scrollbars for the network graphics view.
 

Signals

void contextMenuRequested (const QPointF &scenePosition)
 Signal to notify connected objects that a context menu has been requested at the given scene position.
 

Public Member Functions

 NetworkGraphicsView (QWidget *parent=0)
 Constructor of the NetworkGraphicsView class.
 
 ~NetworkGraphicsView ()
 Destructor of the NetworkGraphicsView class.
 
void setScene (QGraphicsScene *scene)
 Sets the scene to display in the graphics view.
 
- Public Member Functions inherited from Frapper::BaseGraphicsView
 BaseGraphicsView (QWidget *parent=0)
 Constructor of the BaseGraphicsView class.
 
virtual ~BaseGraphicsView ()
 Destructor of the BaseGraphicsView class.
 

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *event)
 Event handler for key press events.
 
virtual void mousePressEvent (QMouseEvent *event)
 Event handler for mouse press events.
 
virtual void mouseMoveEvent (QMouseEvent *event)
 Event handler for mouse move events.
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 Event handler for context menu events.
 
- Protected Member Functions inherited from Frapper::BaseGraphicsView
virtual void keyReleaseEvent (QKeyEvent *event)
 Event handler for key release events.
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 Event handler for mouse release events.
 
virtual void wheelEvent (QWheelEvent *event)
 Event handler for mouse wheel events.
 
void zoomIn ()
 Changes the scale of the graphics scene so that it appears bigger in the graphics view.
 
void zoomOut ()
 Changes the scale of the graphics scene so that it appears smaller in the graphics view.
 
void setScale (qreal s)
 Sets the scale of the viewing transformation matrix that is used for displaying the graphics scene.
 
void frame (const QRectF &rect)
 Sets the viewing transformation so that the given bounding rectangle is fully visible in the graphics view, and centers the bounding rectangle in the middle of the view.
 

Private Member Functions

void setPinDisplayMode (NodeGraphicsItem::PinDisplayMode pinDisplayMode)
 Sets the pin display mode for selected or all node items to the given mode.
 
void cancelCreatingConnection ()
 Cancels the creation of a new connection between pins of nodes.
 

Additional Inherited Members

- Protected Attributes inherited from Frapper::BaseGraphicsView
bool m_viewMode
 Flag that states whether the viewing mode is activated.
 
QPoint m_lastPosition
 The last position of the mouse pointer over the viewport.
 

Detailed Description

Class representing a graphics view for displaying and editing a network of nodes.

Constructor & Destructor Documentation

Frapper::NetworkGraphicsView::NetworkGraphicsView ( QWidget *  parent = 0)

Constructor of the NetworkGraphicsView class.

Constructors and Destructors.

Parameters
parentThe parent widget the created instance will be a child of.

Constructor of the NetworkGraphicsView class.

Parameters
parentThe parent widget the created instance will be a child of.
Frapper::NetworkGraphicsView::~NetworkGraphicsView ( void  )

Destructor of the NetworkGraphicsView class.

Member Function Documentation

void Frapper::NetworkGraphicsView::setScene ( QGraphicsScene *  scene)

Sets the scene to display in the graphics view.

Public Functions.

Parameters
sceneThe scene to display in the graphics view.

Sets the scene to display in the graphics view.

Parameters
sceneThe scene to display in the graphics view.
void Frapper::NetworkGraphicsView::displayAllPins ( )
slot

Sets the pin display mode for selected or all node items to show all pins.

Public Slots.

void Frapper::NetworkGraphicsView::displayConnectedPins ( )
slot

Sets the pin display mode for selected or all node items to show only connected pins.

void Frapper::NetworkGraphicsView::displayPinsCollapsed ( )
slot

Sets the pin display mode for selected or all node items to show all pins as one collapsed pin.

void Frapper::NetworkGraphicsView::contextMenuRequested ( const QPointF &  scenePosition)
signal

Signal to notify connected objects that a context menu has been requested at the given scene position.

Parameters
scenePositionThe position in scene coordinates at which the context menu has been requested.
void Frapper::NetworkGraphicsView::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Event handler for key press events.

Protected Events.

Parameters
eventThe description of the key event.

Event handler for key press events.

Parameters
eventThe description of the key event.

Reimplemented from Frapper::BaseGraphicsView.

void Frapper::NetworkGraphicsView::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse press events.

Parameters
eventThe description of the mouse event.

Reimplemented from Frapper::BaseGraphicsView.

void Frapper::NetworkGraphicsView::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse move events.

Parameters
eventThe description of the mouse event.

Reimplemented from Frapper::BaseGraphicsView.

void Frapper::NetworkGraphicsView::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Event handler for context menu events.

Parameters
eventThe object that contains details about the event.
void Frapper::NetworkGraphicsView::setPinDisplayMode ( NodeGraphicsItem::PinDisplayMode  pinDisplayMode)
private

Sets the pin display mode for selected or all node items to the given mode.

Private Functions.

Parameters
pinDisplayModeThe pin display mode to set for the node items.

Changes the scale of the graphics scene so that it appears bigger in the graphics view. Sets the pin display mode for selected or all node items to the given mode.

Parameters
pinDisplayModeThe pin display mode to set for the node items.
void Frapper::NetworkGraphicsView::cancelCreatingConnection ( )
private

Cancels the creation of a new connection between pins of nodes.


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