SUMO - Simulation of Urban MObility
GUIColorScheme Class Reference

#include <GUIColorScheme.h>

Public Member Functions

unsigned int addColor (const RGBColor &color, const SUMOReal threshold, const std::string &name="")
 
bool allowsNegativeValues () const
 
void clear ()
 
const RGBColor getColor (const SUMOReal value) const
 
const std::vector< RGBColor > & getColors () const
 
const std::string & getName () const
 
const std::vector< std::string > & getNames () const
 
const std::vector< SUMOReal > & getThresholds () const
 
 GUIColorScheme (const std::string &name, const RGBColor &baseColor, const std::string &colName="", const bool isFixed=false)
 Constructor. More...
 
bool isFixed () const
 
bool isInterpolated () const
 
bool operator== (const GUIColorScheme &c) const
 
void removeColor (const size_t pos)
 
void save (OutputDevice &dev) const
 
void setAllowsNegativeValues (bool value)
 
void setColor (const size_t pos, const RGBColor &color)
 
bool setColor (const std::string &name, const RGBColor &color)
 
void setInterpolated (const bool interpolate, SUMOReal interpolationStart=0.f)
 
void setThreshold (const size_t pos, const SUMOReal threshold)
 

Private Attributes

bool myAllowNegativeValues
 
std::vector< RGBColormyColors
 
bool myIsFixed
 
bool myIsInterpolated
 
std::string myName
 
std::vector< std::string > myNames
 
std::vector< SUMORealmyThresholds
 

Detailed Description

Definition at line 47 of file GUIColorScheme.h.

Constructor & Destructor Documentation

GUIColorScheme::GUIColorScheme ( const std::string &  name,
const RGBColor baseColor,
const std::string &  colName = "",
const bool  isFixed = false 
)
inline

Constructor.

Definition at line 50 of file GUIColorScheme.h.

References addColor().

Member Function Documentation

unsigned int GUIColorScheme::addColor ( const RGBColor color,
const SUMOReal  threshold,
const std::string &  name = "" 
)
inline
bool GUIColorScheme::allowsNegativeValues ( ) const
inline

Definition at line 157 of file GUIColorScheme.h.

References myAllowNegativeValues.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix().

void GUIColorScheme::clear ( )
inline

Definition at line 100 of file GUIColorScheme.h.

References myColors, myNames, and myThresholds.

Referenced by GUISettingsHandler::myStartElement().

const RGBColor GUIColorScheme::getColor ( const SUMOReal  value) const
inline
const std::vector<RGBColor>& GUIColorScheme::getColors ( ) const
inline

Definition at line 137 of file GUIColorScheme.h.

References myColors.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix().

const std::string& GUIColorScheme::getName ( ) const
inline

Definition at line 133 of file GUIColorScheme.h.

References myName.

const std::vector<std::string>& GUIColorScheme::getNames ( ) const
inline

Definition at line 149 of file GUIColorScheme.h.

References myNames.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix().

const std::vector<SUMOReal>& GUIColorScheme::getThresholds ( ) const
inline

Definition at line 141 of file GUIColorScheme.h.

References myThresholds.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix().

bool GUIColorScheme::isFixed ( ) const
inline
bool GUIColorScheme::isInterpolated ( ) const
inline

Definition at line 145 of file GUIColorScheme.h.

References myIsInterpolated.

Referenced by GUIDialog_ViewSettings::rebuildColorMatrix().

bool GUIColorScheme::operator== ( const GUIColorScheme c) const
inline

Definition at line 190 of file GUIColorScheme.h.

References myColors, myIsInterpolated, myName, and myThresholds.

void GUIColorScheme::removeColor ( const size_t  pos)
inline

Definition at line 93 of file GUIColorScheme.h.

References myColors, myNames, and myThresholds.

Referenced by GUIDialog_ViewSettings::updateColorRanges().

void GUIColorScheme::save ( OutputDevice dev) const
inline

Definition at line 165 of file GUIColorScheme.h.

References myColors, myIsFixed, myIsInterpolated, myName, myNames, and myThresholds.

void GUIColorScheme::setAllowsNegativeValues ( bool  value)
inline
void GUIColorScheme::setColor ( const size_t  pos,
const RGBColor color 
)
inline
bool GUIColorScheme::setColor ( const std::string &  name,
const RGBColor color 
)
inline

Definition at line 64 of file GUIColorScheme.h.

References myColors, and myNames.

void GUIColorScheme::setInterpolated ( const bool  interpolate,
SUMOReal  interpolationStart = 0.f 
)
inline
void GUIColorScheme::setThreshold ( const size_t  pos,
const SUMOReal  threshold 
)
inline

Definition at line 56 of file GUIColorScheme.h.

References myThresholds.

Referenced by GUIDialog_ViewSettings::updateColorRanges().

Field Documentation

bool GUIColorScheme::myAllowNegativeValues
private

Definition at line 201 of file GUIColorScheme.h.

Referenced by allowsNegativeValues(), and setAllowsNegativeValues().

std::vector<RGBColor> GUIColorScheme::myColors
private
bool GUIColorScheme::myIsFixed
private

Definition at line 200 of file GUIColorScheme.h.

Referenced by isFixed(), and save().

bool GUIColorScheme::myIsInterpolated
private

Definition at line 198 of file GUIColorScheme.h.

Referenced by getColor(), isInterpolated(), operator==(), save(), and setInterpolated().

std::string GUIColorScheme::myName
private

Definition at line 195 of file GUIColorScheme.h.

Referenced by getName(), operator==(), and save().

std::vector<std::string> GUIColorScheme::myNames
private

Definition at line 199 of file GUIColorScheme.h.

Referenced by addColor(), clear(), getNames(), removeColor(), save(), and setColor().

std::vector<SUMOReal> GUIColorScheme::myThresholds
private

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