TimeScrollBarState
TimeScrollBarState
State class for TimeScrollBar. More…
#include <TimeScrollBarState.hpp>
Inherits from EditorState, QObject
Public Signals
| Name | |
|---|---|
| void | targetFpsChanged(float fps) Emitted when target playback FPS changes. |
| void | frameJumpChanged(int jump) Emitted when frame jump value changes. |
| void | isPlayingChanged(bool playing) Emitted when play state changes. |
Public Functions
| Name | |
|---|---|
| TimeScrollBarState(QObject * parent =[nullptr]) Construct a new TimeScrollBarState. |
|
| ~TimeScrollBarState() override =default | |
| virtual QString | getTypeName() const override Get the type name for this state. |
| virtual QString | getDisplayName() const override Get the display name for UI. |
| virtual void | setDisplayName(QString const & name) override Set the display name. |
| virtual std::string | toJson() const override Serialize state to JSON. |
| virtual bool | fromJson(std::string const & json) override Restore state from JSON. |
| float | targetFps() const |
| int | frameJump() const |
| bool | isPlaying() const |
| void | setTargetFps(float fps) |
| void | setFrameJump(int jump) |
| void | setIsPlaying(bool playing) |
Additional inherited members
Public Signals inherited from EditorState
| Name | |
|---|---|
| void | stateChanged() Emitted when any state property changes. |
| void | displayNameChanged(QString const & newName) Emitted when display name changes. |
| void | dirtyChanged(bool isDirty) Emitted when dirty state changes. |
Public Functions inherited from EditorState
| Name | |
|---|---|
| EditorState(QObject * parent =[nullptr]) Construct a new EditorState. |
|
| ~EditorState() override =default Virtual destructor. |
|
| QString | getInstanceId() const Get unique instance ID. |
| bool | isDirty() const Check if state has unsaved changes. |
| void | markClean() Mark state as clean (after save). |
Protected Functions inherited from EditorState
| Name | |
|---|---|
| void | markDirty() Mark state as modified. |
| void | setInstanceId(QString const & id) Set instance ID (for deserialization). |
| QString | generateInstanceId() Generate a new unique instance ID. |
Detailed Description
class TimeScrollBarState;State class for TimeScrollBar.
TimeScrollBarState is a single-instance widget state that manages the timeline control configuration.
Usage
// Create state (typically done by EditorCreationController)
auto state = std::make_shared<TimeScrollBarState>();
registry->registerState(state);
// Modify settings
state->setTargetFps(50.F);
state->setFrameJump(25);
// Serialize for workspace save
std::string json = state->toJson();Public Signals Documentation
signal targetFpsChanged
void targetFpsChanged(
float fps
)Emitted when target playback FPS changes.
signal frameJumpChanged
void frameJumpChanged(
int jump
)Emitted when frame jump value changes.
signal isPlayingChanged
void isPlayingChanged(
bool playing
)Emitted when play state changes.
Public Functions Documentation
function TimeScrollBarState
explicit TimeScrollBarState(
QObject * parent =nullptr
)Construct a new TimeScrollBarState.
Parameters:
- parent Parent QObject (typically nullptr, managed by WorkspaceManager)
function ~TimeScrollBarState
~TimeScrollBarState() override =defaultfunction getTypeName
inline virtual QString getTypeName() const overrideGet the type name for this state.
Return: “TimeScrollBar”
Reimplements: EditorState::getTypeName
function getDisplayName
virtual QString getDisplayName() const overrideGet the display name for UI.
Return: User-visible name (default: “Timeline”)
Reimplements: EditorState::getDisplayName
function setDisplayName
virtual void setDisplayName(
QString const & name
) overrideSet the display name.
Parameters:
- name New display name
Reimplements: EditorState::setDisplayName
function toJson
virtual std::string toJson() const overrideSerialize state to JSON.
Return: JSON string representation
Reimplements: EditorState::toJson
function fromJson
virtual bool fromJson(
std::string const & json
) overrideRestore state from JSON.
Parameters:
- json JSON string to parse
Return: true if parsing succeeded
Reimplements: EditorState::fromJson
function targetFps
float targetFps() constfunction frameJump
int frameJump() constfunction isPlaying
bool isPlaying() constfunction setTargetFps
void setTargetFps(
float fps
)function setFrameJump
void setFrameJump(
int jump
)function setIsPlaying
void setIsPlaying(
bool playing
)Updated on 2026-11-13 at 20:25:39 +0000