Class for a widget representing a frame grabber in a timeline.
More...
#include <GrabberWidget.h>
|
| 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 const int | Width = 5 |
| The width of frame grabbers (should be an odd number).
|
|
|
virtual void | paintEvent (QPaintEvent *event) |
| Event handler that reacts to paint events.
|
|
|
void | updatePosition () |
| Updates the position of the widget according to the index of the frame that it represents and the frame width.
|
|
|
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.
|
|
Class for a widget representing a frame grabber in a timeline.
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.
|
Frapper::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. |
Frapper::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.
int Frapper::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 Frapper::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 Frapper::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 Frapper::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 Frapper::GrabberWidget::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
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 Frapper::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.
const int Frapper::GrabberWidget::Width = 5 |
|
static |
The width of frame grabbers (should be an odd number).
int Frapper::GrabberWidget::m_frameIndex |
|
private |
The index of the frame the grabber represents.
QSize Frapper::GrabberWidget::m_frameRectangleSize |
|
private |
The size of frame rectangles in the timeline widget.
Used for positioning the grabber widget.
Position Frapper::GrabberWidget::m_position |
|
private |
The grabber's position type specifying where to place the widget relative to the rectangle of the frame that it represents.
QColor Frapper::GrabberWidget::m_baseColor |
|
private |
The base color that is used for painting the widget.
int Frapper::GrabberWidget::m_startFrameIndex |
|
private |
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: