#include <timeserieseditordialog.h>
|
| enum class | Mode {
Edit
,
CreateNew
} |
| | Editing mode. Edit is the default — the dialog is bound to one or more existing providers. CreateNew opens a create-card (name + source-mode) at the top of the dialog; the dialog transitions to Edit after the user clicks Create. Used by Slice BM.0-Add-New. More...
|
| |
|
| | TimeseriesEditorDialog (openswmmvis::timeseries::TimeseriesRegistry *registry, QUndoStack *undoStack, openswmmvis::timeseries::TimeseriesProvider *initialSelection=nullptr, QWidget *parent=nullptr) |
| | Sole public constructor (Phase 6.7.3-CRUD). Builds the three-pane editor (left = list of all series in registry, middle = grid, right = chart). If initialSelection is non-null AND is a member of the registry, it's selected on open; otherwise the dialog opens with no series bound and the list pane drives further selection.
|
| |
| | ~TimeseriesEditorDialog () override |
| |
| QString | currentName () const |
| | Name of the first provider currently bound to the dialog. Empty before a CreateNew commits. Exposed for pickTimeseries and for tests.
|
| |
| Mode | mode () const noexcept |
| | Current mode.
|
| |
| TimeseriesTableModel * | tableModel () const noexcept |
| | The grid model. Exposed for tests.
|
| |
| TimeseriesEditChartView * | chartView () const noexcept |
| | The chart view. Exposed for tests.
|
| |
| QString | pendingName () const |
| | Text in the create-card name field, or empty in Edit mode.
|
| |
| bool | isCreateEnabled () const |
| | True iff the Create button is currently enabled.
|
| |
| void | submitCreateNew () |
| | Programmatically click the create-card's Create button (test hook).
|
| |
| void | setProjectAnchor (const QString &dir) |
| | Slice IO-11d — set the directory used to display external-file paths in relative form. Typically the parent dir of the active project's .inp. Empty disables relativisation (legacy behaviour). The provider stores absolute paths regardless; this only affects what the dialog shows in the read-only path field.
|
| |
| QString | projectAnchor () const |
| |
| int | linkExternalFile (const QString &path, const QString &columnSelector=QString()) |
| | Bind the editor's first provider to an external file (CSV/TSV/.dat). Flips source mode to ExternalFile, populates the read-through point cache by parsing the file via the shared TimeseriesParse helper, and refreshes the source-mode card UI. Returns the number of points loaded.
|
| |
|
| static TimeseriesEditorDialog * | createNew (openswmmvis::timeseries::TimeseriesRegistry *registry, QUndoStack *undoStack, QWidget *parent=nullptr) |
| | Slice BM.0-Add-New factory: build the dialog in CreateNew mode on top of a registry. The dialog renders a create-card (name field + uniqueness validator + source-mode combo). Clicking Create calls registry->create(name), binds the returned provider to the grid + chart, hides the card, and transitions to Edit mode. Closing the dialog before Create adds nothing.
|
| |
| static QString | pickTimeseries (openswmmvis::timeseries::TimeseriesRegistry *registry, QUndoStack *undoStack, const QString &initialName, QWidget *parent=nullptr) |
| | Modal pick / create / edit entry point for callers that round-trip a time series selection inline (e.g. the NodeCompoundEditDialog inflow picker). Empty initialName → CreateNew mode; otherwise → Edit mode bound to that series. After the user closes the dialog, the registry is flushed back to the engine (saveToEngine) so engine state matches the edited points. Returns the name of the series currently bound to the dialog on close, or empty if no commit happened.
|
| |
|
| void | closeEvent (QCloseEvent *e) override |
| | Step F + Step E.2 — dispose any ExternalFile-mode point cache on the way out so the registry doesn't carry it around after the editor closes, and persist dialog geometry + splitter sizes.
|
| |
◆ Mode
Editing mode. Edit is the default — the dialog is bound to one or more existing providers. CreateNew opens a create-card (name + source-mode) at the top of the dialog; the dialog transitions to Edit after the user clicks Create. Used by Slice BM.0-Add-New.
◆ TimeseriesEditorDialog()
Sole public constructor (Phase 6.7.3-CRUD). Builds the three-pane editor (left = list of all series in registry, middle = grid, right = chart). If initialSelection is non-null AND is a member of the registry, it's selected on open; otherwise the dialog opens with no series bound and the list pane drives further selection.
The registry is required — callers that want a quick modal pick or create flow use pickTimeseries / createNew.
◆ ~TimeseriesEditorDialog()
| openswmmvis::ui::TimeseriesEditorDialog::~TimeseriesEditorDialog |
( |
| ) |
|
|
overridedefault |
◆ chartView()
The chart view. Exposed for tests.
◆ closeEvent()
| void openswmmvis::ui::TimeseriesEditorDialog::closeEvent |
( |
QCloseEvent * |
e | ) |
|
|
overrideprotected |
Step F + Step E.2 — dispose any ExternalFile-mode point cache on the way out so the registry doesn't carry it around after the editor closes, and persist dialog geometry + splitter sizes.
◆ createNew()
Slice BM.0-Add-New factory: build the dialog in CreateNew mode on top of a registry. The dialog renders a create-card (name field + uniqueness validator + source-mode combo). Clicking Create calls registry->create(name), binds the returned provider to the grid + chart, hides the card, and transitions to Edit mode. Closing the dialog before Create adds nothing.
Caller owns the returned dialog (use Qt::WA_DeleteOnClose for fire-and-forget modeless use).
◆ currentName()
| QString openswmmvis::ui::TimeseriesEditorDialog::currentName |
( |
| ) |
const |
Name of the first provider currently bound to the dialog. Empty before a CreateNew commits. Exposed for pickTimeseries and for tests.
◆ isCreateEnabled()
| bool openswmmvis::ui::TimeseriesEditorDialog::isCreateEnabled |
( |
| ) |
const |
True iff the Create button is currently enabled.
◆ linkExternalFile()
| int openswmmvis::ui::TimeseriesEditorDialog::linkExternalFile |
( |
const QString & |
path, |
|
|
const QString & |
columnSelector = QString() |
|
) |
| |
Bind the editor's first provider to an external file (CSV/TSV/.dat). Flips source mode to ExternalFile, populates the read-through point cache by parsing the file via the shared TimeseriesParse helper, and refreshes the source-mode card UI. Returns the number of points loaded.
- Parameters
-
| path | Absolute path to the file. |
| columnSelector | Optional column-name match. Empty = first column. Exposed both for tests and for programmatic linking (Object Browser hook could call this on drop-from-finder, etc.). |
◆ mode()
| Mode openswmmvis::ui::TimeseriesEditorDialog::mode |
( |
| ) |
const |
|
inlinenoexcept |
◆ pendingName()
| QString openswmmvis::ui::TimeseriesEditorDialog::pendingName |
( |
| ) |
const |
Text in the create-card name field, or empty in Edit mode.
◆ pickTimeseries()
Modal pick / create / edit entry point for callers that round-trip a time series selection inline (e.g. the NodeCompoundEditDialog inflow picker). Empty initialName → CreateNew mode; otherwise → Edit mode bound to that series. After the user closes the dialog, the registry is flushed back to the engine (saveToEngine) so engine state matches the edited points. Returns the name of the series currently bound to the dialog on close, or empty if no commit happened.
◆ projectAnchor()
| QString openswmmvis::ui::TimeseriesEditorDialog::projectAnchor |
( |
| ) |
const |
|
inline |
◆ setProjectAnchor()
| void openswmmvis::ui::TimeseriesEditorDialog::setProjectAnchor |
( |
const QString & |
dir | ) |
|
Slice IO-11d — set the directory used to display external-file paths in relative form. Typically the parent dir of the active project's .inp. Empty disables relativisation (legacy behaviour). The provider stores absolute paths regardless; this only affects what the dialog shows in the read-only path field.
◆ submitCreateNew()
| void openswmmvis::ui::TimeseriesEditorDialog::submitCreateNew |
( |
| ) |
|
Programmatically click the create-card's Create button (test hook).
◆ tableModel()
The grid model. Exposed for tests.
The documentation for this class was generated from the following files: