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

Identity-based color palette for visually-distinct categories. More...

#include <QColor>
#include <QList>
#include <QString>
#include <QStringList>
Include dependency graph for categoricalpalette.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CategoricalPalette
 

Functions

QColor CategoricalPalette::at (int index)
 Returns the i-th color from the default categorical palette.
 
int CategoricalPalette::size ()
 Number of colors in one full cycle before the palette wraps.
 
QList< QColor > CategoricalPalette::palette ()
 Returns the full palette as an ordered list.
 
QList< QColor > CategoricalPalette::byName (const QString &name)
 Returns the named palette as an ordered list. Falls back to the default (Tab10) when name doesn't match any built-in.
 
QStringList CategoricalPalette::builtinNames ()
 Names of all built-in palettes, in catalogue order. Used by the Categorized tab's m_catScheme combo to populate its dropdown.
 

Detailed Description

Identity-based color palette for visually-distinct categories.

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
    Used wherever multiple unordered items need to be drawn at once
    in colors a reader can quickly tell apart — multi-path highlights
    in the profile-path picker, multi-source line series in the profile
    plot, and similar.  This is structurally different from
    RasterColorRamp, which maps a numeric value onto a gradient: here
    the index has no ordinal meaning.