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
PreferencesManager Class Reference

#include <preferencesmanager.h>

Inheritance diagram for PreferencesManager:
Collaboration diagram for PreferencesManager:

Classes

struct  ObjectDefaults
 
struct  SimulationDefaults
 
struct  TwoDDefaults
 

Signals

void preferenceChanged (const QString &group, const QString &key)
 

Public Member Functions

int clickTolerancePx () const
 
void setClickTolerancePx (int pixels)
 
int dragThresholdPx () const
 
void setDragThresholdPx (int pixels)
 
bool clearSelectionOnMiss () const
 
void setClearSelectionOnMiss (bool on)
 
QPen selectionPen (const QString &className) const
 
void setSelectionPen (const QString &className, const QPen &pen)
 
QBrush selectionBrush (const QString &className) const
 
void setSelectionBrush (const QString &className, const QBrush &brush)
 
QColor selectionColor (const QString &className) const
 
void resetSelectionStyleToDefault (const QString &className)
 
QString appearanceMode () const
 
void setAppearanceMode (const QString &mode)
 
QString defaultTool () const
 
void setDefaultTool (const QString &tool)
 
QString defaultCrsMode () const
 
void setDefaultCrsMode (const QString &mode)
 
QString defaultCrsAuthority () const
 
int defaultCrsCode () const
 
void setDefaultCrsAuthority (const QString &authority)
 
void setDefaultCrsCode (int code)
 
bool qsgRenderEnabled () const
 
void setQsgRenderEnabled (bool enabled)
 
bool qsgMeshRenderEnabled () const
 
void setQsgMeshRenderEnabled (bool enabled)
 
bool autoBuildRasterOverviews () const
 
void setAutoBuildRasterOverviews (bool enabled)
 
bool snapEnabled () const
 
void setSnapEnabled (bool enabled)
 
int snapTolerancePx () const
 
void setSnapTolerancePx (int px)
 
bool snapToVertices () const
 
void setSnapToVertices (bool enabled)
 
qreal labelLodM11Min () const
 
void setLabelLodM11Min (qreal m11)
 
QPen linkPen (const QString &linkType) const
 
void setLinkPen (const QString &linkType, const QPen &pen)
 
QColor linkColor (const QString &linkType) const
 
void resetLinkPenToDefault (const QString &linkType)
 
QPen nodePen (const QString &nodeType) const
 
void setNodePen (const QString &nodeType, const QPen &pen)
 
QBrush nodeBrush (const QString &nodeType) const
 
void setNodeBrush (const QString &nodeType, const QBrush &brush)
 
double nodeSize (const QString &nodeType) const
 
void setNodeSize (const QString &nodeType, double sizePx)
 
void resetNodeStyleToDefault (const QString &nodeType)
 
QMap< QString, RasterColorRampcustomColorRamps () const
 
void saveCustomColorRamp (const QString &name, const RasterColorRamp &ramp)
 
void removeCustomColorRamp (const QString &name)
 
bool meshBcColorByType () const
 
void setMeshBcColorByType (bool on)
 
QColor meshBcColor (int type) const
 
void setMeshBcColor (int type, const QColor &color)
 
double meshBcWidthPx (int type) const
 
void setMeshBcWidthPx (int type, double px)
 
int progressTickMs () const
 
void setProgressTickMs (int ms)
 
int live2DHistoryCap () const
 
void setLive2DHistoryCap (int frames)
 
int live2DHistoryMB () const
 
void setLive2DHistoryMB (int megabytes)
 
bool liveResults1DEnabled () const
 
void setLiveResults1DEnabled (bool on)
 
double animationSpeed () const
 
void setAnimationSpeed (double speed)
 
int profileMaxPaths () const
 
void setProfileMaxPaths (int n)
 
int profileEndpointHaloRadiusPx () const
 
void setProfileEndpointHaloRadiusPx (int px)
 
QPen profileStartEndpointPen () const
 
void setProfileStartEndpointPen (const QPen &pen)
 
QPen profileEndEndpointPen () const
 
void setProfileEndEndpointPen (const QPen &pen)
 
QColor scaleBarPenColor () const
 
void setScaleBarPenColor (const QColor &color)
 
int scaleBarPenWidth () const
 Default 2; range 1–20.
 
void setScaleBarPenWidth (int width)
 
int scaleBarPenStyle () const
 Qt::PenStyle as int; default Qt::SolidLine.
 
void setScaleBarPenStyle (int style)
 
QString scaleBarFontFamily () const
 Default "sans-serif".
 
