Skip to main content

PSTHWidget

PSTHWidget

Main widget for PSTH plot visualization.

#include <PSTHWidget.hpp>

Inherits from QWidget

Public Slots

Name
void handleExportSVG()
Open a file dialog and write the current scene to an SVG file.
void handleExportCSV()
Open a file dialog and write PSTH histogram data to a CSV file.

Public Signals

Name
void timePositionSelected(TimePosition position)
Emitted when a time position is selected in the view.

Public Functions

Name
PSTHWidget(std::shared_ptr< DataManager > data_manager, QWidget * parent =[nullptr])
Construct a PSTHWidget.
~PSTHWidget() override
void setState(std::shared_ptr< PSTHState > state)
Set the PSTHState for this widget.
std::shared_ptr< PSTHState > state() const
Get the current PSTHState (const).
PSTHState * state()
Get mutable state access.
RelativeTimeAxisRangeControls * getRangeControls() const
Get the range controls widget (for placement in properties panel).
VerticalAxisRangeControls * getVerticalRangeControls() const
Get the vertical axis range controls widget (for placement in properties panel).

Protected Functions

Name
void resizeEvent(QResizeEvent * event) override

Public Slots Documentation

slot handleExportSVG

void handleExportSVG()

Open a file dialog and write the current scene to an SVG file.

Uses [AppFileDialog](/api_generated/Namespaces/namespaceAppFileDialog.md) for session-aware path memory (dialog id "export_psth_svg"). Shows an informational message box on success and an error message box on failure. Does nothing if the scene is empty or the user cancels the dialog.

slot handleExportCSV

void handleExportCSV()

Open a file dialog and write PSTH histogram data to a CSV file.

Uses [AppFileDialog](/api_generated/Namespaces/namespaceAppFileDialog.md) for session-aware path memory (dialog id "export_psth_csv"). Re-computes per-series histograms and calls [PlotDataExport::exportHistogramToCSV()](/api_generated/Namespaces/namespacePlotDataExport.md#function-exporthistogramtocsv).

Public Signals Documentation

signal timePositionSelected

void timePositionSelected(
    TimePosition position
)

Emitted when a time position is selected in the view.

Parameters:

Public Functions Documentation

function PSTHWidget

PSTHWidget(
    std::shared_ptr< DataManager > data_manager,
    QWidget * parent =nullptr
)

Construct a PSTHWidget.

Parameters:

  • data_manager Shared DataManager for data access
  • parent Parent widget

function ~PSTHWidget

~PSTHWidget() override

function setState

void setState(
    std::shared_ptr< PSTHState > state
)

Set the PSTHState for this widget.

Parameters:

  • state Shared pointer to the state object

The state manages all serializable settings. This widget shares the state with the properties widget.

function state

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

Get the current PSTHState (const).

Return: Shared pointer to the state object

function state

PSTHState * state()

Get mutable state access.

Return: Raw pointer to state for modification

function getRangeControls

RelativeTimeAxisRangeControls * getRangeControls() const

Get the range controls widget (for placement in properties panel).

Return: Pointer to the range controls widget, or nullptr if not created

function getVerticalRangeControls

VerticalAxisRangeControls * getVerticalRangeControls() const

Get the vertical axis range controls widget (for placement in properties panel).

Return: Pointer to the vertical axis range controls widget, or nullptr if not created

Protected Functions Documentation

function resizeEvent

void resizeEvent(
    QResizeEvent * event
) override

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