Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIPropertyScheme< T > Class Template Reference

#include <GUIPropertyScheme.h>

Collaboration diagram for GUIPropertyScheme< T >:
[legend]

Public Member Functions

int addColor (const T &color, const double threshold, const std::string &name="")
bool allowsNegativeValues () const
void clear ()
const RGBColorgetBackgroundColor () const
getColor (const double value) const
const std::vector< T > & getColors () const
GUIIcon getIcon () const
const std::string & getName () const
const std::vector< std::string > & getNames () const
std::string getTagName (std::vector< double >) const
std::string getTagName (std::vector< RGBColor >) const
const std::vector< double > & getThresholds () const
const std::string & getTranslatedName () const
 GUIPropertyScheme (const std::string &name, const std::string &translatedName, const T &baseColor, const std::string &colName="", const bool isFixed=false, double baseValue=0, RGBColor bgColor=RGBColor::WHITE, GUIIcon icon=GUIIcon::EMPTY)
 Constructor.
 GUIPropertyScheme (const std::string &name, const T &baseColor, const std::string &colName="", const bool isFixed=false, double baseValue=0, RGBColor bgColor=RGBColor::WHITE, GUIIcon icon=GUIIcon::EMPTY)
double interpolate (const double &min, const double &max, double weight) const
 specializations for GUIScaleScheme
RGBColor interpolate (const RGBColor &min, const RGBColor &max, double weight) const
 specializations for GUIColorScheme
bool isFixed () const
bool isInterpolated () const
bool operator== (const GUIPropertyScheme &c) const
void removeColor (const int pos)
void save (OutputDevice &dev, const std::string &prefix="") const
void setAllowsNegativeValues (bool value)
void setColor (const int pos, const T &color)
bool setColor (const std::string &name, const T &color)
void setInterpolated (const bool interpolate, double interpolationStart=0.f)
void setThreshold (const int pos, const double threshold)

Private Attributes

bool myAllowNegativeValues
RGBColor myBgColor
std::vector< T > myColors
GUIIcon myIcon
bool myIsFixed
bool myIsInterpolated
std::string myName
std::vector< std::string > myNames
std::vector< double > myThresholds
std::string myTranslatedName

Detailed Description

template<class T>
class GUIPropertyScheme< T >

This class provides a mapping from real values to properties (mainly colors). Each color is stored along with a threshold value. Color values between thresholds are obtained by interpolation

Definition at line 43 of file GUIPropertyScheme.h.

Constructor & Destructor Documentation

◆ GUIPropertyScheme() [1/2]

template<class T>
GUIPropertyScheme< T >::GUIPropertyScheme ( const std::string & name,
const std::string & translatedName,
const T & baseColor,
const std::string & colName = "",
const bool isFixed = false,
double baseValue = 0,
RGBColor bgColor = RGBColor::WHITE,
GUIIcon icon = GUIIcon::EMPTY )
inline

Constructor.

Definition at line 46 of file GUIPropertyScheme.h.

◆ GUIPropertyScheme() [2/2]

template<class T>
GUIPropertyScheme< T >::GUIPropertyScheme ( const std::string & name,
const T & baseColor,
const std::string & colName = "",
const bool isFixed = false,
double baseValue = 0,
RGBColor bgColor = RGBColor::WHITE,
GUIIcon icon = GUIIcon::EMPTY )
inline

Definition at line 60 of file GUIPropertyScheme.h.

Member Function Documentation

◆ addColor()

template<class T>
int GUIPropertyScheme< T >::addColor ( const T & color,
const double threshold,
const std::string & name = "" )
inline

◆ allowsNegativeValues()

template<class T>
bool GUIPropertyScheme< T >::allowsNegativeValues ( ) const
inline

Definition at line 179 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().

Here is the caller graph for this function:

◆ clear()

template<class T>
void GUIPropertyScheme< T >::clear ( )
inline

Definition at line 118 of file GUIPropertyScheme.h.

Referenced by GNEViewNet::buildColorRainbow(), GUIViewTraffic::buildColorRainbow(), GUISUMOAbstractView::buildMinMaxRainbow(), and GUIOverheadWire::drawGL().

Here is the caller graph for this function:

◆ getBackgroundColor()

template<class T>
const RGBColor & GUIPropertyScheme< T >::getBackgroundColor ( ) const
inline

Definition at line 191 of file GUIPropertyScheme.h.

◆ getColor()

◆ getColors()

template<class T>
const std::vector< T > & GUIPropertyScheme< T >::getColors ( ) const
inline

Definition at line 159 of file GUIPropertyScheme.h.

Referenced by GUISUMOAbstractView::displayColorLegend(), GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().

Here is the caller graph for this function:

◆ getIcon()

template<class T>
GUIIcon GUIPropertyScheme< T >::getIcon ( ) const
inline

Definition at line 187 of file GUIPropertyScheme.h.

◆ getName()

template<class T>
const std::string & GUIPropertyScheme< T >::getName ( ) const
inline

Definition at line 151 of file GUIPropertyScheme.h.

Referenced by GNEViewNet::buildColorRainbow(), GUIViewTraffic::buildColorRainbow(), GUISUMOAbstractView::buildMinMaxRainbow(), GUISUMOAbstractView::displayColorLegend(), GUIDialog_ViewSettings::onCmdColorChange(), GNEEdgeData::setColor(), and GNEEdgeRelData::setColor().

Here is the caller graph for this function:

◆ getNames()

template<class T>
const std::vector< std::string > & GUIPropertyScheme< T >::getNames ( ) const
inline

Definition at line 171 of file GUIPropertyScheme.h.

Referenced by GUISUMOAbstractView::displayColorLegend(), GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().

Here is the caller graph for this function:

◆ getTagName() [1/2]

template<class T>
std::string GUIPropertyScheme< T >::getTagName ( std::vector< double > ) const
inline

Definition at line 250 of file GUIPropertyScheme.h.

◆ getTagName() [2/2]

template<class T>
std::string GUIPropertyScheme< T >::getTagName ( std::vector< RGBColor > ) const
inline

Definition at line 240 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::save().

Here is the caller graph for this function:

◆ getThresholds()

template<class T>
const std::vector< double > & GUIPropertyScheme< T >::getThresholds ( ) const
inline

Definition at line 163 of file GUIPropertyScheme.h.

Referenced by GUISUMOAbstractView::displayColorLegend(), GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().

Here is the caller graph for this function:

◆ getTranslatedName()

template<class T>
const std::string & GUIPropertyScheme< T >::getTranslatedName ( ) const
inline

Definition at line 155 of file GUIPropertyScheme.h.

◆ interpolate() [1/2]

template<class T>
double GUIPropertyScheme< T >::interpolate ( const double & min,
const double & max,
double weight ) const
inline

specializations for GUIScaleScheme

Definition at line 246 of file GUIPropertyScheme.h.

◆ interpolate() [2/2]

template<class T>
RGBColor GUIPropertyScheme< T >::interpolate ( const RGBColor & min,
const RGBColor & max,
double weight ) const
inline

specializations for GUIColorScheme

Definition at line 236 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::getColor().

Here is the caller graph for this function:

◆ isFixed()

template<class T>
bool GUIPropertyScheme< T >::isFixed ( ) const
inline

Definition at line 175 of file GUIPropertyScheme.h.

Referenced by GNEViewNet::buildColorRainbow(), GUIViewTraffic::buildColorRainbow(), GUISUMOAbstractView::displayColorLegend(), GUIDialog_ViewSettings::rebuildColorMatrix(), GUIDialog_ViewSettings::rebuildScaleMatrix(), GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().

Here is the caller graph for this function:

◆ isInterpolated()

template<class T>
bool GUIPropertyScheme< T >::isInterpolated ( ) const
inline

Definition at line 167 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().

Here is the caller graph for this function:

◆ operator==()

template<class T>
bool GUIPropertyScheme< T >::operator== ( const GUIPropertyScheme< T > & c) const
inline

Definition at line 230 of file GUIPropertyScheme.h.

◆ removeColor()

template<class T>
void GUIPropertyScheme< T >::removeColor ( const int pos)
inline

Definition at line 111 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().

Here is the caller graph for this function:

◆ save()

template<class T>
void GUIPropertyScheme< T >::save ( OutputDevice & dev,
const std::string & prefix = "" ) const
inline

Definition at line 195 of file GUIPropertyScheme.h.

◆ setAllowsNegativeValues()

template<class T>
void GUIPropertyScheme< T >::setAllowsNegativeValues ( bool value)
inline

Definition at line 183 of file GUIPropertyScheme.h.

Referenced by GUIVisualizationSettings::initNeteditDefaults(), and GUIVisualizationSettings::initSumoGuiDefaults().

Here is the caller graph for this function:

◆ setColor() [1/2]

template<class T>
void GUIPropertyScheme< T >::setColor ( const int pos,
const T & color )
inline

Definition at line 78 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().

Here is the caller graph for this function:

◆ setColor() [2/2]

template<class T>
bool GUIPropertyScheme< T >::setColor ( const std::string & name,
const T & color )
inline

Definition at line 82 of file GUIPropertyScheme.h.

◆ setInterpolated()

template<class T>
void GUIPropertyScheme< T >::setInterpolated ( const bool interpolate,
double interpolationStart = 0.f )
inline

Definition at line 144 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::onCmdColorChange().

Here is the caller graph for this function:

◆ setThreshold()

template<class T>
void GUIPropertyScheme< T >::setThreshold ( const int pos,
const double threshold )
inline

Definition at line 74 of file GUIPropertyScheme.h.

Referenced by GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().

Here is the caller graph for this function:

Field Documentation

◆ myAllowNegativeValues

template<class T>
bool GUIPropertyScheme< T >::myAllowNegativeValues
private

Definition at line 263 of file GUIPropertyScheme.h.

◆ myBgColor

template<class T>
RGBColor GUIPropertyScheme< T >::myBgColor
private

Definition at line 265 of file GUIPropertyScheme.h.

◆ myColors

template<class T>
std::vector<T> GUIPropertyScheme< T >::myColors
private

Definition at line 258 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::operator==().

◆ myIcon

template<class T>
GUIIcon GUIPropertyScheme< T >::myIcon
private

Definition at line 264 of file GUIPropertyScheme.h.

◆ myIsFixed

template<class T>
bool GUIPropertyScheme< T >::myIsFixed
private

Definition at line 262 of file GUIPropertyScheme.h.

◆ myIsInterpolated

template<class T>
bool GUIPropertyScheme< T >::myIsInterpolated
private

Definition at line 260 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::operator==().

◆ myName

template<class T>
std::string GUIPropertyScheme< T >::myName
private

Definition at line 256 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::operator==().

◆ myNames

template<class T>
std::vector<std::string> GUIPropertyScheme< T >::myNames
private

Definition at line 261 of file GUIPropertyScheme.h.

◆ myThresholds

template<class T>
std::vector<double> GUIPropertyScheme< T >::myThresholds
private

Definition at line 259 of file GUIPropertyScheme.h.

Referenced by GUIPropertyScheme< RGBColor >::operator==().

◆ myTranslatedName

template<class T>
std::string GUIPropertyScheme< T >::myTranslatedName
private

Definition at line 257 of file GUIPropertyScheme.h.


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