pqTimelineItemDelegate draws timeline in cells and add some associated widgets.
More...
#include <pqTimelineItemDelegate.h>
Inherits QStyledItemDelegate.
pqTimelineItemDelegate draws timeline in cells and add some associated widgets.
This handles connection with the active scene to keep the timelines up to date.
Start and End scene times are editable and can be locked with dedicated button, integrated in the pqTimelineTrack::TIME item.
Definition at line 25 of file pqTimelineItemDelegate.h.
◆ pqTimelineItemDelegate()
pqTimelineItemDelegate::pqTimelineItemDelegate |
( |
QObject * |
parent = nullptr , |
|
|
QWidget * |
parentWidget = nullptr |
|
) |
| |
◆ ~pqTimelineItemDelegate()
pqTimelineItemDelegate::~pqTimelineItemDelegate |
( |
| ) |
|
|
override |
◆ paint()
void pqTimelineItemDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Render the timelines.
Depends on the type (time, animation) stored in a custom item role
◆ sizeHint()
QSize pqTimelineItemDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Reimplemented to change row height.
◆ editorEvent()
bool pqTimelineItemDelegate::editorEvent |
( |
QEvent * |
event, |
|
|
QAbstractItemModel * |
model, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| |
|
override |
Reimplemented to handle mouse events.
So we can handle clicking on the timeline to edit start / end time.
◆ eventFilter()
bool pqTimelineItemDelegate::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
event |
|
) |
| |
|
override |
Reimplemented to handle more mouse events from parent view.
editorEvent is useful to get the concerned index and option, but it is pretty restricted. For instance no release event is catched if it occurs outside of the index that received the corresponding press event. Thus we need this eventFilter, to watch the full pqTimelineView.
◆ setActiveSceneConnections
void pqTimelineItemDelegate::setActiveSceneConnections |
( |
pqAnimationScene * |
scene | ) |
|
|
slot |
Set the active scene connections.
◆ updateSceneTimeRange
void pqTimelineItemDelegate::updateSceneTimeRange |
( |
| ) |
|
|
slot |
Update cache of start/end time of the scene.
◆ needsRepaint
void pqTimelineItemDelegate::needsRepaint |
( |
| ) |
|
|
signal |
◆ Zoom
double pqTimelineItemDelegate::Zoom = 1. |
|
protected |
The documentation for this class was generated from the following file: