 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
53 std::string name = scheme.
name;
98 const std::vector<std::string>&
114 vs.
name =
"standard";
120 vs.
name =
"faster standard";
130 vs.
name =
"real world";
154 vs.
name =
"selection";
167 int noSaved = app->reg().readIntEntry(
"VisualizationSettings",
"settingNo", 0);
168 for (
int i = 0; i < noSaved; ++i) {
169 std::string name =
"visset#" +
toString(i);
170 std::string setting = app->reg().readStringEntry(
"VisualizationSettings", name.c_str(),
"");
175 app->reg().readStringEntry(
"VisualizationSettings", name.c_str(),
"");
178 int xmlSize = app->reg().readIntEntry(name.c_str(),
"xmlSize", 0);
179 std::string content =
"";
181 while (xmlSize > 0) {
182 std::string part = app->reg().readStringEntry(name.c_str(), (
"xml" +
toString(index)).c_str(),
"");
187 xmlSize -= (int) part.size();
190 if (content !=
"" && xmlSize == 0) {
205 const std::vector<std::string>& names =
getNames();
206 app->reg().writeIntEntry(
"VisualizationSettings",
"settingNo", (FXint) names.size() -
myNumInitialSettings);
208 for (std::vector<std::string>::const_iterator i = names.begin() +
myNumInitialSettings; i != names.end(); ++i, ++gidx) {
210 std::string sname =
"visset#" +
toString(gidx);
212 app->reg().writeStringEntry(
"VisualizationSettings", sname.c_str(), item.
name.c_str());
216 app->reg().writeIntEntry(sname.c_str(),
"xmlSize", (FXint)(content.size()));
217 const unsigned maxSize = 1500;
218 for (
int i = 0; i < (int)content.size(); i += maxSize) {
219 const std::string b = content.substr(i, maxSize);
220 app->reg().writeStringEntry(sname.c_str(), (
"xml" +
toString(i / maxSize)).c_str(), b.c_str());
std::string myDefaultSettingName
Name of the default setting.
std::string name
The name of this setting.
GUIColorer edgeColorer
The mesoscopic edge colorer.
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
bool hideConnectors
flag to show or hidde connectors
GUIVisualizationSettings & getDefault()
Returns the default scheme.
bool laneShowBorders
Information whether lane borders shall be drawn.
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
GUIVisualizationSizeSettings junctionSize
An output device that encapsulates an ofstream.
void setSchemeByName(std::string name)
void remove(const std::string &name)
Removes the setting with the given name.
double z() const
Returns the z-position.
GUICompleteSchemeStorage()
Constructor.
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
Position myLookFrom
The default viewport.
int myNumInitialSettings
The number of settings which were present at startup.
GUIColorer personColorer
The person colorer.
GUIVisualizationSizeSettings vehicleSize
bool showRails
Information whether rails shall be drawn.
GUIColorer vehicleColorer
The vehicle colorer.
GUIColorer polyColorer
The polygon colorer.
std::string getString() const
Returns the current content as a string.
GUIColorer junctionColorer
The junction colorer.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
RGBColor backgroundColor
The background color to use.
void save(OutputDevice &dev) const
Writes the settings into an output device.
int getNumInitialSettings() const
Returns the number of initial settings.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
void set(double x, double y)
set positions x and y
static const std::string SCHEME_NAME_SELECTION
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
int vehicleQuality
The quality of vehicle drawing.
bool showSublanes
Whether to show sublane boundaries.
A point in 2D or 3D with translation and scaling methods.
int containerQuality
The quality of container drawing.
GUICompleteSchemeStorage gSchemeStorage
double x() const
Returns the x-position.
An XML-handler for visualisation schemes.
void setDefault(const std::string &name)
Makes the scheme with the given name the default.
Storage for available visualization settings.
~GUICompleteSchemeStorage()
Destructor.
double minSize
The minimum size to draw this object.
static const std::string SCHEME_NAME_TYPE
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double y() const
Returns the y-position.
bool showLaneDirection
Whether to show direction indicators for lanes.
void saveViewport(const double x, const double y, const double z, const double rot)
Makes the given viewport the default.
int personQuality
The quality of person drawing.
GUIColorer laneColorer
The lane colorer.
GUIColorer containerColorer
The container colorer.
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
void init(FXApp *app, bool netedit=false)
Initialises the storage with some default settings.
virtual void recenterView()
recenters the view
GUIColorer poiColorer
The POI colorer.
Stores the information about how to visualize structures.
std::map< std::string, GUIVisualizationSettings > mySettings
A map of settings referenced by their names.
void setViewport(GUISUMOAbstractView *view)
Sets the default viewport.
std::vector< std::string > mySortedSchemeNames
List of known setting names.
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.