Frapper  1.0a
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Frapper::BaseGraphicsView Class Reference

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

#include <BaseGraphicsView.h>

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

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
dot_inline_dotgraph_13.png
[legend]

Constructor & Destructor Documentation

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

Constructor of the BaseGraphicsView class.

Constructors and Destructors.

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

Constructor of the BaseGraphicsView class.

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

Destructor of the BaseGraphicsView class.

Member Function Documentation

void Frapper::BaseGraphicsView::homeView ( )
slot

Resets the network graphics view's matrix.

Public Slots.

void Frapper::BaseGraphicsView::frameAll ( )
slot

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

void Frapper::BaseGraphicsView::frameSelected ( )
slot

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

void Frapper::BaseGraphicsView::toggleScrollbars ( bool  visible)
slot

Toggles the visibility of scrollbars for the network graphics view.

Parameters
visibleFlag to control whether to show or hide the scrollbars.
void Frapper::BaseGraphicsView::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 in PainterPanel::PainterGraphicsView, and Frapper::NetworkGraphicsView.

void Frapper::BaseGraphicsView::keyReleaseEvent ( QKeyEvent *  event)
protectedvirtual

Event handler for key release events.

Parameters
eventThe description of the key event.
void Frapper::BaseGraphicsView::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse press events.

Parameters
eventThe description of the mouse event.

Reimplemented in PainterPanel::PainterGraphicsView, and Frapper::NetworkGraphicsView.

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

Event handler for mouse move events.

Parameters
eventThe description of the mouse event.

Reimplemented in Frapper::CurveEditorGraphicsView, PainterPanel::PainterGraphicsView, and Frapper::NetworkGraphicsView.

void Frapper::BaseGraphicsView::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse release events.

Parameters
eventThe description of the mouse event.

Reimplemented in PainterPanel::PainterGraphicsView.

void Frapper::BaseGraphicsView::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Event handler for mouse wheel events.

Parameters
eventThe description of the mouse wheel event.

Reimplemented in Frapper::CurveEditorGraphicsView.

void Frapper::BaseGraphicsView::zoomIn ( )
protected

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

Private Functions.

void Frapper::BaseGraphicsView::zoomOut ( )
protected

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

void Frapper::BaseGraphicsView::setScale ( qreal  s)
protected

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

Parameters
sThe new scale for the viewing transformation matrix.
void Frapper::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
rectThe rectangular region to frame in the graphics view.

Member Data Documentation

bool Frapper::BaseGraphicsView::m_viewMode
protected

Flag that states whether the viewing mode is activated.

QPoint Frapper::BaseGraphicsView::m_lastPosition
protected

The last position of the mouse pointer over the viewport.


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