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

#include <CurveEditorGraphicsView.h>

Inheritance diagram for Frapper::CurveEditorGraphicsView:
Inheritance graph
[legend]
Collaboration diagram for Frapper::CurveEditorGraphicsView:
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 toggleShowEnabledOnly (bool enabled)
 Toggle to show only enabled parameters.
 
- 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 drag ()
 Signal that is emitted when a drag event is emited.
 

Public Member Functions

 CurveEditorGraphicsView (QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the CurveEditorGraphicsView class.
 
virtual ~CurveEditorGraphicsView ()
 Destructor of the CurveEditorGraphicsView class.
 
void showCurves (QList< QTreeWidgetItem * > *selectedItems)
 Displays the curves of the selected items in the curve editor widget.
 
virtual void buildScene ()
 Builds the scene containing the segment ande key widgets.
 
void setCurrentFrame (const int pos)
 Sets the index of the current frame in the scene's time.
 
- 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

void drawCurves (AbstractParameter *parameter)
 Displays the curves of the given parameter group in the curve editor widget.
 
virtual void mouseMoveEvent (QMouseEvent *event)
 The overwritten the event handler for the drag move event.
 
virtual void resizeEvent (QResizeEvent *event)
 The overwritten the event handler for resize events. Adds scene resizing and redrawing.
 
virtual void drawBackground (QPainter *painter, const QRectF &rect)
 The overwritten the event handler for background drawing events. Adds coordinate system to the background.
 
virtual void wheelEvent (QWheelEvent *event)
 Event handler for mouse wheel events.
 
- Protected Member Functions inherited from Frapper::BaseGraphicsView
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 mouseReleaseEvent (QMouseEvent *event)
 Event handler for mouse release 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 scaleSceneItems (const float value)
 Scales the graphics items in the scene by given value.
 

Private Attributes

QPen m_pointPen
 The pen for painting the control points on a curve.
 
QPen m_connectionPen
 The pen for painting the path between points on a curve.
 
QBrush m_pointBrush
 Brush to fill the control points on a curve.
 
QSizeF m_pointSize
 Size of the points on a curve.
 
QList< NumberParameter * > m_numberParametersToDraw
 A list of NumberParameters which should be drawn.
 
TimelineGraphicsItemm_timeline
 The timeleine widget.
 
int m_timelinePos
 The timeleine widgets position.
 
int m_maxLength
 The max number of keys in numberparameters to draw.
 
float m_maxValue
 The max value of keys in numberparameters to draw.
 
bool m_showEnabledCurves
 The flag for showing only enabled parameters.
 
qreal m_scaleFactor
 

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.
 

Constructor & Destructor Documentation

Frapper::CurveEditorGraphicsView::CurveEditorGraphicsView ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Constructor of the CurveEditorGraphicsView class.

Constructors and Destructors.

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

Constructor of the CurveEditorGraphicsView class.

Parameters
parentThe parent widget the created instance will be a child of.
flagsExtra widget options.
Frapper::CurveEditorGraphicsView::~CurveEditorGraphicsView ( )
virtual

Destructor of the CurveEditorGraphicsView class.

Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.

Member Function Documentation

void Frapper::CurveEditorGraphicsView::showCurves ( QList< QTreeWidgetItem * > *  selectedItems)

Displays the curves of the selected items in the curve editor widget.

Public Functions.

Parameters
selectedItemsThe item list whose animated parameters to display in the curve editor widget.

Displays the curves of the given parameter group in the curve editor widget.

Parameters
parameterGroupThe parameter group whose animated parameters to display in the curve editor widget.
void Frapper::CurveEditorGraphicsView::buildScene ( )
virtual

Builds the scene containing the segment ande key widgets.

void Frapper::CurveEditorGraphicsView::setCurrentFrame ( const int  pos)

Sets the index of the current frame in the scene's time.

Parameters
indexThe new index of the current frame in the scene's time.
void Frapper::CurveEditorGraphicsView::homeView ( )
slot

Resets the network graphics view's matrix.

Public Slots.

void Frapper::CurveEditorGraphicsView::frameAll ( )
slot

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

void Frapper::CurveEditorGraphicsView::frameSelected ( )
slot

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

void Frapper::CurveEditorGraphicsView::toggleShowEnabledOnly ( bool  enabled)
slot

Toggle to show only enabled parameters.

Parameters
visibleFlag to control whether to show or hide enabled parameters.
void Frapper::CurveEditorGraphicsView::drag ( )
signal

Signal that is emitted when a drag event is emited.

void Frapper::CurveEditorGraphicsView::drawCurves ( AbstractParameter parameter)
inlineprotected

Displays the curves of the given parameter group in the curve editor widget.

Parameters
parameterGroupThe parameter group whose animated parameters to display in the curve editor widget.
selectedItemsThe selected datatree items.
parameterGroupThe parameter group whose animated parameters to display in the curve editor widget.
void Frapper::CurveEditorGraphicsView::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

The overwritten the event handler for the drag move event.

Parameters
eventThe description of the drag move event.

Reimplemented from Frapper::BaseGraphicsView.

void Frapper::CurveEditorGraphicsView::resizeEvent ( QResizeEvent *  event)
protectedvirtual

The overwritten the event handler for resize events. Adds scene resizing and redrawing.

Parameters
eventThe description of the key event.
void Frapper::CurveEditorGraphicsView::drawBackground ( QPainter *  painter,
const QRectF &  rect 
)
protectedvirtual

The overwritten the event handler for background drawing events. Adds coordinate system to the background.

Parameters
painterThe QT painter object.
rectThe drawing region painter object.
void Frapper::CurveEditorGraphicsView::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Event handler for mouse wheel events.

Parameters
eventThe description of the mouse wheel event.

Reimplemented from Frapper::BaseGraphicsView.

void Frapper::CurveEditorGraphicsView::scaleSceneItems ( const float  value)
private

Scales the graphics items in the scene by given value.

Parameters
valueThe value for scaling the scene items.

Member Data Documentation

QPen Frapper::CurveEditorGraphicsView::m_pointPen
private

The pen for painting the control points on a curve.

QPen Frapper::CurveEditorGraphicsView::m_connectionPen
private

The pen for painting the path between points on a curve.

QBrush Frapper::CurveEditorGraphicsView::m_pointBrush
private

Brush to fill the control points on a curve.

QSizeF Frapper::CurveEditorGraphicsView::m_pointSize
private

Size of the points on a curve.

QList<NumberParameter *> Frapper::CurveEditorGraphicsView::m_numberParametersToDraw
private

A list of NumberParameters which should be drawn.

TimelineGraphicsItem* Frapper::CurveEditorGraphicsView::m_timeline
private

The timeleine widget.

int Frapper::CurveEditorGraphicsView::m_timelinePos
private

The timeleine widgets position.

int Frapper::CurveEditorGraphicsView::m_maxLength
private

The max number of keys in numberparameters to draw.

float Frapper::CurveEditorGraphicsView::m_maxValue
private

The max value of keys in numberparameters to draw.

bool Frapper::CurveEditorGraphicsView::m_showEnabledCurves
private

The flag for showing only enabled parameters.

qreal Frapper::CurveEditorGraphicsView::m_scaleFactor
private

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