TimeScrollBar
TimeScrollBar
#include <TimeScrollBar.hpp>
Inherits from QWidget
Public Signals
| Name | |
|---|---|
| void | timeChanged(TimePosition position) Emitted when user scrubs the timeline (includes TimeFrame pointer). |
| void | timeChanged(int x) Deprecated signal for backward compatibility. |
Public Functions
| Name | |
|---|---|
| TimeScrollBar(std::shared_ptr< DataManager > data_manager, std::shared_ptr< TimeScrollBarState > state, QWidget * parent =[nullptr]) Construct TimeScrollBar with EditorState support. |
|
| TimeScrollBar(QWidget * parent =[nullptr]) Legacy constructor without state (backward compatible). |
|
| ~TimeScrollBar() override | |
| void | setDataManager(std::shared_ptr< DataManager > data_manager) Set the DataManager and register for notifications. |
| void | updateScrollBarNewMax(int new_max) |
| void | changeScrollBarValue(int new_value, bool relative =false) |
| int | getFrameJumpValue() const |
| void | PlayButton() |
| void | setEditorRegistry(EditorRegistry * registry) Set the EditorRegistry for time synchronization. |
| void | setKeymapManager(KeymapSystem::KeymapManager * manager) Set the KeymapManager and register the adapter for timeline actions. |
| void | setTimeFrame(std::shared_ptr< TimeFrame > const & tf, TimeKey display_key =TimeKey(“time”)) Set which TimeFrame this scrollbar controls. |
| void | setFrameFilter(std::unique_ptr< FrameFilter > filter) Install a frame filter for skip-frame-during-playback behaviour. |
Public Signals Documentation
signal timeChanged
void timeChanged(
TimePosition position
)Emitted when user scrubs the timeline (includes TimeFrame pointer).
This is the preferred signal for time changes. It includes the TimePosition which contains both the index and the TimeFrame pointer for clock identity.
signal timeChanged
void timeChanged(
int x
)Deprecated signal for backward compatibility.
Deprecated:
Use timeChanged(TimePosition) instead
Public Functions Documentation
function TimeScrollBar
explicit TimeScrollBar(
std::shared_ptr< DataManager > data_manager,
std::shared_ptr< TimeScrollBarState > state,
QWidget * parent =nullptr
)Construct TimeScrollBar with EditorState support.
Parameters:
- data_manager Shared DataManager for data access
- state Shared TimeScrollBarState for configuration persistence
- parent Parent widget
TimeScrollBar constructor with EditorState support.
This is the preferred constructor when using EditorRegistry. The state manages serializable configuration and enables workspace save/restore.
function TimeScrollBar
explicit TimeScrollBar(
QWidget * parent =nullptr
)Legacy constructor without state (backward compatible).
Deprecated:
Use the constructor with TimeScrollBarState instead
Legacy TimeScrollBar constructor (backward compatible).
function ~TimeScrollBar
~TimeScrollBar() overridefunction setDataManager
void setDataManager(
std::shared_ptr< DataManager > data_manager
)Set the DataManager and register for notifications.
Parameters:
- data_manager Shared DataManager instance
When a DataManager is set, TimeScrollBar will listen for notifications and automatically update its timeframe when data changes.
function updateScrollBarNewMax
void updateScrollBarNewMax(
int new_max
)function changeScrollBarValue
void changeScrollBarValue(
int new_value,
bool relative =false
)function getFrameJumpValue
int getFrameJumpValue() constfunction setEditorRegistry
void setEditorRegistry(
EditorRegistry * registry
)Set the EditorRegistry for time synchronization.
Parameters:
- registry The EditorRegistry instance (can be nullptr)
TimeScrollBar will call EditorRegistry::setCurrentTime() when the user scrubs the timeline, ensuring all widgets stay synchronized.
function setKeymapManager
void setKeymapManager(
KeymapSystem::KeymapManager * manager
)Set the KeymapManager and register the adapter for timeline actions.
Parameters:
- manager The KeymapManager to register with (must outlive TimeScrollBar)
Creates a KeyActionAdapter that handles play_pause, next_frame, prev_frame, jump_forward, and jump_backward actions dispatched by the KeymapSystem.
function setTimeFrame
void setTimeFrame(
std::shared_ptr< TimeFrame > const & tf,
TimeKey display_key =TimeKey("time")
)Set which TimeFrame this scrollbar controls.
Parameters:
- tf The TimeFrame to control (can be nullptr)
- display_key The TimeKey for UI display (defaults to “time”)
Updates the scrollbar to control the specified TimeFrame. The display_key is used for UI labels (e.g., “Camera Time”, “Ephys Clock”).
function setFrameFilter
void setFrameFilter(
std::unique_ptr< FrameFilter > filter
)Install a frame filter for skip-frame-during-playback behaviour.
Parameters:
- filter Owning pointer to the new filter, or nullptr to clear.
Replaces any previously installed filter. Pass nullptr to disable filtering. The filter’s TimeFrame is automatically updated when the scrollbar’s own TimeFrame changes.
Updated on 2026-11-13 at 20:25:39 +0000