TongueWidgetState
TongueWidgetState
State class for Tongue_Widget. More…
#include <TongueWidgetState.hpp>
Inherits from EditorState, QObject
Public Signals
| Name | |
|---|---|
| void | frameProcessed(int frame) Emitted when a frame is processed. |
| void | processedFramesCleared() Emitted when processed frames are cleared. |
Public Functions
| Name | |
|---|---|
| TongueWidgetState(QObject * parent =[nullptr]) Construct a new TongueWidgetState. |
|
| ~TongueWidgetState() 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. |
| void | addProcessedFrame(int frame) Add a processed frame to the history. |
| std::vector< int > const & | processedFrames() const Get all processed frames. |
| void | clearProcessedFrames() Clear all processed frames. |
Public Attributes
| Name | |
|---|---|
| TimePosition | current_position |
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 TongueWidgetState;State class for Tongue_Widget.
TongueWidgetState is a single-instance widget state that manages the tongue tracking configuration and processed frame history.
Usage
// Create state (typically done by EditorCreationController)
auto state = std::make_shared<TongueWidgetState>();
registry->registerState(state);
// Serialize for workspace save
std::string json = state->toJson();Public Signals Documentation
signal frameProcessed
void frameProcessed(
int frame
)Emitted when a frame is processed.
Parameters:
- frame The processed frame number
signal processedFramesCleared
void processedFramesCleared()Emitted when processed frames are cleared.
Public Functions Documentation
function TongueWidgetState
explicit TongueWidgetState(
QObject * parent =nullptr
)Construct a new TongueWidgetState.
Parameters:
- parent Parent QObject (typically nullptr, managed by WorkspaceManager)
function ~TongueWidgetState
~TongueWidgetState() override =defaultfunction getTypeName
inline virtual QString getTypeName() const overrideGet the type name for this state.
Return: “TongueWidget”
Reimplements: EditorState::getTypeName
function getDisplayName
virtual QString getDisplayName() const overrideGet the display name for UI.
Return: User-visible name (default: “Tongue Tracking”)
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 addProcessedFrame
void addProcessedFrame(
int frame
)Add a processed frame to the history.
Parameters:
- frame Frame number that was processed
function processedFrames
std::vector< int > const & processedFrames() constGet all processed frames.
Return: Vector of processed frame numbers
function clearProcessedFrames
void clearProcessedFrames()Clear all processed frames.
Public Attributes Documentation
variable current_position
TimePosition current_position;Updated on 2026-11-13 at 20:25:39 +0000