BaseGraphicsView Class Reference

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

#include <BaseGraphicsView.h>

Inheritance diagram for BaseGraphicsView:

Inheritance graph
[legend]

List of all members.

Public Slots

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.

Public Member Functions

 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 keyReleaseEvent (QKeyEvent *event)
 Event handler for key release 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 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.

Protected Attributes

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.

Inheritance Diagram

inline_dotgraph_1.dot
[legend]

Constructor & Destructor Documentation

BaseGraphicsView::BaseGraphicsView ( QWidget *  parent = 0  ) 

Constructor of the BaseGraphicsView class.

Constructors and Destructors.

Parameters:
parent The parent widget the created instance will be a child of.
Constructor of the BaseGraphicsView class.

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

BaseGraphicsView::~BaseGraphicsView ( void   )  [virtual]

Destructor of the BaseGraphicsView class.


Member Function Documentation

void BaseGraphicsView::homeView (  )  [slot]

Resets the network graphics view's matrix.

Public Slots.

void BaseGraphicsView::frameAll (  )  [slot]

Changes the viewing transformation so that all items are visible at maximum zoom level.

void BaseGraphicsView::frameSelected (  )  [slot]

Changes the viewing transformation so that the selected items are visible at maximum zoom level.

void BaseGraphicsView::toggleScrollbars ( bool  visible  )  [slot]

Toggles the visibility of scrollbars for the network graphics view.

Parameters:
visible Flag to control whether to show or hide the scrollbars.

Reimplemented in CurveEditorGraphicsView.

void BaseGraphicsView::keyPressEvent ( QKeyEvent *  event  )  [protected, virtual]

Event handler for key press events.

Protected Events.

Parameters:
event The description of the key event.
Event handler for key press events.

Parameters:
event The description of the key event.

Reimplemented in NetworkGraphicsView.

void BaseGraphicsView::keyReleaseEvent ( QKeyEvent *  event  )  [protected, virtual]

Event handler for key release events.

Parameters:
event The description of the key event.

void BaseGraphicsView::mousePressEvent ( QMouseEvent *  event  )  [protected, virtual]

Event handler for mouse press events.

Parameters:
event The description of the mouse event.

Reimplemented in NetworkGraphicsView.

void BaseGraphicsView::mouseMoveEvent ( QMouseEvent *  event  )  [protected, virtual]

Event handler for mouse move events.

Parameters:
event The description of the mouse event.

Reimplemented in NetworkGraphicsView.

void BaseGraphicsView::mouseReleaseEvent ( QMouseEvent *  event  )  [protected, virtual]

Event handler for mouse release events.

Parameters:
event The description of the mouse event.

void BaseGraphicsView::wheelEvent ( QWheelEvent *  event  )  [protected, virtual]

Event handler for mouse wheel events.

Parameters:
event The description of the mouse wheel event.

void BaseGraphicsView::zoomIn (  )  [protected]

Changes the scale of the graphics scene so that it appears bigger in the graphics view.

Private Functions.

void BaseGraphicsView::zoomOut (  )  [protected]

Changes the scale of the graphics scene so that it appears smaller in the graphics view.

void BaseGraphicsView::setScale ( qreal  s  )  [protected]

Sets the scale of the viewing transformation matrix that is used for displaying the graphics scene.

Parameters:
s The new scale for the viewing transformation matrix.

void BaseGraphicsView::frame ( const QRectF &  rect  )  [protected]

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.

Parameters:
rect The rectangular region to frame in the graphics view.


Member Data Documentation

bool BaseGraphicsView::m_viewMode [protected]

Flag that states whether the viewing mode is activated.

The last position of the mouse pointer over the viewport.


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

Generated on Wed Feb 24 15:00:59 2010 for Frapper by  doxygen 1.5.9