void setScaleBarFontFamily (const QString &family)
 
int scaleBarFontSize () const
 Default 8; range 4–72.
 
void setScaleBarFontSize (int size)
 
int scaleBarUnits () const
 ScaleBarSettings::Units as int; default 0 (Auto)
 
void setScaleBarUnits (int units)
 
int scaleBarPosition () const
 ScaleBarSettings::Position as int; default 0 (BottomLeft)
 
void setScaleBarPosition (int position)
 
int scaleBarMaxBarLength () const
 Default 100; range 20–500.
 
void setScaleBarMaxBarLength (int length)
 
int scaleBarLabelDecimals () const
 -1=auto, 0=whole, n=n decimals. Default -1.
 
void setScaleBarLabelDecimals (int decimals)
 
bool scaleBarCompactNotation () const
 Default false.
 
void setScaleBarCompactNotation (bool compact)
 
QColor measureLineColor () const
 Segment + vertex dot color. Default Qt::red.
 
void setMeasureLineColor (const QColor &color)
 
QString measureLabelFontFamily () const
 Default "sans-serif".
 
void setMeasureLabelFontFamily (const QString &family)
 
int measureLabelFontSize () const
 Default 8; range 4–72.
 
void setMeasureLabelFontSize (int size)
 
int measureLabelDecimals () const
 Decimal places in labels. Default 2; range 0–6.
 
void setMeasureLabelDecimals (int decimals)
 
QColor measureFillColor () const
 Area polygon fill base color. Default #6495ED (cornflower blue)
 
void setMeasureFillColor (const QColor &color)
 
int measureFillOpacity () const
 Area fill opacity 0–100 %. Default 30.
 
void setMeasureFillOpacity (int opacity)
 
int plotXAxisFormatMode () const
 Default 0 (Decimals)
 
void setPlotXAxisFormatMode (int mode)
 
int plotXAxisPrecision () const
 Default 0; range 0–10.
 
void setPlotXAxisPrecision (int count)
 
int plotYAxisFormatMode () const
 Default 0 (Decimals)
 
void setPlotYAxisFormatMode (int mode)
 
int plotYAxisPrecision () const
 Default 2; range 0–10.
 
void setPlotYAxisPrecision (int count)
 
openswmmvis::plot::NumberFormat plotXAxisFormat () const
 
openswmmvis::plot::NumberFormat plotYAxisFormat () const
 
QString elementNamePrefix (const QString &kind) const
 
void setElementNamePrefix (const QString &kind, const QString &prefix)
 
double terrainDefaultNodeOffset () const
 
void setTerrainDefaultNodeOffset (double offset)
 
double terrainDefaultLinkOffset () const
 
void setTerrainDefaultLinkOffset (double offset)
 
bool autoLengthEnabled () const
 
void setAutoLengthEnabled (bool enabled)
 
QString defaultEngineMode () const
 
void setDefaultEngineMode (const QString &version)
 
SimulationDefaults simulationDefaults () const
 
void setSimulationDefaults (const SimulationDefaults &d)
 
TwoDDefaults twoDDefaults () const
 
void setTwoDDefaults (const TwoDDefaults &d)
 
ObjectDefaults objectDefaults (bool si) const
 
void setObjectDefaults (const ObjectDefaults &d, bool si)
 

Static Public Member Functions

static PreferencesManagerinstance ()
 

Member Function Documentation

◆ animationSpeed()

double PreferencesManager::animationSpeed ( ) const

