72 FXIMPLEMENT(
GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
80 myParent(parent), mySettings(settings), myBackup(*settings),
81 myDecals(decals), myDecalsLock(decalsLock), myDecalsTable(
nullptr),
82 myDataValuePanel(
nullptr) {
86 buildHeader(contentFrame);
90 buildBackgroundFrame(tabbook);
92 buildStreetsFrame(tabbook);
94 buildVehiclesFrame(tabbook);
96 buildPersonsFrame(tabbook);
98 buildContainersFrame(tabbook);
100 buildJunctionsFrame(tabbook);
102 buildAdditionalsFrame(tabbook);
104 if (mySettings->netedit) {
105 buildDemandFrame(tabbook);
108 buildPOIsFrame(tabbook);
110 buildPolygonsFrame(tabbook);
112 if (mySettings->netedit) {
113 buildSelectionFrame(tabbook);
116 if (mySettings->netedit) {
117 buildDataFrame(tabbook);
120 buildLegendFrame(tabbook);
122 buildOpenGLFrame(tabbook);
124 buildButtons(contentFrame);
126 rebuildColorMatrices(
false);
206 if (ptr !=
nullptr) {
207 FXString dataS = (
char*) ptr;
210 for (
int i = 0; i <
mySchemeName->getNumItems() - 1; ++i) {
367 std::vector<FXColorWell*>::const_iterator colEnd,
368 std::vector<FXRealSpinner*>::const_iterator threshIt,
369 std::vector<FXRealSpinner*>::const_iterator threshEnd,
370 std::vector<FXButton*>::const_iterator buttonIt,
374 while (colIt != colEnd) {
376 if (sender == *colIt) {
380 if (sender == *threshIt) {
381 const double val = (*threshIt)->getValue();
385 if (sender == *colIt) {
389 if (sender == *buttonIt) {
392 }
else if (sender == *(buttonIt + 1)) {
409 std::vector<FXRealSpinner*>::const_iterator scaleEnd,
410 std::vector<FXRealSpinner*>::const_iterator threshIt,
411 std::vector<FXRealSpinner*>::const_iterator threshEnd,
412 std::vector<FXButton*>::const_iterator buttonIt,
415 while (scaleIt != scaleEnd) {
417 if (sender == *scaleIt) {
418 scheme.
setColor(pos, (*scaleIt)->getValue());
421 if (sender == *threshIt) {
422 const double val = (*threshIt)->getValue();
426 (*threshIt)->getRange(lo, hi);
427 (*threshIt)->setRange(lo, val);
431 if (threshIt != threshEnd) {
432 (*threshIt)->getRange(lo, hi);
433 (*threshIt)->setRange(val, hi);
438 if (sender == *scaleIt) {
439 scheme.
setColor(pos, (*scaleIt)->getValue());
442 if (sender == *buttonIt) {
443 scheme.
addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
445 }
else if (sender == *(buttonIt + 1)) {
472 bool doRebuildColorMatrices =
false;
644 tmpSettings.
fps = (
myFPS->getCheck() != FALSE);
656 doRebuildColorMatrices =
true;
659 doRebuildColorMatrices =
true;
663 doRebuildColorMatrices =
true;
669 doRebuildColorMatrices =
true;
673 doRebuildColorMatrices =
true;
676 doRebuildColorMatrices =
true;
683 doRebuildColorMatrices =
true;
687 doRebuildColorMatrices =
true;
690 doRebuildColorMatrices =
true;
697 doRebuildColorMatrices =
true;
701 doRebuildColorMatrices =
true;
704 doRebuildColorMatrices =
true;
711 doRebuildColorMatrices =
true;
715 doRebuildColorMatrices =
true;
718 doRebuildColorMatrices =
true;
725 doRebuildColorMatrices =
true;
729 doRebuildColorMatrices =
true;
732 doRebuildColorMatrices =
true;
739 doRebuildColorMatrices =
true;
743 doRebuildColorMatrices =
true;
746 doRebuildColorMatrices =
true;
753 doRebuildColorMatrices =
true;
757 doRebuildColorMatrices =
true;
760 doRebuildColorMatrices =
true;
767 doRebuildColorMatrices =
true;
771 doRebuildColorMatrices =
true;
774 doRebuildColorMatrices =
true;
781 doRebuildColorMatrices =
true;
785 doRebuildColorMatrices =
true;
788 doRebuildColorMatrices =
true;
796 doRebuildColorMatrices =
true;
800 doRebuildColorMatrices =
true;
803 doRebuildColorMatrices =
true;
838 if (doRebuildColorMatrices) {
842 getApp()->forceRefresh();
851 FXint index =
mySchemeName->appendItem(settingsName.c_str());
875 std::vector<GUISUMOAbstractView::Decal>::iterator j;
916 std::string name =
"";
917 while (name.length() == 0) {
928 if (!dialog.execute()) {
931 name = text->getText().text();
932 for (
int i = 0; i < (int)name.length(); ++i) {
933 if (name[i] !=
'_' && (name[i] <
'a' || name[i] >
'z') && (name[i] <
'A' || name[i] >
'Z') && (name[i] <
'0' || name[i] >
'9')) {
940 tmpSettings.
name = name;
965 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
990 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1027 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
1035 sender->handle(
this,
1038 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1046 FXFileDialog opendialog(
this,
"Import view settings");
1048 opendialog.setSelectMode(SELECTFILE_ANY);
1049 opendialog.setPatternList(
"*.xml");
1053 if (opendialog.execute()) {
1063 FXFileDialog opendialog(
this,
"Load Decals");
1065 opendialog.setSelectMode(SELECTFILE_ANY);
1066 opendialog.setPatternList(
"*.xml");
1070 if (opendialog.execute()) {
1091 FXMessageBox::error(
myParent, MBOX_OK,
"Storing failed!",
"%s", e.what());
1115 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1125 const int numRows =
MAX2((
int)10, (
int)
myDecals->size() + 1);
1136 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1138 for (k = 0; k < cols; k++) {
1140 header->setItemSize(k, 60);
1142 header->setItemSize(0, 150);
1145 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1159 for (k = 0; k < 7; k++) {
1167 std::vector<FXColorWell*>& colors,
1168 std::vector<FXRealSpinner*>& thresholds,
1169 std::vector<FXButton*>& buttons,
1170 FXCheckButton* interpolation,
1177 const bool fixed = scheme.
isFixed();
1178 std::vector<RGBColor>::const_iterator colIt = scheme.
getColors().begin();
1179 std::vector<double>::const_iterator threshIt = scheme.
getThresholds().begin();
1180 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1181 while (colIt != scheme.
getColors().end()) {
1184 new FXLabel(m, nameIt->c_str());
1189 FXRealSpinner* threshDialer =
new FXRealSpinner(m, 10,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1190 threshDialer->setValue(*threshIt);
1191 thresholds.push_back(threshDialer);
1193 threshDialer->disable();
1194 threshDialer->hide();
1196 buttons.back()->hide();
1198 buttons.back()->disable();
1210 interpolation->disable();
1212 if (colors.size() > 1) {
1213 interpolation->enable();
1214 if (interpolation->getCheck() != FALSE) {
1215 thresholds.front()->enable();
1217 thresholds.front()->disable();
1220 interpolation->disable();
1221 thresholds.front()->disable();
1230 std::vector<FXRealSpinner*>& scales,
1231 std::vector<FXRealSpinner*>& thresholds,
1232 std::vector<FXButton*>& buttons,
1233 FXCheckButton* interpolation,
1240 const bool fixed = scheme.
isFixed();
1241 std::vector<double>::const_iterator scaleIt = scheme.
getColors().begin();
1242 std::vector<double>::const_iterator threshIt = scheme.
getThresholds().begin();
1243 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1244 while (scaleIt != scheme.
getColors().end()) {
1245 FXRealSpinner* scaleDialer =
new FXRealSpinner(m, 10,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX);
1246 scaleDialer->setValue(*scaleIt);
1247 scales.push_back(scaleDialer);
1249 new FXLabel(m, nameIt->c_str());
1254 FXRealSpinner* threshDialer =
new FXRealSpinner(m, 10,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1255 threshDialer->setValue(*threshIt);
1256 thresholds.push_back(threshDialer);
1266 interpolation->disable();
1268 if (scales.size() > 1) {
1269 interpolation->enable();
1270 if (interpolation->getCheck() != FALSE) {
1271 thresholds.front()->enable();
1273 thresholds.front()->disable();
1276 interpolation->disable();
1277 thresholds.front()->disable();
1294 for (
int i = 1; i <= 5; ++i) {
1458 std::string value = i->
item->getText().text();
1460 if (value.find_first_not_of(
" ") == std::string::npos) {
1466 if (row ==
static_cast<int>(
myDecals->size())) {
1479 }
else if (row >
static_cast<int>(
myDecals->size())) {
1483 d = (*myDecals)[row];
1497 std::string msg =
"The value must be a float, is:" + value;
1498 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1505 std::string msg =
"The value must be a float, is:" + value;
1506 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1513 std::string msg =
"The value must be a float, is:" + value;
1514 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1521 std::string msg =
"The value must be a float, is:" + value;
1522 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1529 std::string msg =
"The value must be a float, is:" + value;
1530 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1537 std::string msg =
"The value must be a float, is:" + value;
1538 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1545 std::string msg =
"The value must be a bool, is:" + value;
1546 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1552 (*myDecals)[row] = d;
1572 for (
int i = 0; i <
mySchemeName->getNumItems(); ++i) {
1584 const std::string& title,
1609 mySizeDial->getValue(),
1612 myConstSizeCheck->getCheck() != FALSE,
1613 mySelectedCheck->getCheck() != FALSE);
1619 myCheck->setCheck(settings.
showText);
1620 mySizeDial->setValue(settings.
size);
1623 myConstSizeCheck->setCheck(settings.
constSize);
1639 myMinSizeDial->setValue(settings.
minSize);
1643 myExaggerateDial->setRange(0, 10000);
1651 myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1652 myCheck->getCheck() != FALSE,
1653 myCheckSelected->getCheck() != FALSE);
1661 myMinSizeDial->setValue(settings.
minSize);
1668 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"x", getX());
1669 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"y", getY());
1670 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"width", getWidth());
1671 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"height", getHeight());
1677 const FXint minSize = 400;
1678 const FXint minTitlebarHeight = 20;
1679 setX(
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"x", 150),
1680 getApp()->getRootWindow()->getWidth() - minSize)));
1681 setY(
MAX2(minTitlebarHeight,
1682 MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"y", 150),
1683 getApp()->getRootWindow()->getHeight() - minSize)));
1684 setWidth(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"width", 700), minSize));
1685 setHeight(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"height", 500), minSize));
1694 const int index =
mySchemeName->appendItem(name.c_str());
1706 new FXVerticalSeparator(horizontalFrame);
1709 mySaveDelay =
new FXCheckButton(horizontalFrame,
"Delay");
1710 mySaveDecals =
new FXCheckButton(horizontalFrame,
"Decals");
1722 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
1730 new FXLabel(verticalFrameDecals,
"Decals:");
1742 new FXLabel(matrixGrid,
"");
1759 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
1775 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
1851 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
1932 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
1972 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2011 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2022 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2050 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2083 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2130 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2165 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2190 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2227 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2245 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2271 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2277 new FXLabel(m72,
"");
2280 new FXLabel(m72,
"");
2283 new FXLabel(m72,
"");
2290 FXScrollWindow* scrollWindow =
new FXScrollWindow(tabbook);
2310 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
@ MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
@ MID_SIMPLE_VIEW_CLEAR_DECALS
For the clear-decals - button.
@ MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
@ MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
@ MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
@ MID_SIMPLE_VIEW_DELETE
For the delete - button.
@ MID_SETTINGS_OK
Ok-button was pushed.
@ MID_SETTINGS_CANCEL
Cancel-button was pushed.
@ MID_SIMPLE_VIEW_LOAD_DECALS
For the load-decals - button.
@ MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
@ MID_SIMPLE_VIEW_SAVE_DECALS
For the save-decals - button.
GUICompleteSchemeStorage gSchemeStorage
#define GUIDesignViewSettingsColorWell2
#define GUIDesignViewSettingsMatrix3
#define GUIDesignViewSettingsMainDialog
#define GUIDesignViewSettingsMatrix5
#define GUIDesignComboBoxStatic
Combo box static (not editable)
#define GUIDesignViewSettingsMFXTable
MFX Add/Edit Typed Table.
#define GUIDesignViewSettingsComboBox1
Combo boxs.
#define GUIDesignViewSettingsHorizontalFrame3
#define GUIDesignViewSettingsVerticalFrame6
#define GUIDesignViewSettingsHorizontalFrame2
#define GUIDesignViewSettingsButton2
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
#define GUIDesignViewSettingsMatrix1
Matrix.
#define GUIDesignViewSettingsColorWell1
Color wells.
#define GUIDesignViewSettingsButton4
#define GUIDesignViewSettingsDialog
#define GUIDesignViewSettingsMatrix4
#define GUIDesignViewSettingsSpinDial2
#define GUIDesignViewSettingsButton5
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
#define GUIDesignViewSettingsSpinDial1
#define GUIDesignViewSettingsVerticalFrame5
#define GUIDesignViewSettingsMatrix2
#define GUIDesignViewSettingsLabel1
Label.
#define GUIDesignViewSettingsTabBook1
Tab books.
#define GUIDesignViewSettingsButton3
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
#define GUIDesignViewSettingsVerticalFrame2
#define GUIDesignViewSettingsVerticalFrame3
#define GUIDesignViewSettingsColorWell
ColorWell.
#define GUIDesignViewSettingsMFXTableJustify
#define GUIDesignHorizontalSeparator
#define GUIDesignViewSettingsVerticalFrame4
#define GUIDesignViewSettingsTabItemBook1
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
#define GUIDesignViewSettingsLabel2
#define GUIDesignViewSettingsTextField1
textFields
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
#define GUIDesignViewSettingsButton1
Buttons.
FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[]
@ GLO_TAZRELDATA
TAZ relation data.
FXString gCurrentFolder
The folder used as last.
std::string time2string(SUMOTime t)
convert SUMOTime to string
@ SUMO_TAG_VIEWSETTINGS_DECAL
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_TIME
trigger: the time of the step
#define UNUSED_PARAMETER(x)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
int getNumInitialSettings() const
Returns the number of initial settings.
void remove(const std::string &name)
Removes the setting with the given name.
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
void writeXML(OutputDevice &dev)
write the settings to the given device
GUIVisualizationTextSettings getSettings()
get settings
FXRealSpinner * mySizeDial
size dial
FXColorWell * myBGColorWell
BGColor well.
void update(const GUIVisualizationTextSettings &settings)
update
FXMatrix * myMatrix0
Matrix.
FXCheckButton * myCheck
check button
FXCheckButton * myConstSizeCheck
const size check
FXColorWell * myColorWell
color well
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
constructor
FXCheckButton * mySelectedCheck
draw only for selected?
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings)
constructor
void update(const GUIVisualizationSizeSettings &settings)
update
GUIVisualizationSizeSettings getSettings()
get settings
The dialog to change the view (gui) settings.
NamePanel * myTLSPhaseNamePanel
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
FXVerticalFrame * myVehicleColorSettingFrame
FXColorWell * mySelectedPersonPlanColor
NamePanel * myJunctionNamePanel
void buildBackgroundFrame(FXTabBook *tabbook)
build frames
FXCheckButton * myDataColorRainbowCheck
FXCheckButton * myVehicleColorInterpolation
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
FXButton * myDataColorRainbow
FXVerticalFrame * myDataColorSettingFrame
NamePanel * myDataValuePanel
FXColorWell * myChargingStationColor
FXCheckButton * myHideMacroConnectors
GUISUMOAbstractView * myParent
FOX need this.
FXMutex * myDecalsLock
Lock used when changing the decals.
FXColorWell * myTransportColor
FXCheckButton * myShowMinGap
NamePanel * myStreetNamePanel
std::vector< FXColorWell * > myPolyColors
FXVerticalFrame * myJunctionColorSettingFrame
void buildSelectionFrame(FXTabBook *tabbook)
FXCheckButton * mySaveDecals
void buildOpenGLFrame(FXTabBook *tabbook)
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
FXVerticalFrame * myContainerColorSettingFrame
FXRealSpinner * myLaneWidthUpscaleDialer
MFXIconComboBox * myPersonShapeDetail
std::vector< FXColorWell * > myPOIColors
FXColorWell * myBusStopColor
additional colors
FXButton * myLaneColorRainbow
MFXIconComboBox * myPOIColorMode
POIs.
std::vector< FXButton * > myLaneScaleButtons
FXColorWell * mySelectedCrossingColor
MFXIconComboBox * myDataColorMode
Data.
FXRealSpinner * myTranshipWidth
FXCheckButton * mySpreadSuperposed
FXCheckButton * myShowBikeMarkings
long onCmdSaveDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
FXCheckButton * myShowSizeLegend
std::vector< FXColorWell * > myPersonColors
NamePanel * myPOITextPanel
std::vector< FXButton * > myDataButtons
std::vector< FXRealSpinner * > myVehicleScales
std::vector< FXRealSpinner * > myPolyThresholds
FXCheckButton * myPOIColorInterpolation
std::vector< GUISUMOAbstractView::Decal > * myDecals
The parent's decals.
std::vector< FXButton * > myContainerButtons
std::vector< FXRealSpinner * > myJunctionThresholds
MFXIconComboBox * myVehicleShapeDetail
FXCheckButton * myVehicleScaleInterpolation
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.
void buildJunctionsFrame(FXTabBook *tabbook)
std::vector< FXRealSpinner * > myPersonThresholds
NamePanel * myTLIndexPanel
NamePanel * myPolyNamePanel
FXButton * myJunctionColorRainbow
FXCheckButton * myShowLinkRules
void show()
show view settings dialog
std::vector< FXButton * > myJunctionButtons
FXColorWell * mySelectedPersonColor
FXColorWell * myPersonTripColor
MFXIconComboBox * myContainerColorMode
Containers.
FXCheckButton * myShowGrid
FXColorWell * mySelectedProhibitionColor
FXCheckButton * myShowBTRange
FXCheckButton * myShowVehicleColorLegend
void buildStreetsFrame(FXTabBook *tabbook)
FXColorWell * myTrainStopColorSign
FXRealSpinner * myTripWidth
demand widths
FXCheckButton * myDrawBoundaries
FXCheckButton * mySaveViewPort
load/save-menu
void buildVehiclesFrame(FXTabBook *tabbook)
MFXIconComboBox * myLaneEdgeColorMode
... lane colorer
FXComboBox * mySchemeName
FXCheckButton * myShowRails
FXCheckButton * myLaneColorRainbowCheck
MFXIconComboBox * myContainerShapeDetail
FXRealSpinner * myTransportWidth
void rebuildDecalsTable()
Rebuilds the decals table.
FXCheckButton * myScaleLength
NamePanel * myAddFullNamePanel
std::vector< FXColorWell * > myJunctionColors
FXRealSpinner * myLaneMinWidthDialer
FXCheckButton * myShowLaneDirection
void saveWindowSize()
save window position and size to the registry
SizePanel * myContainerSizePanel
FXColorWell * myContainerStopColor
FXCheckButton * myPersonColorInterpolation
~GUIDialog_ViewSettings()
Destructor.
FXColorWell * myStopsColor
FXColorWell * mySelectionColor
selection colors
FXVerticalFrame * myLaneScaleSettingFrame
std::vector< FXColorWell * > myVehicleColors
long onCmdLoadDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
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.
MFXIconComboBox * myLaneEdgeScaleMode
... lane scaler
std::vector< FXRealSpinner * > myVehicleThresholds
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXRealSpinner * myWalkWidth
FXCheckButton * myPolyColorInterpolation
std::vector< FXButton * > myPersonButtons
FXColorWell * mySelectedEdgeColor
void loadWindowSize()
load window position and size from the registry
FXCheckButton * myJunctionColorInterpolation
FXRealSpinner * myTazRelationUpscaleDialer
void buildHeader(FXVerticalFrame *contentFrame)
build header
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
FXColorWell * mySelectedVehicleColor
MFXAddEditTypedTable * myDecalsTable
FXColorWell * mySelectedConnectionColor
FXVerticalFrame * myLaneColorSettingFrame
FXCheckButton * myShowColorLegend
NamePanel * myEdgeValuePanel
FXCheckButton * myLaneScaleInterpolation
FXColorWell * myBusStopColorSign
FXColorWell * myWalkColor
void buildDemandFrame(FXTabBook *tabbook)
FXCheckButton * myForceDrawForPositionSelection
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
FXComboBox * myDataParamKey
FXColorWell * myVehicleTripsColor
MFXIconComboBox * myJunctionColorMode
junctions
NamePanel * myContainerNamePanel
NamePanel * myPOINamePanel
NamePanel * myPOITypePanel
NamePanel * myPersonNamePanel
FXColorWell * mySelectedRouteColor
FXVerticalFrame * myVehicleScaleSettingFrame
FXComboBox * myVehicleParamKey
NamePanel * myVehicleScaleValuePanel
FXComboBox * myVehicleTextParamKey
SizePanel * myPersonSizePanel
NamePanel * myPersonValuePanel
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
FXColorWell * mySelectedAdditionalColor
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
void saveDecals(OutputDevice &dev) const
Writes the currently used decals into a file.
FXVerticalFrame * myPolyColorSettingFrame
std::vector< FXRealSpinner * > myLaneScales
NamePanel * myInternalEdgeNamePanel
void loadSettings(const std::string &file)
Loads a scheme from a file.
SizePanel * myAddSizePanel
FXVerticalFrame * myDecalsFrame
long onCmdClearDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be cleared.
std::vector< FXRealSpinner * > myDataThresholds
FXCheckButton * myDataColorInterpolation
MFXIconComboBox * myPersonColorMode
Persons.
FXCheckButton * myDrawCrossingsAndWalkingAreas
std::vector< FXButton * > myLaneButtons
NamePanel * myPolyTypePanel
NamePanel * myJunctionIDPanel
NamePanel * myJunctionIndexPanel
FXCheckButton * myRealisticLinkRules
FXCheckButton * myLaneColorInterpolation
FXVerticalFrame * myPersonColorSettingFrame
void buildContainersFrame(FXTabBook *tabbook)
void buildLegendFrame(FXTabBook *tabbook)
FXButton * myRecalculateBoundaries
FXCheckButton * mySaveDelay
FXColorWell * myStopPersonsColor
std::vector< FXRealSpinner * > myVehicleScaleThresholds
FXCheckButton * myContainerColorInterpolation
std::vector< FXColorWell * > myLaneColors
SizePanel * myVehicleSizePanel
size panels
GUIVisualizationSettings * mySettings
The current settings.
long onCmdDeleteSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be deleted.
FXColorWell * myStopContainersColor
SizePanel * myPOISizePanel
void loadDecals(const std::string &file)
Loads decals from a file.
FXComboBox * myPOITextParamKey
FXVerticalFrame * myPOIColorSettingFrame
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
std::vector< FXColorWell * > myContainerColors
NamePanel * myVehicleTextPanel
FXCheckButton * myForceDrawForRectangleSelection
SizePanel * myPolySizePanel
FXRealSpinner * myPersonTripWidth
NamePanel * myCwaEdgeNamePanel
FXCheckButton * myShowBrakeGap
FXColorWell * myRideColor
std::vector< FXRealSpinner * > myLaneScaleThresholds
FXRealSpinner * myLaneColorRainbowThreshold
FXCheckButton * myDither
openGL
NamePanel * myAddNamePanel
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
std::vector< FXRealSpinner * > myContainerThresholds
void buildPersonsFrame(FXTabBook *tabbook)
void updatePOIParams()
reload known POI parameters
FXColorWell * myTrainStopColor
FXRealSpinner * myRideWidth
FXCheckButton * myShowLane2Lane
buttons
FXRealSpinner * myGridXSizeDialer
std::vector< FXColorWell * > myDataColors
long onCmdEditTable(FXObject *, FXSelector, void *data)
Called if the decals-table was changed.
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
long onCmdSaveSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be saved into the registry.
FXCheckButton * myShowBlinker
void buildAdditionalsFrame(FXTabBook *tabbook)
void buildPOIsFrame(FXTabBook *tabbook)
void buildPolygonsFrame(FXTabBook *tabbook)
void buildDataFrame(FXTabBook *tabbook)
NamePanel * myVehicleNamePanel
NamePanel * myInternalJunctionNamePanel
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
FXCheckButton * myShowSublanes
FXCheckButton * myShowRouteIndex
void buildButtons(FXVerticalFrame *contentFrame)
build buttons
SizePanel * myJunctionSizePanel
FXCheckButton * myShowParkingInfo
FXColorWell * mySelectedLaneColor
MFXIconComboBox * myVehicleScaleMode
vehicle scaler
NamePanel * myVehicleValuePanel
std::vector< FXButton * > myVehicleScaleButtons
FXColorWell * myBackgroundColor
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)
update color ranges
FXCheckButton * mySaveBreakpoints
std::vector< FXRealSpinner * > myLaneThresholds
long onUpdDeleteSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to delete settings.
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)
update scale ranges
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
NamePanel * myTLSPhaseIndexPanel
std::vector< FXButton * > myPOIButtons
MFXIconComboBox * myVehicleColorMode
Vehicles.
FXRealSpinner * myDataColorRainbowThreshold
MFXIconComboBox * myPolyColorMode
Polygons.
FXColorWell * myChargingStationColorSign
NamePanel * myEdgeNamePanel
name panels
FXColorWell * myContainerStopColorSign
FXColorWell * mySelectedEdgeDataColor
FXRealSpinner * myEdgeRelationUpscaleDialer
FXCheckButton * myShowLaneDecals
FXCheckButton * myShowLaneBorders
void updateVehicleParams()
reload known vehicle parameters
std::vector< FXRealSpinner * > myPOIThresholds
std::vector< FXButton * > myPolyButtons
FXRealSpinner * myGridYSizeDialer
FXCheckButton * myDrawJunctionShape
std::vector< FXButton * > myVehicleButtons
FXColorWell * myTranshipColor
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
const std::string & getName() const
const std::vector< double > & getThresholds() const
void setColor(const int pos, const T &color)
void setThreshold(const int pos, const double threshold)
void removeColor(const int pos)
const std::vector< T > & getColors() const
int addColor(const T &color, const double threshold, const std::string &name="")
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
bool isInterpolated() const
const std::vector< std::string > & getNames() const
bool allowsNegativeValues() const
void fill(MFXIconComboBox &cb)
Fills the given combobox with the names of available colorings.
void setActive(int scheme)
virtual std::vector< std::string > getPOIParamKeys() const
return list of available vehicle parameters
void setDelay(double delay)
Sets the delay of the parent application.
virtual std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
double getGridWidth() const
get grid width
double getDelay() const
Returns the delay of the parent application.
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
virtual void recalculateBoundaries()=0
recalculate boundaries
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
double getGridHeight() const
get grid height
void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
FXComboBox * getColoringSchemesCombo()
get coloring schemes combo
virtual bool setColorScheme(const std::string &)
set color scheme
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, bool hide=false, double hideThreshold=0)
recalibrate color scheme according to the current value range
void remove(GUIDialog_EditViewport *)
remove viewport
An XML-handler for visualisation schemes.
double getDelay() const
Returns the parsed delay.
bool hasDecals() const
Returns whether any decals have been parsed.
const std::vector< std::string > & addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
GUIVisualizationTextSettings tlsPhaseIndex
GUIVisualizationTextSettings vehicleName
GUIVisualizationTextSettings junctionName
RGBColor backgroundColor
The background color to use.
GUIVisualizationSizeSettings vehicleSize
GUIVisualizationSizeSettings containerSize
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings internalEdgeName
GUIVisualizationSizeSettings junctionSize
static const std::string SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL
static const double MISSING_DATA
bool drawBoundaries
enable or disable draw boundaries
bool dataValueHideCheck
value below which relation data value should not be rendered
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
GUIScaler laneScaler
The lane scaler.
bool dither
Information whether dithering shall be enabled.
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationTextSettings personValue
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
GUIVisualizationTextSettings poiType
GUIVisualizationSizeSettings addSize
std::string name
The name of this setting.
GUIColorer edgeColorer
The mesoscopic edge colorer.
double edgeValueHideThreshold
int containerQuality
The quality of container drawing.
GUIVisualizationTextSettings internalJunctionName
GUIVisualizationTextSettings vehicleScaleValue
GUIVisualizationSizeSettings poiSize
bool drawJunctionShape
whether the shape of the junction should be drawn
std::string edgeData
key for coloring by edgeData
GUIVisualizationTextSettings dataValue
bool realisticLinkRules
Information whether link rules (colored bars) shall be drawn with a realistic color scheme.
int personQuality
The quality of person drawing.
GUIColorer poiColorer
The POI colorer.
GUIVisualizationWidthSettings widthSettings
width settings
GUIVisualizationTextSettings poiName
bool showParkingInfo
Set whether parking related information should be shown.
GUIVisualizationTextSettings vehicleValue
GUIColorer polyColorer
The polygon colorer.
int vehicleQuality
The quality of vehicle drawing.
GUIVisualizationTextSettings drawLinkJunctionIndex
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings edgeValue
bool fps
Information whether frames-per-second should be drawn.
std::string vehicleParam
key for coloring by vehicle parameter
bool showRails
Information whether rails shall be drawn.
GUIVisualizationSizeSettings personSize
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIVisualizationTextSettings cwaEdgeName
GUIVisualizationTextSettings junctionID
std::string vehicleTextParam
key for rendering vehicle textual parameter
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
GUIVisualizationColorSettings colorSettings
color settings
bool showSublanes
Whether to show sublane boundaries.
bool showGrid
Information whether a grid shall be shown.
bool scaleLength
Whether vehicle length shall be scaled with length/geometry factor.
bool showVehicleColorLegend
Information whether the vehicle color legend shall be drawn.
double edgeRelWidthExaggeration
The edgeRelation exaggeration (upscale thickness)
bool hideConnectors
flag to show or hidde connectors
GUIScaler vehicleScaler
The size scaling settings for vehicles.
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
GUIColorer personColorer
The person colorer.
void save(OutputDevice &dev) const
Writes the settings into an output device.
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
bool netedit
Whether the settings are for Netedit.
bool showLaneDirection
Whether to show direction indicators for lanes.
bool edgeValueHideCheck
value below which edge data value should not be rendered
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
GUIScaler edgeScaler
The mesoscopic edge scaler.
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIVisualizationTextSettings streetName
GUIVisualizationTextSettings poiText
GUIVisualizationTextSettings vehicleText
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
GUIColorer laneColorer
The lane colorer.
GUIVisualizationTextSettings polyName
double tazRelWidthExaggeration
The tazRelation exaggeration (upscale thickness)
bool laneShowBorders
Information whether lane borders shall be drawn.
GUIVisualizationTextSettings tlsPhaseName
GUIVisualizationTextSettings edgeName
bool showSizeLegend
Information whether the size legend shall be drawn.
double laneMinSize
The minimum visual lane width for drawing.
GUIVisualizationTextSettings drawLinkTLIndex
GUIVisualizationTextSettings containerName
GUIVisualizationSizeSettings polySize
GUIColorer containerColorer
The container colorer.
double dataValueHideThreshold
double gridXSize
Information about the grid spacings.
bool showBTRange
Information whether the communication range shall be drawn.
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
GUIVisualizationTextSettings personName
bool showColorLegend
Information whether the edge color legend shall be drawn.
std::string poiTextParam
key for rendering poi textual parameter
bool showRouteIndex
Information whether the route index should be shown.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
std::string relDataAttr
key for coloring by edgeRelation / tazRelation attribute
GUIColorer junctionColorer
The junction colorer.
static const std::string SCHEME_NAME_PARAM_NUMERICAL
std::string edgeParam
key for coloring by edge parameter
bool drawBrakeGap
Information whether the brake gap shall be drawn.
GUIVisualizationTextSettings polyType
int poiDetail
The detail level for drawing POIs.
void setCellType(int pos, CellType t)
void setNumberCellParams(int pos, double min, double max, double steps1, double steps2, double steps3, const std::string &format)
FXString getText() const
Get the text.
FXint getCurrentItem() const
Get the current item's index.
void setCurrentItem(FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
void setNumVisible(FXint nvis)
Set the number of visible items in the drop down list.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Static storage of an output device and its base (abstract) implementation.
void close()
Closes the device and removes it from the dictionary.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
static std::string trim(const std::string s, const std::string &t=" \t\n")
remove leading and trailing whitespace
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
A decal (an image) that can be shown.
double tilt
The tilt of the image to the ground plane (in degrees)
double centerX
The center of the image in x-direction (net coordinates, in m)
double height
The height of the image (net coordinates in y-direction, in m)
double width
The width of the image (net coordinates in x-direction, in m)
bool initialised
Whether this image was initialised (inserted as a texture)
double rot
The rotation of the image in the ground plane (in degrees)
double layer
The layer of the image.
double altitude
The altitude of the image (net coordinates in z-direction, in m)
double centerY
The center of the image in y-direction (net coordinates, in m)
double centerZ
The center of the image in z-direction (net coordinates, in m)
std::string filename
The path to the file the image is located at.
double roll
The roll of the image to the ground plane (in degrees)
bool screenRelative
Whether this image should be skipped in 2D-views.
RGBColor vehicleTripColor
color for vehicle trips
RGBColor selectionColor
basic selection color
RGBColor walkColor
color for walks
RGBColor rideColor
color for rides
RGBColor selectedEdgeColor
edge selection color
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, stopPersons...)
RGBColor stopPersonColor
color for stopPersons
RGBColor selectedCrossingColor
crossings selection color
RGBColor chargingStationColor
color for chargingStations
RGBColor selectedLaneColor
lane selection color
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
RGBColor selectedEdgeDataColor
edge data selection color
RGBColor trainStopColorSign
color for trainStops signs
RGBColor transhipColor
color for tranships
RGBColor containerStopColor
color for containerStops
RGBColor selectedProhibitionColor
prohibition selection color
RGBColor selectedConnectionColor
connection selection color
RGBColor busStopColorSign
color for busStops signs
RGBColor containerStopColorSign
color for containerStop signs
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
RGBColor transportColor
color for transport
RGBColor busStopColor
color for busStops
RGBColor selectedVehicleColor
vehicle selection color
RGBColor selectedPersonColor
person selection color
RGBColor personTripColor
color for stopPersons
RGBColor stopContainerColor
color for containerStops
RGBColor trainStopColor
color for trainStops
RGBColor stopColor
color for Stops
RGBColor chargingStationColorSign
color for chargingStation sign
double exaggeration
The size exaggeration (upscale)
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
double minSize
The minimum size to draw this object.
bool constantSizeSelected
whether only selected objects shall be drawn with constant
RGBColor bgColor
background text color
bool onlySelected
whether only selected objects shall have text drawn
bool constSize
@brif flag to avoid size changes
double tripWidth
width for trips
double transportWidth
width for rides
double walkWidth
width for walks
double personTripWidth
width for person trips
double transhipWidth
width for rides
double rideWidth
width for rides