GrabberWidget Class Reference

Class for a widget representing a frame grabber in a timeline. More...

#include <GrabberWidget.h>

List of all members.

Public Types

enum  Position { P_BeforeFrame = -1, P_OnFrame, P_AfterFrame }
 Nested enumeration of grabber position types specifying where to place grabber widgets relative to the rectangles of the frames that they represent. More...

Public Member Functions

 GrabberWidget (const QSize &frameRectangleSize, Position position, const QColor &baseColor, QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the GrabberWidget class.
virtual ~GrabberWidget ()
 Destructor of the GrabberWidget class.
int getFrameIndex () const
 Returns the index of the frame that the grabber represents.
void setFrameIndex (int index)
 Sets the index of the frame that the grabber represents.
void setFrameWidth (int frameWidth)
 Sets the width used for frame rectangles in the timeline widget to the given width.
void setStartFrameIndex (int index)
 Sets the index of the start frame in the animation range.

Static Public Attributes

static const int Width = 5
 The width of frame grabbers (should be an odd number).

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)
 Event handler that reacts to paint events.

Private Member Functions

void updatePosition ()
 Updates the position of the widget according to the index of the frame that it represents and the frame width.

Private Attributes

int m_frameIndex
 The index of the frame the grabber represents.
QSize m_frameRectangleSize
 The size of frame rectangles in the timeline widget.
Position m_position
 The grabber's position type specifying where to place the widget relative to the rectangle of the frame that it represents.
QColor m_baseColor
 The base color that is used for painting the widget.
int m_startFrameIndex
 The index of the start frame in the animation range.


Detailed Description

Class for a widget representing a frame grabber in a timeline.

Member Enumeration Documentation

Nested enumeration of grabber position types specifying where to place grabber widgets relative to the rectangles of the frames that they represent.

Enumerator:
P_BeforeFrame  A value indicating that the grabber should be placed before the frame that it represents.
P_OnFrame  A value indicating that the grabber should be placed on the frame that it represents.
P_AfterFrame  A value indicating that the grabber should be placed after the frame that it represents.


Constructor & Destructor Documentation

GrabberWidget::GrabberWidget ( const QSize &  frameRectangleSize,
GrabberWidget::Position  position,
const QColor &  baseColor,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Constructor of the GrabberWidget class.

Constructors and Destructors.

Parameters:
frameRectangleSize The width of frame rectangles (used for positioning the widget).
position The grabber position type.
baseColor The base color to use for painting the widget.
parent The parent widget the created instance will be a child of.
flags Extra widget options.
Constructor of the GrabberWidget class.

Parameters:
frameRectangleSize The width of frame rectangles (used for positioning the widget).
position The grabber position type.
baseColor The base color to use for painting the widget.
parent The parent widget the created instance will be a child of.
flags Extra widget options.

GrabberWidget::~GrabberWidget (  )  [virtual]

Destructor of the GrabberWidget 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

int GrabberWidget::getFrameIndex (  )  const

Returns the index of the frame that the grabber represents.

Public Functions.

Returns:
The index of the frame that the grabber represents.
Returns the index of the frame that the grabber represents.

Returns:
The index of the frame that the grabber represents.

void GrabberWidget::setFrameIndex ( int  index  ) 

Sets the index of the frame that the grabber represents.

Parameters:
index The index of the frame that the grabber represents.

void GrabberWidget::setFrameWidth ( int  frameWidth  ) 

Sets the width used for frame rectangles in the timeline widget to the given width.

Parameters:
frameWidth The width of frame rectangles in the timeline widget.

void GrabberWidget::setStartFrameIndex ( int  index  ) 

Sets the index of the start frame in the animation range.

Parameters:
index The index of the start frame in the animation range.

void GrabberWidget::paintEvent ( QPaintEvent *  event  )  [protected, virtual]

Event handler that reacts to paint events.

Protected Event Handlers.

Parameters:
event The object containing details about the event.
Event handler that reacts to paint events.

Parameters:
event The object containing details about the event.

void GrabberWidget::updatePosition (  )  [private]

Updates the position of the widget according to the index of the frame that it represents and the frame width.

Private Functions.


Member Data Documentation

const int GrabberWidget::Width = 5 [static]

The width of frame grabbers (should be an odd number).

The index of the frame the grabber represents.

The size of frame rectangles in the timeline widget.

Used for positioning the grabber widget.

The grabber's position type specifying where to place the widget relative to the rectangle of the frame that it represents.

QColor GrabberWidget::m_baseColor [private]

The base color that is used for painting the widget.

The index of the start frame in the animation range.

Used for positioning the grabber widget.


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

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