![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Slice BQ Phase 6.7.2 — QAbstractTableModel over one PatternProvider. More...
#include <QAbstractTableModel>#include <QPointer>Go to the source code of this file.
Classes | |
| class | openswmmvis::ui::PatternFactorTableModel |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::pattern |
| namespace | openswmmvis::ui |
Slice BQ Phase 6.7.2 — QAbstractTableModel over one PatternProvider.
Schema is fixed: one column "Factor" with N rows where N = the bound provider's factorCount() (12 monthly / 7 daily / 24 hourly / 24 weekend). Vertical-header text uses PatternProvider::rowLabel(type, i) so the grid reads "Jan / Feb / …" or "Sun / Mon / …" or "00:00 / 01:00 / …" depending on the bound pattern's type.
setData validates via PatternProvider::setFactor (no negative values, in-range index); the model relies on the provider's mutationRejected signal for surface-level error feedback. Live drag-edit (slider, future) should bypass the model and call setFactorLive directly to avoid undo churn.
Subscribes to the provider's factorChanged / factorsChanged / typeChanged signals so external mutations refresh the view automatically.