Default animation playback speed multiplier restored at startup. Valid values: 0.25, 0.5, 1.0, 2.0, 4.0, 8.0 (mirrors the animation toolbar's Speed combo). Default 1.0. Per-session overrides live in .oswp (Slice BA Phase 8.5).

Here is the caller graph for this function:

◆ appearanceMode()

QString PreferencesManager::appearanceMode ( ) const

Chrome theme mode. One of "System" (follow the OS appearance, default) / "Light" / "Dark". Consumed by ThemeManager.

Here is the caller graph for this function:

◆ autoBuildRasterOverviews()

bool PreferencesManager::autoBuildRasterOverviews ( ) const

Whether a large raster opened without internal overviews gets an external .ovr pyramid built automatically in the background (once per file, never modifying the source). Off ⇒ big rasters stay on the slow full-resolution warp until the user builds pyramids manually. Default true.

Here is the caller graph for this function:

◆ autoLengthEnabled()

bool PreferencesManager::autoLengthEnabled ( ) const

Whether the auto-length policy is enabled by default when a project opens. The Status-bar checkbox in SWMMVis still surfaces the per-project override. Default true.

Here is the caller graph for this function:

◆ clearSelectionOnMiss()

bool PreferencesManager::clearSelectionOnMiss ( ) const

When the user clicks in empty space (no hit-target), clear the current selection. Default true.

Here is the caller graph for this function:

◆ clickTolerancePx()

int PreferencesManager::clickTolerancePx ( ) const

Pixel-tolerance floor for click-picking. Effective tolerance at pick time is max(clickTolerancePx, markerFloor + 4 px halo), so clicks inside the visible glyph always hit regardless of this value. Default 16.

Here is the caller graph for this function:

◆ customColorRamps()

QMap< QString, RasterColorRamp > PreferencesManager::customColorRamps ( ) const

User-authored colour ramps keyed by display name, stored under SWMMVis/Preferences/Rendering/CustomRamps as a JSON array. Each entry is the RasterColorRamp::toJson() payload plus a "name" field. Reads return the latest persisted map; writes update both the in-memory cache and QSettings. Emits preferenceChanged with group "Rendering", key "CustomRamps".

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defaultCrsAuthority()

QString PreferencesManager::defaultCrsAuthority ( ) const

Default CRS authority (e.g. "EPSG") + code (e.g. 4326) used when the loaded .inp has no CRS and mode is "EPSG".

Here is the caller graph for this function:

◆ defaultCrsCode()

int PreferencesManager::defaultCrsCode ( ) const
Here is the caller graph for this function:

◆ defaultCrsMode()

QString PreferencesManager::defaultCrsMode ( ) const

CRS mode when the loaded .inp has no embedded CRS. "LocalAuto" (default) — auto-generate a local CRS from [MAP] Units. "EPSG" — use defaultCrsAuthority() / defaultCrsCode().

Here is the caller graph for this function:

◆ defaultEngineMode()

QString PreferencesManager::defaultEngineMode ( ) const

Engine version string activated by default at startup / on File→New. One of SWMM_VERSION (refactored engine, default) or LEGACY_SWMM_VERSION (SWMM5 legacy engine).

Here is the caller graph for this function:

◆ defaultTool()

QString PreferencesManager::defaultTool ( ) const

Default tool active when a project opens. One of "Select" / "Pan" / "Zoom". Default "Select".

Here is the caller graph for this function:

◆ dragThresholdPx()

int PreferencesManager::dragThresholdPx ( ) const

Drag threshold in pixels before a click turns into a rubber-band rectangle select. Default 8.

Here is the caller graph for this function:

◆ elementNamePrefix()

QString PreferencesManager::elementNamePrefix ( const QString &  kind) const

Name prefix used when auto-generating IDs for newly placed SWMM objects. kind is one of: "junction", "outfall", "storage", "divider", "conduit", "pump", "orifice", "weir", "outlet", "raingage", "subcatchment". Unknown kinds return the kind string itself as a safe fallback.

Defaults: junction→"J", outfall→"O", storage→"S", divider→"D", conduit→"C", pump→"Pu", orifice→"Or", weir→"W", outlet→"Ou", raingage→"RG", subcatchment→"Sub".

Here is the caller graph for this function:

◆ instance()

PreferencesManager * PreferencesManager::instance ( )
static

Process-wide singleton. Constructed on first access; reads current values from QSettings at construction so app-scope keys are immediately available to early callers.

◆ labelLodM11Min()

qreal PreferencesManager::labelLodM11Min ( ) const

Minimum view-transform m11() required for label drawing in the batched renderer. Below this the label pass is skipped entirely. Default 0.5.

Here is the caller graph for this function:

◆ linkColor()

QColor PreferencesManager::linkColor ( const QString &  linkType) const

Convenience wrapper around linkPen(linkType).color(). Retained for call sites that only need the colour.

Here is the call graph for this function:

◆ linkPen()

QPen PreferencesManager::linkPen ( const QString &  linkType) const

Full rendering pen for a link subtype — colour, width, cap, join, style and dash are all user-tunable via the Preferences dialog's Rendering page (a QPropertyModel-backed editor).

linkType is one of: "conduit", "pump", "orifice", "weir", "outlet" (case-insensitive). Unknown keys fall back to the conduit default.

Stored under SWMMVis/Preferences/Rendering/LinkPen/<Type>. On first load any legacy SWMMVis/Preferences/Rendering/LinkColor/<Type> values are migrated to a pen carrying the default width/cap for that link type, then the legacy key is removed.

Here is the caller graph for this function:

◆ live2DHistoryCap()

int PreferencesManager::live2DHistoryCap ( ) const

Live 2D results: maximum frames kept in memory while a run streams (default 2000). Past the cap the older half is thinned 2:1; frames keep their sim times. Range 100–200000.

Here is the caller graph for this function:

◆ live2DHistoryMB()

int PreferencesManager::live2DHistoryMB ( ) const

Live 2D results: byte budget (MB) for the frames kept in memory, applied alongside the frame cap — the frame cap alone let a large mesh hold gigabytes. Default 1024 MB, range 64–32768.

Here is the caller graph for this function:

◆ liveResults1DEnabled()

bool PreferencesManager::liveResults1DEnabled ( ) const

Live 1D results: open the run's .out while the engine writes it and grow the results layer (map animation, profile + comparison plots) on every progress tick. Applies to the 6.x engine and the legacy workers alike (both flush per report period). Default true.

Here is the caller graph for this function:

◆ measureFillColor()

QColor PreferencesManager::measureFillColor ( ) const

Area polygon fill base color. Default #6495ED (cornflower blue)

Here is the caller graph for this function:

◆ measureFillOpacity()

int PreferencesManager::measureFillOpacity ( ) const

Area fill opacity 0–100 %. Default 30.

Here is the caller graph for this function:

◆ measureLabelDecimals()

int PreferencesManager::measureLabelDecimals ( ) const

Decimal places in labels. Default 2; range 0–6.

Here is the caller graph for this function:

◆ measureLabelFontFamily()

QString PreferencesManager::measureLabelFontFamily ( ) const

Default "sans-serif".

Here is the caller graph for this function:

◆ measureLabelFontSize()

int PreferencesManager::measureLabelFontSize ( ) const

Default 8; range 4–72.

Here is the caller graph for this function:

◆ measureLineColor()

QColor PreferencesManager::measureLineColor ( ) const

Segment + vertex dot color. Default Qt::red.

Here is the caller graph for this function:

◆ meshBcColor()

QColor PreferencesManager::meshBcColor ( int  type) const
Here is the caller graph for this function:

◆ meshBcColorByType()

bool PreferencesManager::meshBcColorByType ( ) const

Defaults a NEW mesh-edge sublayer style adopts for boundary-condition edge rendering. Per-layer edits still win and are persisted with the project / style file — these only seed a style that has never been configured, exactly like nodePen()/linkPen() seed object symbology.

type is a mesh::MeshBCTypes::Type value (0 = Wall .. 6 = rating curve). Out-of-range indices fold onto Wall.

Width has no Wall entry: Wall edges ARE the interior wireframe and are drawn at the edge style's own lineWidthPx.

Here is the caller graph for this function:

◆ meshBcWidthPx()

double PreferencesManager::meshBcWidthPx ( int  type) const
Here is the caller graph for this function:

◆ nodeBrush()

QBrush PreferencesManager::nodeBrush ( const QString &  nodeType) const

Fill brush for a node marker class. Used as the glyph fill in the CPU + QSG paint paths. Stored under SWMMVis/Preferences/Rendering/NodeBrush/<Type>.

Here is the caller graph for this function:

◆ nodePen()

QPen PreferencesManager::nodePen ( const QString &  nodeType) const

Outline pen for a node marker class — colour, width, cap, join, style and dash are all user-tunable via the Preferences dialog's Rendering page (a QPropertyModel-backed editor).

nodeType is one of: "junction", "outfall", "storage", "divider" (case-insensitive). Unknown keys fall back to the junction default.

Stored under SWMMVis/Preferences/Rendering/NodePen/<Type>.

Here is the caller graph for this function:

◆ nodeSize()

double PreferencesManager::nodeSize ( const QString &  nodeType) const

Marker diameter in pixels for a node class. Default 8 (junction / divider), 12.5 (outfall), 12.0 (storage). Range 1–64 px. Stored under SWMMVis/Preferences/Rendering/NodeSize/<Type>.

Here is the caller graph for this function:

◆ objectDefaults()

PreferencesManager::ObjectDefaults PreferencesManager::objectDefaults ( bool  si) const
Here is the call graph for this function:

◆ plotXAxisFormat()

openswmmvis::plot::NumberFormat PreferencesManager::plotXAxisFormat ( ) const

Convenience: the global default X/Y format as a value type.

Here is the call graph for this function:

◆ plotXAxisFormatMode()

int PreferencesManager::plotXAxisFormatMode ( ) const

Default 0 (Decimals)

App-wide default for how chart plots render numbers, separately for the X and Y axes. A plot inherits these unless its own properties dialog overrides them. *FormatMode is NumberFormatMode as int (0=Decimals, 1=SignificantFigures, 2=Scientific, 3=Engineering, 4=Thousands); *Precision is the digit count (decimals 0–10, sig figs 1–10). Time/date axes are unaffected.

Here is the caller graph for this function:

◆ plotXAxisPrecision()

int PreferencesManager::plotXAxisPrecision ( ) const

Default 0; range 0–10.

Here is the caller graph for this function:

◆ plotYAxisFormat()

openswmmvis::plot::NumberFormat PreferencesManager::plotYAxisFormat ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotYAxisFormatMode()

int PreferencesManager::plotYAxisFormatMode ( ) const

Default 0 (Decimals)

Here is the caller graph for this function:

◆ plotYAxisPrecision()

int PreferencesManager::plotYAxisPrecision ( ) const

Default 2; range 0–10.

Here is the caller graph for this function:

◆ preferenceChanged

void PreferencesManager::preferenceChanged ( const QString &  group,
const QString &  key 
)
signal

Emitted after any successful set*. group is one of "Selection" / "Canvas" / "Rendering" / "Simulation" / "Decorations" / "Output"; key identifies the specific setting.

◆ profileEndEndpointPen()

QPen PreferencesManager::profileEndEndpointPen ( ) const

Pen used to stroke the end-endpoint halo. Default: solid red, width 3 px.

◆ profileEndpointHaloRadiusPx()

int PreferencesManager::profileEndpointHaloRadiusPx ( ) const

Radius (in screen pixels, not scene units) of the start/end endpoint halo drawn on the map while a profile is being picked. The halo is cosmetic — its size stays constant regardless of map zoom. Default 10 px, which sits slightly outside the default 8 px junction marker so the halo reads clearly as an indicator without occluding the node glyph.

Here is the caller graph for this function:

◆ profileMaxPaths()

int PreferencesManager::profileMaxPaths ( ) const

Maximum number of candidate simple paths the profile-plot tool will enumerate between two endpoints before truncating. Default 100. Range 1–1000000 (the upper bound is a sanity floor — exhaustive enumeration is exponential in the worst case so very high values may freeze the UI on heavily-meshed networks; the router's wall-clock soft cap will still bail out before total hang).

Here is the caller graph for this function:

◆ profileStartEndpointPen()

QPen PreferencesManager::profileStartEndpointPen ( ) const

Pen used to stroke the start-endpoint halo. Width is also in screen pixels (the pen is cosmetic). Default: solid green, width 3 px.

◆ progressTickMs()

int PreferencesManager::progressTickMs ( ) const

Progress-tick interval (ms) for live UI updates while a simulation runs. 1 Hz by default — short enough to feel live, long enough to not starve the event loop on small models.

Here is the caller graph for this function:

◆ qsgMeshRenderEnabled()

bool PreferencesManager::qsgMeshRenderEnabled ( ) const

Mesh Tiled LOD plan P1.1 — GPU scene-graph rendering for 2D terrain mesh layers. When enabled, MapCanvas hands the topmost visible SWMM2DMeshLayer to SWMM2DMeshQSGRenderer and the CPU SWMM2DMeshGraphicsItem paint is skipped (qsgOwnsRendering gate). QPainter path remains the fallback. App-wide env kill-switch: OPENSWMM_QSG_MESH=0. Default true.

Here is the caller graph for this function:

◆ qsgRenderEnabled()

bool PreferencesManager::qsgRenderEnabled ( ) const

Slice §QSG-4 (2026-05-27) — single switch for the GPU scene-graph rendering path. When enabled, every newly-added SWMMModelLayer has its qsgRenderKinds set to all four kinds (Nodes | Links | Catch | Gages), the CPU SWMMLayerItem skips every kind, and the QSG overlay draws everything. When disabled, the CPU painter path renders the network — left as a fallback for users who hit GPU-driver-specific issues. Default true.

Here is the caller graph for this function:

◆ removeCustomColorRamp()

void PreferencesManager::removeCustomColorRamp ( const QString &  name)
Here is the call graph for this function:

◆ resetLinkPenToDefault()

void PreferencesManager::resetLinkPenToDefault ( const QString &  linkType)

Clears any user-set pen for linkType so the next linkPen() call returns the compile-time default. Emits preferenceChanged. Used by the Preferences dialog's "Reset to defaults" button.

Here is the call graph for this function:

◆ resetNodeStyleToDefault()

void PreferencesManager::resetNodeStyleToDefault ( const QString &  nodeType)

Clears any user-set pen + brush + size for nodeType so the next query returns the compile-time defaults. Emits preferenceChanged for each cleared key.

Here is the call graph for this function:

◆ resetSelectionStyleToDefault()

void PreferencesManager::resetSelectionStyleToDefault ( const QString &  className)

Clears any user-set pen + brush for className so the next query returns the compile-time defaults. Emits preferenceChanged for both keys. Used by Preferences dialog's "Reset to defaults".

Here is the call graph for this function:

◆ saveCustomColorRamp()

void PreferencesManager::saveCustomColorRamp ( const QString &  name,
const RasterColorRamp ramp 
)
Here is the call graph for this function:

◆ scaleBarCompactNotation()

bool PreferencesManager::scaleBarCompactNotation ( ) const

Default false.

Here is the caller graph for this function:

◆ scaleBarFontFamily()

QString PreferencesManager::scaleBarFontFamily ( ) const

Default "sans-serif".

Here is the caller graph for this function:

◆ scaleBarFontSize()

int PreferencesManager::scaleBarFontSize ( ) const

Default 8; range 4–72.

Here is the caller graph for this function:

◆ scaleBarLabelDecimals()

int PreferencesManager::scaleBarLabelDecimals ( ) const

-1=auto, 0=whole, n=n decimals. Default -1.

Here is the caller graph for this function:

◆ scaleBarMaxBarLength()

int PreferencesManager::scaleBarMaxBarLength ( ) const

Default 100; range 20–500.

Here is the caller graph for this function:

◆ scaleBarPenColor()

QColor PreferencesManager::scaleBarPenColor ( ) const
Here is the caller graph for this function:

◆ scaleBarPenStyle()

int PreferencesManager::scaleBarPenStyle ( ) const

Qt::PenStyle as int; default Qt::SolidLine.

Here is the caller graph for this function:

◆ scaleBarPenWidth()

int PreferencesManager::scaleBarPenWidth ( ) const

Default 2; range 1–20.

Here is the caller graph for this function:

◆ scaleBarPosition()

int PreferencesManager::scaleBarPosition ( ) const

ScaleBarSettings::Position as int; default 0 (BottomLeft)

Here is the caller graph for this function:

◆ scaleBarUnits()

int PreferencesManager::scaleBarUnits ( ) const

ScaleBarSettings::Units as int; default 0 (Auto)

Here is the caller graph for this function:

◆ selectionBrush()

QBrush PreferencesManager::selectionBrush ( const QString &  className) const

Selection fill brush for polygonal/glyph classes ("subcatchment", "node", "gage"). Querying for "link" returns Qt::NoBrush since links are stroked, not filled. Stored under SWMMVis/Preferences/Selection/Brush/<Class>.

Here is the caller graph for this function:

◆ selectionColor()

QColor PreferencesManager::selectionColor ( const QString &  className) const

Convenience wrapper around selectionPen(className).color(). Retained for callers that only need the colour.

Here is the call graph for this function:

◆ selectionPen()

QPen PreferencesManager::selectionPen ( const QString &  className) const

Selection highlight pen for features of a given vector class. className is one of "link", "node", "subcatchment", "gage" (case-insensitive); unknown classes return a default yellow pen.

Width semantics for the "link" class are additive over the base link pen: a width of 2.0 means the selected-link halo is 2 px wider than the conduit/pump/etc. pen at the same scale.

Stored under SWMMVis/Preferences/Selection/Pen/<Class>. On first load, legacy SWMMVis/Preferences/Selection/Color/<Class> values are migrated into both a pen (with the saved colour) and a brush (with the saved colour, alpha 180 for polygons / 255 for glyphs) and the legacy key is removed.

Here is the caller graph for this function:

◆ setAnimationSpeed()

void PreferencesManager::setAnimationSpeed ( double  speed)
Here is the call graph for this function:

◆ setAppearanceMode()

void PreferencesManager::setAppearanceMode ( const QString &  mode)
Here is the call graph for this function:

◆ setAutoBuildRasterOverviews()

void PreferencesManager::setAutoBuildRasterOverviews ( bool  enabled)
Here is the call graph for this function:

◆ setAutoLengthEnabled()

void PreferencesManager::setAutoLengthEnabled ( bool  enabled)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setClearSelectionOnMiss()

void PreferencesManager::setClearSelectionOnMiss ( bool  on)
Here is the call graph for this function:

◆ setClickTolerancePx()

void PreferencesManager::setClickTolerancePx ( int  pixels)
Here is the call graph for this function:

◆ setDefaultCrsAuthority()

void PreferencesManager::setDefaultCrsAuthority ( const QString &  authority)
Here is the call graph for this function:

◆ setDefaultCrsCode()

void PreferencesManager::setDefaultCrsCode ( int  code)
Here is the call graph for this function:

◆ setDefaultCrsMode()

void PreferencesManager::setDefaultCrsMode ( const QString &  mode)
Here is the call graph for this function:

◆ setDefaultEngineMode()

void PreferencesManager::setDefaultEngineMode ( const QString &  version)
Here is the call graph for this function:

◆ setDefaultTool()

void PreferencesManager::setDefaultTool ( const QString &  tool)
Here is the call graph for this function:

◆ setDragThresholdPx()

void PreferencesManager::setDragThresholdPx ( int  pixels)
Here is the call graph for this function:

◆ setElementNamePrefix()

void PreferencesManager::setElementNamePrefix ( const QString &  kind,
const QString &  prefix 
)
Here is the call graph for this function:

◆ setLabelLodM11Min()

void PreferencesManager::setLabelLodM11Min ( qreal  m11)
Here is the call graph for this function:

◆ setLinkPen()

void PreferencesManager::setLinkPen ( const QString &  linkType,
const QPen &  pen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLive2DHistoryCap()

void PreferencesManager::setLive2DHistoryCap ( int  frames)
Here is the call graph for this function:

◆ setLive2DHistoryMB()

void PreferencesManager::setLive2DHistoryMB ( int  megabytes)
Here is the call graph for this function:

◆ setLiveResults1DEnabled()

void PreferencesManager::setLiveResults1DEnabled ( bool  on)
Here is the call graph for this function:

◆ setMeasureFillColor()

void PreferencesManager::setMeasureFillColor ( const QColor &  color)
Here is the call graph for this function:

◆ setMeasureFillOpacity()

void PreferencesManager::setMeasureFillOpacity ( int  opacity)
Here is the call graph for this function:

◆ setMeasureLabelDecimals()

void PreferencesManager::setMeasureLabelDecimals ( int  decimals)
Here is the call graph for this function:

◆ setMeasureLabelFontFamily()

void PreferencesManager::setMeasureLabelFontFamily ( const QString &  family)
Here is the call graph for this function:

◆ setMeasureLabelFontSize()

void PreferencesManager::setMeasureLabelFontSize ( int  size)
Here is the call graph for this function:

◆ setMeasureLineColor()

void PreferencesManager::setMeasureLineColor ( const QColor &  color)
Here is the call graph for this function:

◆ setMeshBcColor()

void PreferencesManager::setMeshBcColor ( int  type,
const QColor &  color 
)
Here is the call graph for this function:

◆ setMeshBcColorByType()

void PreferencesManager::setMeshBcColorByType ( bool  on)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMeshBcWidthPx()

void PreferencesManager::setMeshBcWidthPx ( int  type,
double  px 
)
Here is the call graph for this function:

◆ setNodeBrush()

void PreferencesManager::setNodeBrush ( const QString &  nodeType,
const QBrush &  brush 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNodePen()

void PreferencesManager::setNodePen ( const QString &  nodeType,
const QPen &  pen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNodeSize()

void PreferencesManager::setNodeSize ( const QString &  nodeType,
double  sizePx 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setObjectDefaults()

void PreferencesManager::setObjectDefaults ( const ObjectDefaults d,
bool  si 
)
Here is the call graph for this function:

◆ setPlotXAxisFormatMode()

void PreferencesManager::setPlotXAxisFormatMode ( int  mode)
Here is the call graph for this function:

◆ setPlotXAxisPrecision()

void PreferencesManager::setPlotXAxisPrecision ( int  count)
Here is the call graph for this function:

◆ setPlotYAxisFormatMode()

void PreferencesManager::setPlotYAxisFormatMode ( int  mode)
Here is the call graph for this function:

◆ setPlotYAxisPrecision()

void PreferencesManager::setPlotYAxisPrecision ( int  count)
Here is the call graph for this function:

◆ setProfileEndEndpointPen()

void PreferencesManager::setProfileEndEndpointPen ( const QPen &  pen)
Here is the call graph for this function:

◆ setProfileEndpointHaloRadiusPx()

void PreferencesManager::setProfileEndpointHaloRadiusPx ( int  px)
Here is the call graph for this function:

◆ setProfileMaxPaths()

void PreferencesManager::setProfileMaxPaths ( int  n)
Here is the call graph for this function:

◆ setProfileStartEndpointPen()

void PreferencesManager::setProfileStartEndpointPen ( const QPen &  pen)
Here is the call graph for this function:

◆ setProgressTickMs()

void PreferencesManager::setProgressTickMs ( int  ms)
Here is the call graph for this function:

◆ setQsgMeshRenderEnabled()

void PreferencesManager::setQsgMeshRenderEnabled ( bool  enabled)
Here is the call graph for this function:

◆ setQsgRenderEnabled()

void PreferencesManager::setQsgRenderEnabled ( bool  enabled)
Here is the call graph for this function:

◆ setScaleBarCompactNotation()

void PreferencesManager::setScaleBarCompactNotation ( bool  compact)
Here is the call graph for this function:

◆ setScaleBarFontFamily()

void PreferencesManager::setScaleBarFontFamily ( const QString &  family)
Here is the call graph for this function:

◆ setScaleBarFontSize()

void PreferencesManager::setScaleBarFontSize ( int  size)
Here is the call graph for this function:

◆ setScaleBarLabelDecimals()

void PreferencesManager::setScaleBarLabelDecimals ( int  decimals)
Here is the call graph for this function:

◆ setScaleBarMaxBarLength()

void PreferencesManager::setScaleBarMaxBarLength ( int  length)
Here is the call graph for this function:

◆ setScaleBarPenColor()

void PreferencesManager::setScaleBarPenColor ( const QColor &  color)
Here is the call graph for this function:

◆ setScaleBarPenStyle()

void PreferencesManager::setScaleBarPenStyle ( int  style)
Here is the call graph for this function:

◆ setScaleBarPenWidth()

void PreferencesManager::setScaleBarPenWidth ( int  width)
Here is the call graph for this function:

◆ setScaleBarPosition()

void PreferencesManager::setScaleBarPosition ( int  position)
Here is the call graph for this function:

◆ setScaleBarUnits()

void PreferencesManager::setScaleBarUnits ( int  units)
Here is the call graph for this function:

◆ setSelectionBrush()

void PreferencesManager::setSelectionBrush ( const QString &  className,
const QBrush &  brush 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelectionPen()

void PreferencesManager::setSelectionPen ( const QString &  className,
const QPen &  pen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSimulationDefaults()

void PreferencesManager::setSimulationDefaults ( const SimulationDefaults d)
Here is the call graph for this function:

◆ setSnapEnabled()

void PreferencesManager::setSnapEnabled ( bool  enabled)
Here is the call graph for this function:

◆ setSnapTolerancePx()

void PreferencesManager::setSnapTolerancePx ( int  px)
Here is the call graph for this function:

◆ setSnapToVertices()

void PreferencesManager::setSnapToVertices ( bool  enabled)
Here is the call graph for this function:

◆ setTerrainDefaultLinkOffset()

void PreferencesManager::setTerrainDefaultLinkOffset ( double  offset)
Here is the call graph for this function:

◆ setTerrainDefaultNodeOffset()

void PreferencesManager::setTerrainDefaultNodeOffset ( double  offset)
Here is the call graph for this function:

◆ setTwoDDefaults()

void PreferencesManager::setTwoDDefaults ( const TwoDDefaults d)
Here is the call graph for this function:

◆ simulationDefaults()

PreferencesManager::SimulationDefaults PreferencesManager::simulationDefaults ( ) const
Here is the caller graph for this function:

◆ snapEnabled()

bool PreferencesManager::snapEnabled ( ) const

Whether vertex snapping is active for all drawing tools. Default true.

Here is the caller graph for this function:

◆ snapTolerancePx()

int PreferencesManager::snapTolerancePx ( ) const

Snap detection radius in screen pixels. Default 12.

Here is the caller graph for this function:

◆ snapToVertices()

bool PreferencesManager::snapToVertices ( ) const

If true, also snap to link polyline and subcatchment polygon vertices in addition to node/gage centres. Default true.

Here is the caller graph for this function:

◆ terrainDefaultLinkOffset()

double PreferencesManager::terrainDefaultLinkOffset ( ) const

Default link endpoint invert offset used to estimate conduit slope. Default 0.0.

Here is the caller graph for this function:

◆ terrainDefaultNodeOffset()

double PreferencesManager::terrainDefaultNodeOffset ( ) const

Default node invert offset (model vertical units) applied when terrain assistance is active. Negative = invert below ground. Default 0.0.

Here is the caller graph for this function:

◆ twoDDefaults()

PreferencesManager::TwoDDefaults PreferencesManager::twoDDefaults ( ) const

The documentation for this class was generated from the following files: