ExperimentConfigPage
ExperimentConfigPage is the abstract base class for every page in the
experiment-setup dialog. It inherits both QWidget (for the visual representation)
and SettingsStorage (for persistent per-page configuration keyed by
d_key). Each subclass represents one conceptual step in the setup sequence and
holds a non-owning pointer to the in-flight Experiment it is helping to
configure.
The wizard routes user-facing diagnostic messages through the warning(QString) and
error(QString) signals so that individual pages remain decoupled from the surrounding
dialog layout.
Validate / apply lifecycle
The wizard drives each page through a three-slot lifecycle:
initialize() — called by the wizard after all pages are constructed and before the page is first shown. Use this slot for any value that depends on choices made on a preceding page. Values that can be determined purely from a previous experiment or from
SettingsStorageshould be set in the constructor instead, so they are available before the wizard opens.validate() — called when the user attempts to advance past the page. Return
trueif the page’s settings are consistent; returnfalseand emiterror()orwarning()to block the advance and display a diagnostic.apply() — called after
validate()returnstrue. Write the page’s settings intop_exphere.
Concrete subclasses
Representative implementations include:
ExperimentFtmwConfigPage— configures the FTMW acquisition parameters (averaging mode, shot count, segment settings).ExperimentLifConfigPage— configures the LIF delay grid and laser settings when the LIF module is active.ExperimentTypePage— selects the top-level experiment type (FTMW, LIF, etc.) and controls which subsequent pages the wizard shows.
Additional subclasses handle pulse-generator, flow-controller, IO-board, pressure- controller, temperature-controller, and validator configuration. The experiment-setup workflow is described in Experiment Setup.
API Reference
-
class ExperimentConfigPage : public QWidget, public SettingsStorage
Abstract base class for pages in the experiment-setup dialog.
Each concrete subclass represents one page of the experiment-setup wizard. A page is identified by a persistent
d_key(used to scope its SettingsStorage) and a human-readabled_title. It holds a non-owning pointer to the in-flight Experiment that is being configured.The wizard drives pages through the lifecycle: initialize() → validate() → apply(). Subclasses emit warning() or error() to surface diagnostic messages in the wizard’s status area without coupling the page to the surrounding dialog.
Subclassed by ExperimentFlowConfigPage, ExperimentFtmwConfigPage, ExperimentIOBoardConfigPage, ExperimentLifConfigPage, ExperimentPressureControllerConfigPage, ExperimentPulseGenConfigPage, ExperimentSummaryPage, ExperimentTemperatureControllerConfigPage, ExperimentTypePage, ExperimentValidatorConfigPage
Public Functions
-
explicit ExperimentConfigPage(const QString key, const QString title, Experiment *exp, QWidget *parent = nullptr)
Construct the page.
Subclasses should populate their widgets from the previous experiment or from SettingsStorage here. Only values that depend on choices made on other pages should be deferred to initialize().
- Parameters:
key – SettingsStorage scope key for this page.
title – Human-readable page title shown in the wizard.
exp – Non-owning pointer to the Experiment being configured.
parent – Parent widget.
Public Members
-
const QString d_key
SettingsStorage scope key for this page.
-
const QString d_title
Human-readable title shown in the wizard header.
Public Slots
-
virtual void initialize() = 0
Populate or refresh values that depend on choices made on other pages.
The wizard calls this slot after all pages have been constructed and before the page is first shown. Values that can be determined from the previous experiment or from SettingsStorage should be set in the constructor instead.
-
virtual bool validate() = 0
Return true if the page’s settings are internally consistent.
The wizard calls this before advancing to the next page. Return false and emit error() or warning() to block the advance and display a diagnostic message.
-
virtual void apply() = 0
Commit the page’s settings into the Experiment.
The wizard calls this after validate() returns true. Subclasses write their configuration into p_exp here.
Signals
-
void warning(QString)
Emit a non-fatal warning message for the wizard to display.
-
void error(QString)
Emit a fatal error message for the wizard to display.
Protected Attributes
-
Experiment *p_exp
Non-owning pointer to the in-flight Experiment.
-
explicit ExperimentConfigPage(const QString key, const QString title, Experiment *exp, QWidget *parent = nullptr)