SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
timeserieslistmodel.h File Reference

Slice BQ Phase 6.7.3.3-CRUD — QAbstractListModel over a TimeseriesRegistry; drives the editor dialog's left-pane list. More...

#include <QAbstractListModel>
#include <QPointer>
#include <QVector>
Include dependency graph for timeserieslistmodel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::TimeseriesListModel
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::timeseries
 
namespace  openswmmvis::ui
 

Detailed Description

Slice BQ Phase 6.7.3.3-CRUD — QAbstractListModel over a TimeseriesRegistry; drives the editor dialog's left-pane list.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Mirrors the HydrographGroupListModel convention so the new TimeseriesEditor dialog can present the same three-pane CRUD UX as HydrographGroupEditor (left = list of all series + New/Delete/Rename, right = per-series edit surface). Selection in the list drives which TimeseriesProvider the grid + chart are bound to.

The model:

  • listens to the registry's providerAdded / providerAboutToBeRemoved / providerRenamed signals so external CRUD (e.g. registry.create() from the Add-New flow, or registry.remove() from a different surface) is automatically reflected in the list.
  • exposes the provider name via Qt::DisplayRole / Qt::EditRole so the view can offer in-place rename via QListView::setEditTriggers.
  • on setData(EditRole) routes through TimeseriesRegistry::rename so the case-insensitive uniqueness check is enforced.

No undo support — rename / create / delete are atomic and applied immediately. The undo-stack integration belongs at the editor-dialog layer, which wraps each CRUD call in a QUndoCommand.