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

Per-series rendering style for chart plots (comprehensive schema). More...

#include "plot/numberformat.h"
#include <QColor>
#include <QFont>
#include <QJsonObject>
#include <QPen>
#include <QString>
#include <Qt>
Include dependency graph for seriesstyle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmmvis::plot::SeriesStyle
 Aggregated rendering parameters for one chart series. More...
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::plot
 

Enumerations

enum class  openswmmvis::plot::MarkerShape {
  openswmmvis::plot::Circle ,
  openswmmvis::plot::Square ,
  openswmmvis::plot::Triangle ,
  openswmmvis::plot::Diamond ,
  openswmmvis::plot::Cross ,
  openswmmvis::plot::Plus
}
 Marker shape used when SeriesStyle::showMarkers == true. More...
 

Functions

SeriesStyle openswmmvis::plot::defaultStyleForCycle (int cycleIndex)
 Returns a default styled cycle position — the 12-color cycle used when new series are added without an explicit style. Wraps modulo 12.
 
QString openswmmvis::plot::markerShapeToString (MarkerShape s)
 String key for MarkerShape ↔ JSON.
 
MarkerShape openswmmvis::plot::markerShapeFromString (const QString &s)
 
QString openswmmvis::plot::penStyleToString (Qt::PenStyle s)
 String key for Qt::PenStyle (Solid / Dash / Dot / DashDot / DashDotDot).
 
Qt::PenStyle openswmmvis::plot::penStyleFromString (const QString &s)
 
QString openswmmvis::plot::penCapStyleToString (Qt::PenCapStyle s)
 String keys for Qt::PenCapStyle and Qt::PenJoinStyle (JSON round-trip).
 
Qt::PenCapStyle openswmmvis::plot::penCapStyleFromString (const QString &s)
 
QString openswmmvis::plot::penJoinStyleToString (Qt::PenJoinStyle s)
 
Qt::PenJoinStyle openswmmvis::plot::penJoinStyleFromString (const QString &s)
 
QPen openswmmvis::plot::penForStyle (const SeriesStyle &style)
 Build a QPen from the line-related fields of style. Width / cap / join / dash all wired up; colour with alpha from opacity.
 
void openswmmvis::plot::applySeriesStyle (const SeriesStyle &style, QXYSeries *series, QScatterSeries *markerOverlay=nullptr)
 Apply every field of style to series.
 

Detailed Description

Per-series rendering style for chart plots (comprehensive schema).

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 SeriesStyle describes everything the chart needs to render a single line on a QChart: pen (colour / width / dash / cap / join), marker (visible / shape / size / fill / border), point labels (visible / font / colour / precision), area fill (visible / colour), opacity, and a user-editable legend name.

Styles round-trip through QJsonObject so per-series tweaks persist across sessions. Invalid QColors for the marker-border, marker-fill, point-label, and area-fill colours mean "derive from the main series colour" — callers should fall back via effectiveMarkerFillColor() and friends rather than treating those as transparent.