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
patternfactortablemodel.h File Reference

Slice BQ Phase 6.7.2 — QAbstractTableModel over one PatternProvider. More...

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

Go to the source code of this file.

Classes

class  openswmmvis::ui::PatternFactorTableModel
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::pattern
 
namespace  openswmmvis::ui
 

Detailed Description

Slice BQ Phase 6.7.2 — QAbstractTableModel over one PatternProvider.

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

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.