#include <GrabberWidget.h>
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. | |
Nested enumeration of grabber position types specifying where to place grabber widgets relative to the rectangles of the frames that they represent.
| 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.
| 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. |
| 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.
| int GrabberWidget::getFrameIndex | ( | ) | const |
Returns the index of the frame that the grabber represents.
Public Functions.
| void GrabberWidget::setFrameIndex | ( | int | index | ) |
Sets the index of the frame that the grabber represents.
| 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.
| 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.
| 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.
| event | The object containing details about the event. |
| 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.
const int GrabberWidget::Width = 5 [static] |
The width of frame grabbers (should be an odd number).
int GrabberWidget::m_frameIndex [private] |
The index of the frame the grabber represents.
QSize GrabberWidget::m_frameRectangleSize [private] |
The size of frame rectangles in the timeline widget.
Used for positioning the grabber widget.
Position 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 GrabberWidget::m_baseColor [private] |
The base color that is used for painting the widget.
int GrabberWidget::m_startFrameIndex [private] |
The index of the start frame in the animation range.
Used for positioning the grabber widget.
1.5.9