33#ifndef OPENSWMMVIS_UI_DIALOGS_TIMESERIESEDITORDIALOG_H
34#define OPENSWMMVIS_UI_DIALOGS_TIMESERIESEDITORDIALOG_H
52class QSortFilterProxyModel;
61class TimeseriesProvider;
62class TimeseriesRegistry;
67class TimeseriesEditChartView;
68class TimeseriesListModel;
69class TimeseriesTableModel;
70class ChartAxisFormatController;
92 QUndoStack *undoStack,
94 QWidget *
parent =
nullptr);
109 QUndoStack *undoStack,
110 QWidget *
parent =
nullptr);
121 QUndoStack *undoStack,
122 const QString &initialName,
123 QWidget *
parent =
nullptr);
175 void onSelectModeTriggered_();
176 void onPanModeTriggered_();
177 void onZoomInModeTriggered_();
178 void onZoomOutModeTriggered_();
179 void onEditModeTriggered_();
180 void onSnapToggled_(
bool on);
181 void onMutationRejected_(
const QString &reason);
182 void onProviderPointsChanged_();
183 void onProviderPointsInserted_();
184 void onProviderPointsRemoved_();
185 void onCreateNewNameChanged_(
const QString &
text);
186 void onCreateNewSubmit_();
189 void onAddRowTriggered_();
190 void onDeleteRowsTriggered_();
191 void onCopyRowsTriggered_();
192 void onPasteRowsTriggered_();
193 void onGridContextMenu_(
const QPoint &posInViewport);
196 void onSourceModeRadioToggled_();
197 void onBrowseExternalFile_();
198 void onColumnSelectorChanged_(
int index);
199 void onReloadExternalFile_();
200 void onDetachToInline_();
201 void onTimeModeComboChanged_(
int index);
204 void onApplyRotateClicked_();
205 void onApplyScaleClicked_();
206 void onChartEditModeChanged_();
209 void onListSelectionChanged_();
210 void onListFilterChanged_(
const QString &
text);
211 void onNewSeriesClicked_();
212 void onDeleteSeriesClicked_();
213 void onRenameSeriesClicked_();
216 void buildUi_(
const QVector<openswmmvis::timeseries::TimeseriesProvider *> &providers);
217 void wireProviderSignals_();
218 void updateStatusBar_();
219 void buildCreateCard_();
223 void buildListPane_();
229 void buildSourceModeCard_();
230 void refreshSourceModeCardForProvider_();
234 void refreshTimeModeRow_();
243 void populateColumnCombo_(
const QStringList &headers,
244 const QString &columnSelector,
245 bool fabricatedHeaders =
false);
248 void buildTransformPanel_();
260 const QString &columnSelector,
261 QStringList *columnHeadersOut =
nullptr,
262 QString *errorOut =
nullptr,
263 bool *fabricatedOut =
nullptr);
265 QVector<QPointer<openswmmvis::timeseries::TimeseriesProvider>> m_providers;
266 QUndoStack *m_undoStack =
nullptr;
267 QPointer<openswmmvis::timeseries::TimeseriesRegistry> m_registry;
270 QSplitter *m_splitter =
nullptr;
271 QTableView *m_table =
nullptr;
275 QToolBar *m_toolbar =
nullptr;
276 QStatusBar *m_status =
nullptr;
277 QLabel *m_countLabel =
nullptr;
278 QLabel *m_rangeLabel =
nullptr;
280 bool m_suppressTableSelectionSync_ts =
false;
281 bool m_suppressChartSelectionSync_ts =
false;
284 QWidget *m_listPane =
nullptr;
285 QSortFilterProxyModel *m_listProxy =
nullptr;
286 QListView *m_listView =
nullptr;
287 QLineEdit *m_listFilterEdit =
nullptr;
288 QToolButton *m_listNewBtn =
nullptr;
289 QToolButton *m_listDeleteBtn =
nullptr;
290 QToolButton *m_listRenameBtn =
nullptr;
294 QFrame *m_createCard =
nullptr;
295 QLineEdit *m_nameEdit =
nullptr;
296 QLabel *m_nameValidationLabel =
nullptr;
297 QComboBox *m_sourceModeCombo =
nullptr;
298 QPushButton *m_createBtn =
nullptr;
300 QAction *m_actSelect =
nullptr;
301 QAction *m_actPan =
nullptr;
302 QAction *m_actZoomIn =
nullptr;
303 QAction *m_actZoomOut =
nullptr;
304 QAction *m_actZoomExt =
nullptr;
305 QAction *m_actEdit =
nullptr;
306 QAction *m_actRotate =
nullptr;
307 QAction *m_actScale =
nullptr;
308 QAction *m_actSnap =
nullptr;
309 QAction *m_actUndo =
nullptr;
310 QAction *m_actRedo =
nullptr;
313 QAction *m_actAddRow =
nullptr;
314 QAction *m_actDeleteRow =
nullptr;
315 QAction *m_actCopy =
nullptr;
316 QAction *m_actPaste =
nullptr;
319 QFrame *m_sourceCard =
nullptr;
320 QRadioButton *m_radioInline =
nullptr;
321 QRadioButton *m_radioExternal =
nullptr;
322 QRadioButton *m_radioGeopackage =
nullptr;
323 QLineEdit *m_extPathEdit =
nullptr;
324 QPushButton *m_extBrowseBtn =
nullptr;
325 QString m_projectAnchor;
326 QComboBox *m_extColumnCombo =
nullptr;
327 bool m_extHeadersFabricated =
false;
328 QLabel *m_extStatusLabel =
nullptr;
329 QPushButton *m_extReloadBtn =
nullptr;
330 QPushButton *m_extDetachBtn =
nullptr;
331 QLabel *m_gpkgPlaceholderLbl =
nullptr;
332 QComboBox *m_timeModeCombo =
nullptr;
333 QLabel *m_timeModeBadge =
nullptr;
336 QFrame *m_transformPanel =
nullptr;
337 QFrame *m_rotateGroup =
nullptr;
338 QFrame *m_scaleGroup =
nullptr;
339 QDateTimeEdit *m_rotatePivotTimeEdit =
nullptr;
340 QDoubleSpinBox *m_rotatePivotValueEdit =
nullptr;
341 QDoubleSpinBox *m_rotateAngleEdit =
nullptr;
342 QCheckBox *m_rotateUseCentroid =
nullptr;
343 QPushButton *m_rotateApplyBtn =
nullptr;
344 QDateTimeEdit *m_scaleAnchorTimeEdit =
nullptr;
345 QDoubleSpinBox *m_scaleAnchorValueEdit =
nullptr;
346 QDoubleSpinBox *m_scaleXEdit =
nullptr;
347 QDoubleSpinBox *m_scaleYEdit =
nullptr;
348 QCheckBox *m_scaleUseCentroid =
nullptr;
349 QPushButton *m_scaleApplyBtn =
nullptr;
Definition timeseriesprovider.h:43
Definition timeseriesregistry.h:35
Definition timeserieseditchartview.h:58
Definition timeserieseditordialog.h:73
TimeseriesTableModel * tableModel() const noexcept
The grid model. Exposed for tests.
Definition timeserieseditordialog.h:134
QString pendingName() const
Text in the create-card name field, or empty in Edit mode.
Definition timeserieseditordialog.cpp:354
TimeseriesEditChartView * chartView() const noexcept
The chart view. Exposed for tests.
Definition timeserieseditordialog.h:137
bool isCreateEnabled() const
True iff the Create button is currently enabled.
Definition timeserieseditordialog.cpp:359
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 ExternalFil...
Definition timeserieseditordialog.cpp:1444
QString currentName() const
Name of the first provider currently bound to the dialog. Empty before a CreateNew commits....
Definition timeserieseditordialog.cpp:219
~TimeseriesEditorDialog() override
Mode mode() const noexcept
Current mode.
Definition timeserieseditordialog.h:131
QString projectAnchor() const
Definition timeserieseditordialog.h:156
void submitCreateNew()
Programmatically click the create-card's Create button (test hook).
Definition timeserieseditordialog.cpp:364
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....
Definition timeserieseditordialog.cpp:172
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....
Definition timeserieseditordialog.cpp:185
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 ...
Definition timeserieseditordialog.cpp:156
void setProjectAnchor(const QString &dir)
Slice IO-11d — set the directory used to display external-file paths in relative form....
Definition timeserieseditordialog.cpp:226
Mode
Editing mode. Edit is the default — the dialog is bound to one or more existing providers....
Definition timeserieseditordialog.h:80
Definition timeserieslistmodel.h:44
Definition timeseriestablemodel.h:48
int e
Definition inpmeshreader.cpp:41
ArrowPlacement p
Definition linesymbollayer.cpp:27
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Definition timeseriesprovider.h:34
Definition openswmmvislayer.h:43
int path
Definition pslgminsize.cpp:234
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
QString text
Definition queryparser.cpp:35