 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
73 FXIMPLEMENT(
GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
81 myParent(parent), mySettings(settings),
82 myDecals(decals), myDecalsLock(decalsLock),
83 myDecalsTable(
nullptr) {
84 myBackup = (*mySettings);
92 for (std::vector<std::string>::const_iterator i = names.begin(); i != names.end(); ++i) {
93 int index = mySchemeName->appendItem((*i).c_str());
94 if ((*i) == mySettings->name) {
95 mySchemeName->setCurrentItem((FXint) index);
98 mySchemeName->setNumVisible(5);
105 new FXVerticalSeparator(frame0);
107 mySaveViewPort =
new FXCheckButton(frame0,
"Viewport");
108 mySaveDelay =
new FXCheckButton(frame0,
"Delay");
109 mySaveDecals =
new FXCheckButton(frame0,
"Decals");
110 mySaveBreakpoints =
new FXCheckButton(frame0,
"Breakpoints");
111 if (settings->netedit) {
112 mySaveBreakpoints->disable();
120 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
130 new FXLabel(frame11,
"Decals:");
131 myDecalsFrame =
new FXVerticalFrame(frame11);
140 myShowGrid->setCheck(mySettings->showGrid);
141 new FXLabel(m12,
"");
145 myGridXSizeDialer->setRange(1, 10000);
146 myGridXSizeDialer->setValue(mySettings->gridXSize);
150 myGridYSizeDialer->setRange(1, 10000);
151 myGridYSizeDialer->setValue(mySettings->gridXSize);
156 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
166 myParamKey->disable();
167 myParamKey->setEditable(
true);
172 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
186 mySettings->edgeColorer.fill(*myLaneEdgeColorMode);
187 mySettings->edgeScaler.fill(*myLaneEdgeScaleMode);
188 myLaneEdgeColorMode->setNumVisible((
int)mySettings->edgeColorer.size());
189 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->edgeScaler.size());
191 mySettings->laneColorer.fill(*myLaneEdgeColorMode);
192 mySettings->laneScaler.fill(*myLaneEdgeScaleMode);
193 myLaneEdgeColorMode->setNumVisible((
int)mySettings->laneColorer.size());
194 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->laneScaler.size());
200 myShowLaneBorders->setCheck(mySettings->laneShowBorders);
202 myShowBikeMarkings->setCheck(mySettings->showBikeMarkings);
204 myShowLaneDecals->setCheck(mySettings->showLinkDecals);
207 myShowLinkRules->setCheck(mySettings->showLinkRules);
210 myShowRails->setCheck(mySettings->showRails);
213 myHideMacroConnectors->setCheck(mySettings->hideConnectors);
216 myShowLaneDirection->setCheck(mySettings->showLaneDirection);
219 myShowSublanes->setCheck(mySettings->showSublanes);
220 mySpreadSuperposed =
new FXCheckButton(m22,
"Spread bidirectional railway\t\tMake both directional edges for a bidirectional railway visible",
this,
MID_SIMPLE_VIEW_COLORCHANGE);
221 mySpreadSuperposed->setCheck(mySettings->spreadSuperposed);
224 myLaneWidthUpscaleDialer->setRange(0, 10000);
225 myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration);
229 myLaneMinWidthDialer->setRange(0, 10000);
230 myLaneMinWidthDialer->setValue(mySettings->laneMinSize);
233 myEdgeNamePanel =
new NamePanel(m22,
this,
"Show edge name", mySettings->edgeName);
234 myStreetNamePanel =
new NamePanel(m22,
this,
"Show street name", mySettings->streetName);
235 myEdgeValuePanel =
new NamePanel(m22,
this,
"Show edge color value", mySettings->edgeValue);
240 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
246 myVehicleShapeDetail->appendItem(
"'triangles'");
247 myVehicleShapeDetail->appendItem(
"'boxes'");
248 myVehicleShapeDetail->appendItem(
"'simple shapes'");
249 myVehicleShapeDetail->appendItem(
"'raster images'");
250 myVehicleShapeDetail->setNumVisible(4);
251 myVehicleShapeDetail->setCurrentItem(settings->vehicleQuality);
258 mySettings->vehicleColorer.fill(*myVehicleColorMode);
259 myVehicleColorMode->setNumVisible((
int)mySettings->vehicleColorer.size());
262 myVehicleParamKey->setEditable(
true);
263 myVehicleParamKey->disable();
270 myVehicleNamePanel =
new NamePanel(m35,
this,
"Show vehicle name", mySettings->vehicleName);
271 myVehicleValuePanel =
new NamePanel(m35,
this,
"Show vehicle color value", mySettings->vehicleValue);
272 myVehicleTextPanel =
new NamePanel(m35,
this,
"Show vehicle text param", mySettings->vehicleText);
274 myVehicleTextParamKey->setEditable(
true);
280 myShowBlinker->setCheck(mySettings->showBlinker);
282 myShowMinGap->setCheck(mySettings->drawMinGap);
284 myShowBrakeGap->setCheck(mySettings->drawBrakeGap);
286 myShowBTRange->setCheck(mySettings->showBTRange);
288 myShowRouteIndex->setCheck(mySettings->showRouteIndex);
298 myVehicleSizePanel =
new SizePanel(m34,
this, mySettings->vehicleSize);
304 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
310 myPersonShapeDetail->appendItem(
"'triangles'");
311 myPersonShapeDetail->appendItem(
"'circles'");
312 myPersonShapeDetail->appendItem(
"'simple shapes'");
313 myPersonShapeDetail->appendItem(
"'raster images'");
314 myPersonShapeDetail->setNumVisible(4);
315 myPersonShapeDetail->setCurrentItem(settings->personQuality);
322 mySettings->personColorer.fill(*myPersonColorMode);
323 myPersonColorMode->setNumVisible(10);
331 myPersonNamePanel =
new NamePanel(m103,
this,
"Show person name", mySettings->personName);
332 myPersonValuePanel =
new NamePanel(m103,
this,
"Show person color value", mySettings->personValue);
337 myPersonSizePanel =
new SizePanel(m104,
this, mySettings->personSize);
342 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
348 myContainerShapeDetail->appendItem(
"'triangles'");
349 myContainerShapeDetail->appendItem(
"'boxes'");
350 myContainerShapeDetail->appendItem(
"'simple shapes'");
351 myContainerShapeDetail->appendItem(
"'raster images'");
352 myContainerShapeDetail->setNumVisible(4);
353 myContainerShapeDetail->setCurrentItem(settings->containerQuality);
360 mySettings->containerColorer.fill(*myContainerColorMode);
361 myContainerColorMode->setNumVisible(9);
369 myContainerNamePanel =
new NamePanel(m103,
this,
"Show container name", mySettings->containerName);
374 myContainerSizePanel =
new SizePanel(m104,
this, mySettings->containerSize);
379 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
384 mySettings->junctionColorer.fill(*myJunctionColorMode);
385 myJunctionColorMode->setNumVisible(4);
390 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
394 myJunctionSizePanel =
new SizePanel(m42,
this, mySettings->junctionSize);
396 myDrawJunctionShape->setCheck(mySettings->drawJunctionShape);
398 myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas);
400 myShowLane2Lane->setCheck(mySettings->showLane2Lane);
403 myTLIndexPanel =
new NamePanel(m42,
this,
"Show link tls index", mySettings->drawLinkTLIndex);
404 myJunctionIndexPanel =
new NamePanel(m42,
this,
"Show link junction index", mySettings->drawLinkJunctionIndex);
405 myJunctionNamePanel =
new NamePanel(m42,
this,
"Show junction name", mySettings->junctionName);
406 myInternalJunctionNamePanel =
new NamePanel(m42,
this,
"Show internal junction name", mySettings->internalJunctionName);
407 myInternalEdgeNamePanel =
new NamePanel(m42,
this,
"Show internal edge name", mySettings->internalEdgeName);
408 myCwaEdgeNamePanel =
new NamePanel(m42,
this,
"Show crossing and walkingarea name", mySettings->cwaEdgeName);
409 myTLSPhaseIndexPanel =
new NamePanel(m42,
this,
"Show traffic light phase", mySettings->tlsPhaseIndex);
414 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
418 myAddNamePanel =
new NamePanel(m51,
this,
"Show object name", mySettings->addName);
419 myAddFullNamePanel =
new NamePanel(m51,
this,
"Show full name", mySettings->addFullName);
423 myAddSizePanel =
new SizePanel(m52,
this, mySettings->addSize);
433 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
439 mySettings->poiColorer.fill(*myPOIColorMode);
440 myPOIColorMode->setNumVisible(3);
447 myPOINamePanel =
new NamePanel(m61,
this,
"Show poi names", mySettings->poiName);
448 myPOITypePanel =
new NamePanel(m61,
this,
"Show poi types", mySettings->poiType);
452 myPOISizePanel =
new SizePanel(m62,
this, mySettings->poiSize);
458 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
464 mySettings->polyColorer.fill(*myPolyColorMode);
465 myPolyColorMode->setNumVisible(3);
472 myPolyNamePanel =
new NamePanel(m91,
this,
"Show polygon name", mySettings->polyName);
473 myPolyTypePanel =
new NamePanel(m91,
this,
"Show polygon types", mySettings->polyType);
476 myPolySizePanel =
new SizePanel(m91,
this, mySettings->polySize);
478 if (settings->netedit) {
481 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
514 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
519 myShowSizeLegend->setCheck(mySettings->showSizeLegend);
520 new FXLabel(m72,
"");
522 myShowColorLegend->setCheck(mySettings->showColorLegend);
523 new FXLabel(m72,
"");
528 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
533 myDither->setCheck(mySettings->dither);
536 myFPS->setCheck(mySettings->fps);
539 myDrawBoundaries->setCheck(mySettings->drawBoundaries);
542 myForceDrawForPositionSelection->setCheck(mySettings->forceDrawForPositionSelection);
544 myForceDrawForRectangleSelection =
new FXCheckButton(m86,
"Force draw for rectangle selection",
this,
MID_SIMPLE_VIEW_COLORCHANGE);
545 myForceDrawForRectangleSelection->setCheck(mySettings->forceDrawForRectangleSelection);
552 rebuildColorMatrices(
false);
627 if (data !=
nullptr) {
628 FXString dataS = (
char*) data;
631 for (
int i = 0; i <
mySchemeName->getNumItems() - 1; ++i) {
742 std::vector<FXColorWell*>::const_iterator colEnd,
743 std::vector<FXRealSpinner*>::const_iterator threshIt,
744 std::vector<FXRealSpinner*>::const_iterator threshEnd,
745 std::vector<FXButton*>::const_iterator buttonIt,
748 while (colIt != colEnd) {
750 if (sender == *colIt) {
754 if (sender == *threshIt) {
755 const double val = (*threshIt)->getValue();
759 (*threshIt)->getRange(lo, hi);
760 (*threshIt)->setRange(lo, val);
764 if (threshIt != threshEnd) {
765 (*threshIt)->getRange(lo, hi);
766 (*threshIt)->setRange(val, hi);
771 if (sender == *colIt) {
775 if (sender == *buttonIt) {
778 }
else if (sender == *(buttonIt + 1)) {
795 std::vector<FXRealSpinner*>::const_iterator scaleEnd,
796 std::vector<FXRealSpinner*>::const_iterator threshIt,
797 std::vector<FXRealSpinner*>::const_iterator threshEnd,
798 std::vector<FXButton*>::const_iterator buttonIt,
801 while (scaleIt != scaleEnd) {
803 if (sender == *scaleIt) {
804 scheme.
setColor(pos, (*scaleIt)->getValue());
807 if (sender == *threshIt) {
808 const double val = (*threshIt)->getValue();
812 (*threshIt)->getRange(lo, hi);
813 (*threshIt)->setRange(lo, val);
817 if (threshIt != threshEnd) {
818 (*threshIt)->getRange(lo, hi);
819 (*threshIt)->setRange(val, hi);
824 if (sender == *scaleIt) {
825 scheme.
setColor(pos, (*scaleIt)->getValue());
828 if (sender == *buttonIt) {
829 scheme.
addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
831 }
else if (sender == *(buttonIt + 1)) {
856 bool doRebuildColorMatrices =
false;
972 tmpSettings.
fps = (
myFPS->getCheck() != FALSE);
983 doRebuildColorMatrices =
true;
987 doRebuildColorMatrices =
true;
993 doRebuildColorMatrices =
true;
997 doRebuildColorMatrices =
true;
1000 doRebuildColorMatrices =
true;
1007 doRebuildColorMatrices =
true;
1011 doRebuildColorMatrices =
true;
1014 doRebuildColorMatrices =
true;
1021 doRebuildColorMatrices =
true;
1025 doRebuildColorMatrices =
true;
1028 doRebuildColorMatrices =
true;
1035 doRebuildColorMatrices =
true;
1039 doRebuildColorMatrices =
true;
1042 doRebuildColorMatrices =
true;
1049 doRebuildColorMatrices =
true;
1053 doRebuildColorMatrices =
true;
1056 doRebuildColorMatrices =
true;
1063 doRebuildColorMatrices =
true;
1067 doRebuildColorMatrices =
true;
1070 doRebuildColorMatrices =
true;
1077 doRebuildColorMatrices =
true;
1081 doRebuildColorMatrices =
true;
1084 doRebuildColorMatrices =
true;
1091 doRebuildColorMatrices =
true;
1095 doRebuildColorMatrices =
true;
1098 doRebuildColorMatrices =
true;
1128 if (doRebuildColorMatrices) {
1132 getApp()->forceRefresh();
1141 if (settingsName !=
"") {
1142 FXint index =
mySchemeName->appendItem(settingsName.c_str());
1166 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1207 std::string name =
"";
1208 while (name.length() == 0) {
1219 if (!dialog.execute()) {
1222 name = text->getText().text();
1223 for (
int i = 0; i < (int)name.length(); ++i) {
1224 if (name[i] !=
'_' && (name[i] <
'a' || name[i] >
'z') && (name[i] <
'A' || name[i] >
'Z') && (name[i] <
'0' || name[i] >
'9')) {
1232 tmpSettings.
name = name;
1246 sender->handle(
this,
1248 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1260 std::string name =
mySchemeName->getItem(index).text();
1271 sender->handle(
this,
1273 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1310 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
1318 sender->handle(
this,
1321 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1329 FXFileDialog opendialog(
this,
"Import view settings");
1331 opendialog.setSelectMode(SELECTFILE_ANY);
1332 opendialog.setPatternList(
"*.xml");
1336 if (opendialog.execute()) {
1346 FXFileDialog opendialog(
this,
"Load Decals");
1348 opendialog.setSelectMode(SELECTFILE_ANY);
1349 opendialog.setPatternList(
"*.xml");
1353 if (opendialog.execute()) {
1374 FXMessageBox::error(
myParent, MBOX_OK,
"Storing failed!",
"%s", e.what());
1384 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1394 const int numRows =
MAX2((
int)10, (
int)
myDecals->size() + 1);
1405 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1407 for (k = 0; k < cols; k++) {
1409 header->setItemSize(k, 60);
1411 header->setItemSize(0, 150);
1414 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1428 for (k = 0; k < 7; k++) {
1436 std::vector<FXColorWell*>& colors,
1437 std::vector<FXRealSpinner*>& thresholds,
1438 std::vector<FXButton*>& buttons,
1439 FXCheckButton* interpolation,
1446 const bool fixed = scheme.
isFixed();
1447 std::vector<RGBColor>::const_iterator colIt = scheme.
getColors().begin();
1448 std::vector<double>::const_iterator threshIt = scheme.
getThresholds().begin();
1449 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1450 while (colIt != scheme.
getColors().end()) {
1453 new FXLabel(m, nameIt->c_str());
1459 threshDialer->setValue(*threshIt);
1460 thresholds.push_back(threshDialer);
1470 interpolation->disable();
1472 if (colors.size() > 1) {
1473 interpolation->enable();
1474 if (interpolation->getCheck() != FALSE) {
1475 thresholds.front()->enable();
1477 thresholds.front()->disable();
1480 interpolation->disable();
1481 thresholds.front()->disable();
1490 std::vector<FXRealSpinner*>& scales,
1491 std::vector<FXRealSpinner*>& thresholds,
1492 std::vector<FXButton*>& buttons,
1493 FXCheckButton* interpolation,
1500 const bool fixed = scheme.
isFixed();
1501 std::vector<double>::const_iterator scaleIt = scheme.
getColors().begin();
1502 std::vector<double>::const_iterator threshIt = scheme.
getThresholds().begin();
1503 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1504 while (scaleIt != scheme.
getColors().end()) {
1506 scaleDialer->setValue(*scaleIt);
1507 scales.push_back(scaleDialer);
1509 new FXLabel(m, nameIt->c_str());
1515 threshDialer->setValue(*threshIt);
1516 thresholds.push_back(threshDialer);
1526 interpolation->disable();
1528 if (scales.size() > 1) {
1529 interpolation->enable();
1530 if (interpolation->getCheck() != FALSE) {
1531 thresholds.front()->enable();
1533 thresholds.front()->disable();
1536 interpolation->disable();
1537 thresholds.front()->disable();
1554 for (
int i = 1; i <= 5; ++i) {
1681 std::string value = i->
item->getText().text();
1683 if (value.find_first_not_of(
" ") == std::string::npos) {
1689 if (row ==
static_cast<int>(
myDecals->size())) {
1702 }
else if (row >
static_cast<int>(
myDecals->size())) {
1706 d = (*myDecals)[row];
1720 std::string msg =
"The value must be a float, is:" + value;
1721 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1728 std::string msg =
"The value must be a float, is:" + value;
1729 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1736 std::string msg =
"The value must be a float, is:" + value;
1737 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1744 std::string msg =
"The value must be a float, is:" + value;
1745 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1752 std::string msg =
"The value must be a float, is:" + value;
1753 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1760 std::string msg =
"The value must be a float, is:" + value;
1761 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1768 std::string msg =
"The value must be a bool, is:" + value;
1769 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1775 (*myDecals)[row] = d;
1795 for (
int i = 0; i <
mySchemeName->getNumItems(); ++i) {
1807 const std::string& title,
1830 mySizeDial->getValue(),
1833 myConstSizeCheck->getCheck() != FALSE);
1839 myCheck->setCheck(settings.
show);
1840 mySizeDial->setValue(settings.
size);
1843 myConstSizeCheck->setCheck(settings.
constSize);
1858 myMinSizeDial->setValue(settings.
minSize);
1862 myExaggerateDial->setRange(0, 10000);
1870 myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1871 myCheck->getCheck() != FALSE,
1872 myCheckSelected->getCheck() != FALSE);
1880 myMinSizeDial->setValue(settings.
minSize);
1887 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"x", getX());
1888 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"y", getY());
1889 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"width", getWidth());
1890 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"height", getHeight());
1896 const FXint minSize = 400;
1897 const FXint minTitlebarHeight = 20;
1898 setX(
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"x", 150),
1899 getApp()->getRootWindow()->getWidth() - minSize)));
1900 setY(
MAX2(minTitlebarHeight,
1901 MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"y", 150),
1902 getApp()->getRootWindow()->getHeight() - minSize)));
1903 setWidth(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"width", 700), minSize));
1904 setHeight(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"height", 500), minSize));
double roll
The roll of the image to the ground plane (in degrees)
NamePanel * myJunctionIndexPanel
long onCmdSaveSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be saved into the registry.
#define GUIDesignViewSettingsLabel1
Label.
GUIVisualizationSizeSettings polySize
std::string name
The name of this setting.
FXMutex * myDecalsLock
Lock used when changing the decals.
GUIColorer edgeColorer
The mesoscopic edge colorer.
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
std::vector< FXButton * > myPolyButtons
NamePanel * myJunctionNamePanel
FXCheckButton * myHideMacroConnectors
bool fps
Information whether frames-per-second should be drawn.
void update(const GUIVisualizationTextSettings &settings)
SizePanel * myJunctionSizePanel
void setCellType(int pos, CellType t)
std::vector< FXRealSpinner * > myLaneScaleThresholds
std::vector< GUISUMOAbstractView::Decal > * myDecals
The parent's decals.
RGBColor selectedEdgeColor
edge selection color
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
#define GUIDesignSpinDial
bool hideConnectors
flag to show or hidde connectors
#define GUIDesignViewSettingsVerticalFrame2
double getGridHeight() const
get grid height
@ MID_SETTINGS_CANCEL
Cancel-button was pushed.
FXCheckButton * mySaveDelay
void update(const GUIVisualizationSizeSettings &settings)
bool laneShowBorders
Information whether lane borders shall be drawn.
void loadWindowSize()
load window position and size from the registry
std::string edgeParam
key for coloring by edge parameter
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
FXCheckButton * mySaveBreakpoints
double laneMinSize
The minimum visual lane width for drawing.
NamePanel * myPOITypePanel
NamePanel * myPolyNamePanel
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
FXComboBox * myVehicleTextParamKey
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings vehicleValue
#define GUIDesignViewSettingsTabBook1
Tab books.
long onCmdDeleteSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be deleted.
GUIVisualizationTextSettings tlsPhaseIndex
GUIVisualizationTextSettings getSettings()
std::vector< FXColorWell * > myLaneColors
FXCheckButton * myPersonColorInterpolation
The dialog to change the view (gui) settings.
RGBColor bgColor
background text color
void remove(const std::string &name)
Removes the setting with the given name.
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
FXComboBox * myVehicleParamKey
std::vector< FXRealSpinner * > myPOIThresholds
void setColor(const int pos, const T &color)
@ MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
Static storage of an output device and its base (abstract) implementation.
long onCmdLoadDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
std::vector< FXRealSpinner * > myPolyThresholds
NamePanel * myTLSPhaseIndexPanel
void writeXML(OutputDevice &dev)
write the settings to the given device
#define GUIDesignViewSettingsTabItemBook1
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
FXColorWell * mySelectedCrossingColor
virtual bool setColorScheme(const std::string &)
set color scheme
FXComboBox * getColoringSchemesCombo()
get coloring schemes combo
bool drawBoundaries
enable or disable draw boundaries
bool constantSizeSelected
whether only selected objects shall be drawn with constant
NamePanel * myVehicleValuePanel
NamePanel * myAddFullNamePanel
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
GUIVisualizationTextSettings containerName
FXRealSpinner * myLaneWidthUpscaleDialer
bool showRouteIndex
Information whether the route index should be shown.
long onCmdEditTable(FXObject *, FXSelector, void *data)
Called if the decals-table was changed.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
#define GUIDesignViewSettingsButton4
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
FXCheckButton * mySaveViewPort
bool showGrid
Information whether a grid shall be shown.
NamePanel * myEdgeNamePanel
FXCheckButton * myShowGrid
MFXIconComboBox * myPOIColorMode
FXVerticalFrame * myVehicleColorSettingFrame
#define GUIDesignViewSettingsSpinDial2
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
double centerY
The center of the image in y-direction (net coordinates, in m)
FXCheckButton * myJunctionColorInterpolation
GUISUMOAbstractView * myParent
The parent view (which settings are changed)
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
MFXIconComboBox * myVehicleColorMode
FXRealSpinner * myGridXSizeDialer
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
std::string filename
The path to the file the image is located at.
void removeColor(const int pos)
FXCheckButton * myShowBlinker
FXColorWell * mySelectedConnectionColor
NamePanel * myPersonNamePanel
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
bool netedit
Whether the settings are for Netedit.
GUIColorer personColorer
The person colorer.
@ MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
FXCheckButton * myShowLaneDirection
#define GUIDesignViewSettingsColorWell
ColorWell.
std::vector< FXButton * > myVehicleButtons
bool updateScaleRanges(FXObject *sender, std::vector< FXRealSpinner * >::const_iterator colIt, std::vector< FXRealSpinner * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIScaleScheme &scheme)
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
double centerZ
The center of the image in z-direction (net coordinates, in m)
std::vector< FXColorWell * > myVehicleColors
GUIVisualizationSizeSettings containerSize
GUIVisualizationTextSettings drawLinkJunctionIndex
GUIVisualizationSizeSettings vehicleSize
bool showRails
Information whether rails shall be drawn.
void setNumberCellParams(int pos, double min, double max, double steps1, double steps2, double steps3, const std::string &format)
GUIColorer vehicleColorer
The vehicle colorer.
FXCheckButton * myLaneColorInterpolation
double height
The height of the image (net coordinates in y-direction, in m)
RGBColor selectedConnectionColor
connection selection color
GUIScaler edgeScaler
The mesoscopic edge scaler.
FXCheckButton * myShowSizeLegend
SizePanel * myPOISizePanel
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXCheckButton * myShowLane2Lane
void close()
Closes the device and removes it from the dictionary.
FXVerticalFrame * myLaneColorSettingFrame
@ MID_SIMPLE_VIEW_SAVE_DECALS
For the save-decals - button.
std::vector< FXRealSpinner * > myPersonThresholds
FXCheckButton * myDrawBoundaries
std::vector< FXRealSpinner * > myVehicleThresholds
#define GUIDesignViewSettingsButton5
FXCheckButton * myShowLinkRules
void rebuildList()
Rebuilds the decals table.
GUIVisualizationTextSettings polyName
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIColorer polyColorer
The polygon colorer.
void show()
show view settings dialog
#define GUIDesignViewSettingsMFXTableJustify
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
FXRealSpinner * mySizeDial
FXVerticalFrame * myLaneScaleSettingFrame
GUIVisualizationSettings * mySettings
The current settings.
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
RGBColor selectedProhibitionColor
prohibition selection color
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
GUIVisualizationTextSettings junctionName
#define GUIDesignViewSettingsHorizontalFrame2
const std::vector< double > & getThresholds() const
NamePanel * myPOINamePanel
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
FXCheckButton * myPolyColorInterpolation
#define GUIDesignViewSettingsVerticalFrame5
GUIColorer junctionColorer
The junction colorer.
double layer
The layer of the image.
void loadDecals(const std::string &file)
Loads decals from a file.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
MFXIconComboBox * myVehicleShapeDetail
void saveWindowSize()
save window position and size to the registry
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
void loadSettings(const std::string &file)
Loads a scheme from a file.
GUIVisualizationTextSettings polyType
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
FXCheckButton * myShowBrakeGap
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double gridXSize
Information about the grid spacings.
RGBColor backgroundColor
The background color to use.
FXVerticalFrame * myPolyColorSettingFrame
GUIVisualizationTextSettings internalEdgeName
GUIVisualizationTextSettings addName
std::vector< FXButton * > myLaneScaleButtons
void save(OutputDevice &dev) const
Writes the settings into an output device.
const std::vector< T > & getColors() const
bool screenRelative
Whether this image should be skipped in 2D-views.
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
NamePanel * myCwaEdgeNamePanel
long onCmdSaveDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
GUIVisualizationSizeSettings poiSize
int getNumInitialSettings() const
Returns the number of initial settings.
#define GUIDesignViewSettingsMFXTable
MFX Add/Edit Typed Table.
void saveDecals(OutputDevice &dev) const
Writes the currently used decals into a file.
bool constSize
@brif flag to avoid size changes
double rot
The rotation of the image in the ground plane (in degrees)
MFXIconComboBox * myLaneEdgeScaleMode
... lane scaler
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
double tilt
The tilt of the image to the ground plane (in degrees)
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
bool showColorLegend
Information whether the colo legend shall be drawn.
#define GUIDesignViewSettingsSpinDial1
GUIScaler laneScaler
The lane scaler.
std::vector< FXRealSpinner * > myLaneThresholds
std::vector< FXButton * > myPOIButtons
std::vector< FXButton * > myPersonButtons
#define GUIDesignHorizontalSeparator
@ MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
FXCheckButton * myShowBikeMarkings
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
FXRealSpinner * myLaneColorRainbowThreshold
NamePanel * myAddNamePanel
int vehicleQuality
The quality of vehicle drawing.
std::vector< FXColorWell * > myJunctionColors
std::vector< FXColorWell * > myPOIColors
FXCheckButton * myShowSublanes
FXCheckButton * myShowRouteIndex
bool showSublanes
Whether to show sublane boundaries.
#define GUIDesignViewSettingsTextField1
textFields
std::vector< FXRealSpinner * > myJunctionThresholds
MFXIconComboBox * myPersonColorMode
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
@ MID_SIMPLE_VIEW_DELETE
For the delete - button.
RGBColor selectedPersonColor
person selection color
@ SUMO_ATTR_LAYER
A layer number.
GUIVisualizationTextSettings vehicleName
FXMatrix * rebuildScaleMatrix(FXVerticalFrame *frame, std::vector< FXRealSpinner * > &scales, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIScaleScheme &scheme)
Rebuilds manipulators for the current scaling scheme.
int containerQuality
The quality of container drawing.
GUICompleteSchemeStorage gSchemeStorage
NamePanel * myTLIndexPanel
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
An XML-handler for visualisation schemes.
std::string time2string(SUMOTime t)
std::string vehicleTextParam
key for rendering textual parameter
FXColorWell * mySelectedAdditionalColor
bool dither
Information whether dithering shall be enabled.
NamePanel * myPersonValuePanel
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
void remove(GUIDialog_EditViewport *)
remove viewport
#define GUIDesignViewSettingsMatrix2
GUIVisualizationTextSettings addFullName
std::vector< FXButton * > myContainerButtons
FXCheckButton * myVehicleColorInterpolation
GUIVisualizationTextSettings drawLinkTLIndex
bool hasDecals() const
Returns whether any decals have been parsed.
GUIVisualizationSizeSettings personSize
#define GUIDesignViewSettingsHorizontalFrame3
FXColorWell * mySelectedLaneColor
double altitude
The altitude of the image (net coordinates in z-direction, in m)
#define GUIDesignViewSettingsVerticalFrame3
bool allowsNegativeValues() const
#define GUIDesignViewSettingsButton2
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
NamePanel * myInternalEdgeNamePanel
FXVerticalFrame * myContainerColorSettingFrame
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings)
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
#define GUIDesignComboBoxStatic
Combo box static (not editable)
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
FXString gCurrentFolder
The folder used as last.
MFXIconComboBox * myJunctionColorMode
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
FXColorWell * mySelectedVehicleColor
void updateVehicleParams()
reload known vehicle parameters
std::vector< FXRealSpinner * > myContainerThresholds
GUIVisualizationTextSettings internalJunctionName
SizePanel * myPolySizePanel
SizePanel * myVehicleSizePanel
double minSize
The minimum size to draw this object.
#define GUIDesignViewSettingsMainDialog
std::string vehicleParam
key for coloring by vehicle parameter
FXVerticalFrame * myPOIColorSettingFrame
FXRealSpinner * myGridYSizeDialer
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
#define GUIDesignViewSettingsDialog
GUIVisualizationTextSettings streetName
SizePanel * myContainerSizePanel
GUIVisualizationColorSettings colorSettings
color settings
#define GUIDesignViewSettingsButton3
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
FXColorWell * mySelectedPersonColor
RGBColor selectionColor
basic selection color
FXCheckButton * myContainerColorInterpolation
NamePanel * myInternalJunctionNamePanel
GUIVisualizationTextSettings vehicleText
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
bool showSizeLegend
Information whether the size legend shall be drawn.
GUIVisualizationTextSettings cwaEdgeName
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static const std::string SCHEME_NAME_PARAM_NUMERICAL
FXCheckButton * myShowMinGap
GUIVisualizationTextSettings poiType
NamePanel * myEdgeValuePanel
GUIVisualizationTextSettings poiName
std::vector< FXRealSpinner * > myLaneScales
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, bool hide=false, double hideThreshold=0)
recalibrate color scheme according to the current value range
#define GUIDesignViewSettingsButton1
Buttons.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
SizePanel * myPersonSizePanel
#define GUIDesignViewSettingsComboBox1
Combo boxs.
bool showLaneDirection
Whether to show direction indicators for lanes.
#define GUIDesignViewSettingsColorWell1
Color wells.
MFXIconComboBox * myPersonShapeDetail
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
void setDelay(double delay)
Sets the delay of the parent application.
double getDelay() const
Returns the delay of the parent application.
#define GUIDesignViewSettingsColorWell2
FXColorWell * mySelectionColor
selection colors
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
FXComboBox * mySchemeName
FXColorWell * myBackgroundColor
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
bool showBlinker
Information whether vehicle blinkers shall be drawn.
FXCheckButton * myDrawCrossingsAndWalkingAreas
FXColorWell * mySelectedPersonPlanColor
NamePanel * myStreetNamePanel
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
@ MID_SIMPLE_VIEW_LOAD_DECALS
For the load-decals - button.
FXCheckButton * mySpreadSuperposed
long onUpdDeleteSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to delete settings.
@ MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
const std::string & getName() const
@ MID_SETTINGS_OK
Ok-button was pushed.
GUIVisualizationSizeSettings getSettings()
MFXIconComboBox * myLaneEdgeColorMode
... lane colorer
bool updateColorRanges(FXObject *sender, std::vector< FXColorWell * >::const_iterator colIt, std::vector< FXColorWell * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIColorScheme &scheme)
#define GUIDesignViewSettingsVerticalFrame4
#define GUIDesignViewSettingsMatrix4
MFXIconComboBox * myContainerShapeDetail
FXVerticalFrame * myPersonColorSettingFrame
std::vector< FXColorWell * > myContainerColors
FXCheckButton * myShowColorLegend
std::vector< FXButton * > myJunctionButtons
FXVerticalFrame * myDecalsFrame
void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
int personQuality
The quality of person drawing.
FXButton * myJunctionColorRainbow
@ MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
FXCheckButton * mySaveDecals
bool initialised
Whether this image was initialised (inserted as a texture)
int addColor(const T &color, const double threshold, const std::string &name="")
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, personStops...)
const std::vector< std::string > & getNames() const
FXColorWell * mySelectedEdgeColor
GUIVisualizationSizeSettings addSize
GUIVisualizationTextSettings personValue
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
GUIVisualizationTextSettings personName
FXCheckButton * myShowLaneDecals
GUIColorer laneColorer
The lane colorer.
#define GUIDesignViewSettingsVerticalFrame6
GUIColorer containerColorer
The container colorer.
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
#define GUIDesignViewSettingsMatrix5
RGBColor selectedCrossingColor
crossings selection color
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
~GUIDialog_ViewSettings()
Destructor.
std::vector< FXButton * > myLaneButtons
FXRealSpinner * myLaneMinWidthDialer
NamePanel * myVehicleNamePanel
#define GUIDesignViewSettingsMatrix3
FXVerticalFrame * myJunctionColorSettingFrame
MFXIconComboBox * myPolyColorMode
FXColorWell * myBGColorWell
FXCheckButton * myShowLaneBorders
bool drawBrakeGap
Information whether the brake gap shall be drawn.
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
bool drawJunctionShape
whether the shape of the junction should be drawn
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
GUIColorer poiColorer
The POI colorer.
FXCheckButton * myLaneScaleInterpolation
FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[]
NamePanel * myVehicleTextPanel
Stores the information about how to visualize structures.
FXCheckButton * myPOIColorInterpolation
std::vector< FXColorWell * > myPersonColors
FXCheckButton * myForceDrawForPositionSelection
SizePanel * myAddSizePanel
FXColorWell * mySelectedRouteColor
FXCheckButton * myForceDrawForRectangleSelection
#define GUIDesignViewSettingsLabel2
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
void setThreshold(const int pos, const double threshold)
double width
The width of the image (net coordinates in x-direction, in m)
std::vector< FXColorWell * > myPolyColors
FXMatrix * rebuildColorMatrix(FXVerticalFrame *frame, std::vector< FXColorWell * > &colors, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIColorScheme &scheme)
Rebuilds manipulators for the current coloring scheme.
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
FXColorWell * myColorWell
FXCheckButton * myLaneColorRainbowCheck
FXCheckButton * myShowBTRange
double getDelay() const
Returns the parsed delay.
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
RGBColor selectedVehicleColor
vehicle selection color
bool isInterpolated() const
NamePanel * myPolyTypePanel
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
double centerX
The center of the image in x-direction (net coordinates, in m)
void setActive(int scheme)
A decal (an image) that can be shown.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
RGBColor selectedLaneColor
lane selection color
FXColorWell * mySelectedProhibitionColor
FXCheckButton * myShowRails
GUIVisualizationTextSettings edgeName
MFXIconComboBox * myContainerColorMode
#define GUIDesignViewSettingsMatrix1
Matrix.
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
MFXAddEditTypedTable * myDecalsTable
GUIVisualizationTextSettings edgeValue
NamePanel * myContainerNamePanel
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
std::string edgeData
key for coloring by edgeData
bool showBTRange
Information whether the communication range shall be drawn.
FXCheckButton * myDrawJunctionShape
FXCheckButton * myConstSizeCheck
double getGridWidth() const
get grid width
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
FXButton * myLaneColorRainbow
double exaggeration
The size exaggeration (upscale)
@ SUMO_TAG_VIEWSETTINGS_DECAL