Skip to main content

DataViewerPropertiesWidget

DataViewerPropertiesWidget

Properties panel for Data Viewer Widget. More…

#include <DataViewerPropertiesWidget.hpp>

Inherits from QWidget

Public Signals

Name
void autoArrangeRequested()
Emitted when the auto-arrange button is clicked.
void exportSVGRequested(bool includeScalebar, int scalebarLength)
Emitted when the export SVG button is clicked.
void featureAddRequested(std::string const & key, std::string const & color)
Emitted when a feature should be added to the plot.
void featureRemoveRequested(std::string const & key)
Emitted when a feature should be removed from the plot.
void featuresAddRequested(std::vector< std::string > const & keys, std::vector< std::string > const & colors)
Emitted when multiple features should be added (batch operation).
void featuresRemoveRequested(std::vector< std::string > const & keys)
Emitted when multiple features should be removed (batch operation).
void featureColorChanged(std::string const & key, std::string const & hex_color)
Emitted when feature color changes.
void groupContextMenuRequested(std::string const & group_name, QPoint const & global_pos)
Emitted when a group context menu is requested.
void seriesRelativePlacementRequested(QString source_key, QString target_key, bool above)
Emitted when the user requests relative placement of a series via the context menu.
void saveLaneLayoutRequested()
Emitted when the user clicks “Save Lane Layout…”.
void loadLaneLayoutRequested()
Emitted when the user clicks “Load Lane Layout…”.
void loadSpikeToAnalogPairingRequested()
Emitted when the user clicks “Load Spike-to-Analog Pairing…”.

Public Functions

Name
DataViewerPropertiesWidget(std::shared_ptr< DataViewerState > state, std::shared_ptr< DataManager > data_manager, OpenGLWidget * opengl_widget =[nullptr], QWidget * parent =[nullptr])
Construct a DataViewerPropertiesWidget.
~DataViewerPropertiesWidget() override
void setOpenGLWidget(OpenGLWidget * opengl_widget)
Set the OpenGLWidget reference.
void setTimeFrame(std::shared_ptr< TimeFrame > time_frame)
Set the time frame for coordinate conversion.
void refreshFeatureTree()
Refresh the feature tree from DataManager.
std::shared_ptr< DataViewerState > state() const
Get the shared state.
std::shared_ptr< DataManager > dataManager() const
Get the DataManager.
void setXAxisSamplesMaximum(int max)
Set the maximum value for the X axis samples spinbox.
void updateVisibleLaneCount(int visible, int total)
Update the visible lane count indicator.

Detailed Description

class DataViewerPropertiesWidget;

Properties panel for Data Viewer Widget.

Displays feature tree, per-feature controls, and visualization settings. Shares state with DataViewer_Widget (view) via DataViewerState.

Public Signals Documentation

signal autoArrangeRequested

void autoArrangeRequested()

Emitted when the auto-arrange button is clicked.

The view widget should connect to this signal to trigger auto-arrangement of all visible series.

signal exportSVGRequested

void exportSVGRequested(
    bool includeScalebar,
    int scalebarLength
)

Emitted when the export SVG button is clicked.

Parameters:

  • includeScalebar Whether to include a scalebar in the export
  • scalebarLength Length of the scalebar in time units

The view widget should connect to this signal to trigger SVG export.

signal featureAddRequested

void featureAddRequested(
    std::string const & key,
    std::string const & color
)

Emitted when a feature should be added to the plot.

Parameters:

  • key The data key to add
  • color The color (hex string) for the feature

signal featureRemoveRequested

void featureRemoveRequested(
    std::string const & key
)

Emitted when a feature should be removed from the plot.

Parameters:

  • key The data key to remove

signal featuresAddRequested

void featuresAddRequested(
    std::vector< std::string > const & keys,
    std::vector< std::string > const & colors
)

Emitted when multiple features should be added (batch operation).

Parameters:

  • keys The data keys to add
  • colors The colors (hex strings) for each key (parallel array)

signal featuresRemoveRequested

void featuresRemoveRequested(
    std::vector< std::string > const & keys
)

Emitted when multiple features should be removed (batch operation).

Parameters:

  • keys The data keys to remove

signal featureColorChanged

void featureColorChanged(
    std::string const & key,
    std::string const & hex_color
)

Emitted when feature color changes.

Parameters:

  • key The data key
  • hex_color New color in hex format

signal groupContextMenuRequested

void groupContextMenuRequested(
    std::string const & group_name,
    QPoint const & global_pos
)

Emitted when a group context menu is requested.

Parameters:

  • group_name The group name
  • global_pos Global position for the menu

signal seriesRelativePlacementRequested

void seriesRelativePlacementRequested(
    QString source_key,
    QString target_key,
    bool above
)

Emitted when the user requests relative placement of a series via the context menu.

Parameters:

  • source_key Series key to reposition
  • target_key Series key to place relative to
  • above true = place source above target, false = place below

The view widget should connect to this signal and translate it into deterministic lane_order overrides via DataViewerState.

signal saveLaneLayoutRequested

void saveLaneLayoutRequested()

Emitted when the user clicks “Save Lane Layout…”.

The view widget should connect to this signal to serialize the current lane placement and displayed series to a JSON file.

signal loadLaneLayoutRequested

void loadLaneLayoutRequested()

Emitted when the user clicks “Load Lane Layout…”.

The view widget should connect to this signal to restore lane placement and displayed series from a previously saved JSON file.

signal loadSpikeToAnalogPairingRequested

void loadSpikeToAnalogPairingRequested()

Emitted when the user clicks “Load Spike-to-Analog Pairing…”.

The view widget should connect to this signal to open the configuration dialog and apply the resulting lane placement overrides.

Public Functions Documentation

function DataViewerPropertiesWidget

explicit DataViewerPropertiesWidget(
    std::shared_ptr< DataViewerState > state,
    std::shared_ptr< DataManager > data_manager,
    OpenGLWidget * opengl_widget =nullptr,
    QWidget * parent =nullptr
)

Construct a DataViewerPropertiesWidget.

Parameters:

  • state Shared state with the view widget
  • data_manager DataManager for data queries
  • opengl_widget OpenGLWidget from the view for feature controls (can be nullptr initially)
  • parent Parent widget

function ~DataViewerPropertiesWidget

~DataViewerPropertiesWidget() override

function setOpenGLWidget

void setOpenGLWidget(
    OpenGLWidget * opengl_widget
)

Set the OpenGLWidget reference.

Parameters:

Called after construction if the OpenGLWidget wasn’t available initially. Initializes the feature control widgets that need it.

function setTimeFrame

void setTimeFrame(
    std::shared_ptr< TimeFrame > time_frame
)

Set the time frame for coordinate conversion.

Parameters:

function refreshFeatureTree

void refreshFeatureTree()

Refresh the feature tree from DataManager.

function state

inline std::shared_ptr< DataViewerState > state() const

Get the shared state.

Return: Shared pointer to DataViewerState

function dataManager

inline std::shared_ptr< DataManager > dataManager() const

Get the DataManager.

Return: Shared pointer to DataManager

function setXAxisSamplesMaximum

void setXAxisSamplesMaximum(
    int max
)

Set the maximum value for the X axis samples spinbox.

Parameters:

  • max Maximum number of samples

Called by the view widget to set the maximum based on data range.

function updateVisibleLaneCount

void updateVisibleLaneCount(
    int visible,
    int total
)

Update the visible lane count indicator.

Parameters:

  • visible Number of lanes currently visible in the viewport
  • total Total number of lanes

Displays “Visible lanes: N of M” in the Layout Settings group. Called by the view widget after layout computation or viewport changes.


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