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

Slice BQ Phase 6.7.2 — MVC model for a single SWMM time pattern. More...

#include <QObject>
#include <QString>
#include <QVector>
Include dependency graph for patternprovider.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::pattern::PatternProvider
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::pattern
 

Enumerations

enum class  openswmmvis::pattern::PatternType {
  openswmmvis::pattern::Monthly = 0 ,
  openswmmvis::pattern::Daily = 1 ,
  openswmmvis::pattern::Hourly = 2 ,
  openswmmvis::pattern::Weekend = 3
}
 Pattern shape — fixed factor count per type. Numeric values intentionally match the engine's PatternType enum (MONTHLY=0, DAILY=1, HOURLY=2, WEEKEND=3) so casts to/from int are safe. More...
 

Detailed Description

Slice BQ Phase 6.7.2 — MVC model for a single SWMM time pattern.

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

One PatternProvider per [PATTERNS] entry in the project. Owned by a project-scoped PatternRegistry. Acts as the single source of truth for that pattern: the editor dialog's grid, bar-chart preview, Object Browser property pane, and any DWF inflow picker all subscribe to the provider's Qt signals (per [[feedback_mvc_synchronized_uis]]).

Patterns are fixed-size dimensionless multiplier arrays whose count is determined by the pattern type:

  • Monthly — 12 factors (one per calendar month)
  • Daily — 7 factors (one per day of week, Sun … Sat)
  • Hourly — 24 factors (one per hour of day, weekday)
  • Weekend — 24 factors (one per hour of day, weekend)

SWMM's legacy convention is avg = 1.0 (sum = N), but the editor's normalize() lets callers rescale to any target sum (default 1.0 per the user-confirmed UX in Slice BQ Phase 6.7.2).

Mutations are intended to flow through QUndoCommand subclasses; this class is undo-stack agnostic and exposes the raw apply* methods.