TriageSessionState
TriageSessionState
EditorState subclass for the TriageSession widget. More…
#include <TriageSessionState.hpp>
Inherits from EditorState, QObject
Public Signals
| Name | |
|---|---|
| void | pipelineChanged() |
| void | sequenceSlotsChanged() |
Public Functions
| Name | |
|---|---|
| TriageSessionState(std::shared_ptr< DataManager > data_manager =[nullptr], QObject * parent =[nullptr]) | |
| ~TriageSessionState() override =default | |
| virtual QString | getTypeName() const override Get unique type name for this editor state. |
| virtual QString | getDisplayName() const override Get display name for UI. |
| virtual void | setDisplayName(QString const & name) override Set display name. |
| virtual std::string | toJson() const override Serialize state to JSON string. |
| virtual bool | fromJson(std::string const & json) override Restore state from JSON string. |
| std::shared_ptr< DataManager > | dataManager() const |
| void | setPipelineJson(std::string_view json) |
| std::optional< std::string > | pipelineJson() const |
| void | setTrackedRegionsKey(std::string_view key) |
| std::string | trackedRegionsKey() const |
| std::vector< TriageHotkeySlotData > const & | sequenceSlots() const |
| std::optional< TriageHotkeySlotData > | sequenceSlot(int slot_index) const |
| bool | setSequenceSlot(int slot_index, TriageHotkeySlotData const & slot) |
| bool | setSequenceSlotJson(int slot_index, std::optional< std::string > sequence_json) |
| int | sequenceSlotCount() |
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 TriageSessionState;EditorState subclass for the TriageSession widget.
Manages serializable state for the triage session properties panel. The underlying TriageSession state machine is NOT part of this state — it always resets to Idle on workspace load/restore.
Public Signals Documentation
signal pipelineChanged
void pipelineChanged()signal sequenceSlotsChanged
void sequenceSlotsChanged()Public Functions Documentation
function TriageSessionState
explicit TriageSessionState(
std::shared_ptr< DataManager > data_manager =nullptr,
QObject * parent =nullptr
)function ~TriageSessionState
~TriageSessionState() override =defaultfunction getTypeName
inline virtual QString getTypeName() const overrideGet unique type name for this editor state.
Return: Type name, e.g., “MediaWidget”, “DataViewerWidget”
Reimplements: EditorState::getTypeName
This is used for:
- Factory registration
- Serialization type field
- Properties panel routing
function getDisplayName
virtual QString getDisplayName() const overrideGet display name for UI.
Return: Display name, e.g., “Media Viewer 1”
Reimplements: EditorState::getDisplayName
This is the user-visible name shown in tabs, window titles, etc. It may be customized by the user.
function setDisplayName
virtual void setDisplayName(
QString const & name
) overrideSet display name.
Parameters:
- name New display name
Reimplements: EditorState::setDisplayName
function toJson
virtual std::string toJson() const overrideSerialize state to JSON string.
Return: JSON string representation of state
Reimplements: EditorState::toJson
Subclasses should use reflect-cpp for serialization: ```cpp
std::string toJson() const override { return rfl::json::write(_data); }
### function fromJson
```cpp
virtual bool fromJson(
std::string const & json
) override
Restore state from JSON string.
Parameters:
- json JSON string to parse
Return: true if parsing succeeded, false on error
Reimplements: EditorState::fromJson
Subclasses should use reflect-cpp for deserialization: ```cpp
bool fromJson(std::string const& json) override { auto result = rfl::json::read
### function dataManager
```cpp
inline std::shared_ptr< DataManager > dataManager() const
function setPipelineJson
void setPipelineJson(
std::string_view json
)function pipelineJson
inline std::optional< std::string > pipelineJson() constfunction setTrackedRegionsKey
void setTrackedRegionsKey(
std::string_view key
)function trackedRegionsKey
inline std::string trackedRegionsKey() constfunction sequenceSlots
inline std::vector< TriageHotkeySlotData > const & sequenceSlots() constfunction sequenceSlot
std::optional< TriageHotkeySlotData > sequenceSlot(
int slot_index
) constfunction setSequenceSlot
bool setSequenceSlot(
int slot_index,
TriageHotkeySlotData const & slot
)function setSequenceSlotJson
bool setSequenceSlotJson(
int slot_index,
std::optional< std::string > sequence_json
)function sequenceSlotCount
static inline int sequenceSlotCount()Updated on 2026-11-13 at 20:25:39 +0000