Skip to main content

TableDesignerStateData

TableDesignerStateData

Complete serializable state for TableDesignerWidget. More…

#include <TableDesignerStateData.hpp>

Public Attributes

Name
std::string instance_id
Unique instance ID (preserved across serialization).
std::string display_name
User-visible name for this widget.
std::string current_table_id
Currently selected table ID (empty = none selected).
RowSourceSettings row_settings
Row source and interval settings.
GroupModeSettings group_settings
Group mode configuration.
std::map< std::string, ComputerStateEntry > computer_states
std::map< std::string, std::vector< std::string > > column_orders

Detailed Description

struct TableDesignerStateData;

Complete serializable state for TableDesignerWidget.

This struct contains all persistent state that should be saved/restored when serializing a workspace. Transient state (parameter widgets, tree widget items, etc.) is intentionally excluded.

State Categories

Category Serialized Examples
Table Selection ✅ Yes current_table_id
Row Settings ✅ Yes source_name, capture_range, interval_mode
Group Settings ✅ Yes enabled, pattern
Computer States ✅ Yes enabled, custom column names
Column Order ✅ Yes per-table preview column order
Transient State ❌ No Tree items, parameter widgets

Usage


TableDesignerStateData data;
data.current_table_id = "table_1";
data.row_settings.source_name = "Intervals: trials";
data.row_settings.capture_range = 15000;

// Add computer state
ComputerStateEntry entry;
entry.enabled = true;
entry.column_name = "MyColumn";
data.computer_states["analog:signal||Mean"] = entry;

// Serialize to JSON
auto json = rfl::json::write(data);

// Deserialize from JSON
auto result = rfl::json::read<TableDesignerStateData>(json);

Public Attributes Documentation

variable instance_id

std::string instance_id;

Unique instance ID (preserved across serialization).

variable display_name

std::string display_name = "Table Designer";

User-visible name for this widget.

variable current_table_id

std::string current_table_id;

Currently selected table ID (empty = none selected).

variable row_settings

RowSourceSettings row_settings;

Row source and interval settings.

variable group_settings

GroupModeSettings group_settings;

Group mode configuration.

variable computer_states

std::map< std::string, ComputerStateEntry > computer_states;

variable column_orders

std::map< std::string, std::vector< std::string > > column_orders;

Updated on 2026-11-13 at 20:25:39 +0000