SUMO - Simulation of Urban MObility
|
#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. | |
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< RGBColor > | myColors |
bool | myIsFixed |
bool | myIsInterpolated |
std::string | myName |
std::vector< std::string > | myNames |
std::vector< SUMOReal > | myThresholds |
Definition at line 47 of file GUIColorScheme.h.
GUIColorScheme::GUIColorScheme | ( | const std::string & | name, |
const RGBColor & | baseColor, | ||
const std::string & | colName = "" , |
||
const bool | isFixed = false |
||
) | [inline] |
unsigned int GUIColorScheme::addColor | ( | const RGBColor & | color, |
const SUMOReal | threshold, | ||
const std::string & | name = "" |
||
) | [inline] |
Definition at line 76 of file GUIColorScheme.h.
References myColors, myNames, and myThresholds.
Referenced by GUIColorScheme(), GUIVisualizationSettings::GUIVisualizationSettings(), GUISettingsHandler::myStartElement(), and GUIDialog_ViewSettings::onCmdColorChange().
bool GUIColorScheme::allowsNegativeValues | ( | ) | const [inline] |
Definition at line 157 of file GUIColorScheme.h.
References myAllowNegativeValues.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrices().
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] |
Definition at line 106 of file GUIColorScheme.h.
References RGBColor::interpolate(), myColors, myIsInterpolated, myThresholds, and SUMOReal.
Referenced by GUILaneWrapper::setColor(), and GUIVehicle::setColor().
const std::vector<RGBColor>& GUIColorScheme::getColors | ( | ) | const [inline] |
Definition at line 137 of file GUIColorScheme.h.
References myColors.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrices().
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::rebuildColorMatrices().
const std::vector<SUMOReal>& GUIColorScheme::getThresholds | ( | ) | const [inline] |
Definition at line 141 of file GUIColorScheme.h.
References myThresholds.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrices().
bool GUIColorScheme::isFixed | ( | ) | const [inline] |
Definition at line 153 of file GUIColorScheme.h.
References myIsFixed.
Referenced by GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::onCmdColorChange(), and GUIDialog_ViewSettings::rebuildColorMatrices().
bool GUIColorScheme::isInterpolated | ( | ) | const [inline] |
Definition at line 145 of file GUIColorScheme.h.
References myIsInterpolated.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrices().
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::onCmdColorChange().
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] |
Definition at line 161 of file GUIColorScheme.h.
References myAllowNegativeValues.
Referenced by GUIVisualizationSettings::GUIVisualizationSettings().
void GUIColorScheme::setColor | ( | const size_t | pos, |
const RGBColor & | color | ||
) | [inline] |
Definition at line 60 of file GUIColorScheme.h.
References myColors.
Referenced by GUISettingsHandler::myStartElement(), and GUIDialog_ViewSettings::onCmdColorChange().
bool GUIColorScheme::setColor | ( | const std::string & | name, |
const RGBColor & | color | ||
) | [inline] |
Definition at line 64 of file GUIColorScheme.h.
void GUIColorScheme::setInterpolated | ( | const bool | interpolate, |
SUMOReal | interpolationStart = 0.f |
||
) | [inline] |
Definition at line 126 of file GUIColorScheme.h.
References myIsInterpolated, and myThresholds.
Referenced by GUISettingsHandler::myStartElement(), and GUIDialog_ViewSettings::onCmdColorChange().
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::onCmdColorChange().
bool GUIColorScheme::myAllowNegativeValues [private] |
Definition at line 201 of file GUIColorScheme.h.
Referenced by allowsNegativeValues(), and setAllowsNegativeValues().
std::vector<RGBColor> GUIColorScheme::myColors [private] |
Definition at line 196 of file GUIColorScheme.h.
Referenced by addColor(), clear(), getColor(), getColors(), operator==(), removeColor(), save(), and setColor().
bool GUIColorScheme::myIsFixed [private] |
Definition at line 200 of file GUIColorScheme.h.
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] |
Definition at line 197 of file GUIColorScheme.h.
Referenced by addColor(), clear(), getColor(), getThresholds(), operator==(), removeColor(), save(), setInterpolated(), and setThreshold().