Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIDialog_ViewSettings.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2023 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
22// The dialog to change the view (gui) settings.
23/****************************************************************************/
24#include <config.h>
25
26#include <fstream>
43
46
47
48// ===========================================================================
49// FOX callback mapping
50// ===========================================================================
51
56
57FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[] = {
61 FXMAPFUNC(SEL_COMMAND, MID_SETTINGS_OK, GUIDialog_ViewSettings::onCmdOk),
63 // settings
72 // decals
77};
78
79FXIMPLEMENT(GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
80FXIMPLEMENT(GUIDialog_ViewSettings::SizePanel, FXObject, GUIDialog_SizeMap, ARRAYNUMBER(GUIDialog_SizeMap))
81
82// ===========================================================================
83// method definitions
84// ===========================================================================
85
87 FXDialogBox(parent, TL("View Settings"), GUIDesignViewSettingsMainDialog),
88 GUIPersistentWindowPos(this, "VIEWSETTINGS", true, 20, 40, 700, 500, 400, 20),
89 myParent(parent),
90 mySettings(settings),
91 myBackup(settings->name, settings->netedit) {
92 // make a backup copy
93 myBackup.copy(*settings);
94 // create content frame
95 FXVerticalFrame* contentFrame = new FXVerticalFrame(this, GUIDesignViewSettingsVerticalFrame1);
96 // build header
97 buildHeader(contentFrame);
98 // create tabbook for every section
99 FXTabBook* tabbook = new FXTabBook(contentFrame, nullptr, 0, GUIDesignViewSettingsTabBook1);
100 // build background frame
101 buildBackgroundFrame(tabbook);
102 // build streets frame
103 buildStreetsFrame(tabbook);
104 // build vehicles frame
105 buildVehiclesFrame(tabbook);
106 // build persons frame
107 buildPersonsFrame(tabbook);
108 // build containers frame
109 buildContainersFrame(tabbook);
110 // build junctions frame
111 buildJunctionsFrame(tabbook);
112 // build additionals frame
113 buildAdditionalsFrame(tabbook);
114 // build demand frame
115 if (mySettings->netedit) {
116 buildDemandFrame(tabbook);
117 }
118 // build POIs frame
119 buildPOIsFrame(tabbook);
120 // build polygons frame
121 buildPolygonsFrame(tabbook);
122 // build selection frame (only in netedit)
123 if (mySettings->netedit) {
124 buildSelectionFrame(tabbook);
125 }
126 // build data frame (only in netedit)
127 if (mySettings->netedit) {
128 buildDataFrame(tabbook);
129 }
130 // build legend frame
131 buildLegendFrame(tabbook);
132 // build 3D frame
133 build3DFrame(tabbook);
134 if (mySettings->netedit) {
135 myFrame3D->disable();
136 }
137 // build openGL frame
138 buildOpenGLFrame(tabbook);
139 // build buttons
140 buildButtons(contentFrame);
141 // rebuild color matrix
142 rebuildColorMatrices(false);
144 loadWindowPos();
145}
146
147
149 myParent->remove(this);
150 // delete name panels
154 delete myTLSPhaseNamePanel;
155 delete myCwaEdgeNamePanel;
156 delete myStreetNamePanel;
157 delete myEdgeValuePanel;
160 delete myTLIndexPanel;
161 delete myJunctionIDPanel;
162 delete myJunctionNamePanel;
163 delete myVehicleNamePanel;
164 delete myVehicleValuePanel;
166 delete myVehicleTextPanel;
167 delete myPersonNamePanel;
168 delete myPersonValuePanel;
169 delete myAddNamePanel;
170 delete myAddFullNamePanel;
171 delete myPOINamePanel;
172 delete myPOITypePanel;
173 delete myPOITextPanel;
174 delete myPolyNamePanel;
175 delete myPolyTypePanel;
176 delete myEdgeNamePanel;
177 delete myDataValuePanel;
179 // delete size panels
180 delete myVehicleSizePanel;
181 delete myPersonSizePanel;
182 delete myJunctionSizePanel;
183 delete myPOISizePanel;
184 delete myPolySizePanel;
185 delete myAddSizePanel;
186}
187
188
189void
191 // update buttons that can be changed externally
192 myShowGrid->setCheck(mySettings->showGrid);
195 // create myNewDecalsTable
196 myDecalsTable->create();
198 FXDialogBox::show();
199}
200
201
206
207
208void
210 mySettings = settings;
211 myBackup.copy(*settings);
212 onCmdNameChange(nullptr, 0, nullptr);
213}
214
215
216long
217GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) {
218 hide();
219 return 1;
220}
221
222
223long
224GUIDialog_ViewSettings::onCmdCancel(FXObject*, FXSelector, void*) {
225 hide();
227 myParent->update();
228 return 1;
229}
230
231
232long
233GUIDialog_ViewSettings::onCmdNameChange(FXObject*, FXSelector, void* ptr) {
234 if (ptr != nullptr) {
235 FXString dataS = (char*) ptr; // !!!unicode
236 // check whether this item has been added twice
237 if (dataS == mySchemeName->getItemText(mySchemeName->getNumItems() - 1)) {
238 for (int i = 0; i < mySchemeName->getNumItems() - 1; ++i) {
239 if (dataS == mySchemeName->getItemText(i)) {
240 mySchemeName->removeItem(i);
241 }
242 }
243 }
244 myBackup.copy(gSchemeStorage.get(dataS.text()));
245 mySettings = &gSchemeStorage.get(dataS.text());
246 }
248
250
259 if (mySettings->netedit) {
270
277
290
297 }
298
306 myShowRails->setCheck(mySettings->showRails);
324
336 /*
337 myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
338 */
344
350
355
365
369
370 myPoiDetail->setValue(mySettings->poiDetail);
375
379
383 myDither->setCheck(mySettings->dither);
384 myFPS->setCheck(mySettings->fps);
393
395 update();
396 myParent->update();
397 return 1;
398}
399
400
401bool
402GUIDialog_ViewSettings::updateColorRanges(FXObject* sender, std::vector<FXColorWell*>::const_iterator colIt,
403 std::vector<FXColorWell*>::const_iterator colEnd,
404 std::vector<FXRealSpinner*>::const_iterator threshIt,
405 std::vector<FXRealSpinner*>::const_iterator threshEnd,
406 std::vector<FXButton*>::const_iterator buttonIt,
407 GUIColorScheme& scheme) {
408 UNUSED_PARAMETER(threshEnd);
409 int pos = 0;
410 while (colIt != colEnd) {
411 if (scheme.isFixed()) {
412 if (sender == *colIt) {
413 scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
414 }
415 } else {
416 if (sender == *threshIt) {
417 const double val = (*threshIt)->getValue();
418 scheme.setThreshold(pos, val);
419 return false;
420 }
421 if (sender == *colIt) {
422 scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
423 return false;
424 }
425 if (sender == *buttonIt) {
426 scheme.addColor(MFXUtils::getRGBColor((*colIt)->getRGBA()), (*threshIt)->getValue());
427 return true;
428 } else if (sender == *(buttonIt + 1)) {
429 scheme.removeColor(pos);
430 return true;
431 }
432 // 2 buttons per item (add / remove)
433 threshIt++;
434 buttonIt += 2;
435 }
436 ++colIt;
437 pos++;
438 }
439 return false;
440}
441
442
443bool
444GUIDialog_ViewSettings::updateScaleRanges(FXObject* sender, std::vector<FXRealSpinner*>::const_iterator scaleIt,
445 std::vector<FXRealSpinner*>::const_iterator scaleEnd,
446 std::vector<FXRealSpinner*>::const_iterator threshIt,
447 std::vector<FXRealSpinner*>::const_iterator threshEnd,
448 std::vector<FXButton*>::const_iterator buttonIt,
449 GUIScaleScheme& scheme) {
450 int pos = 0;
451 while (scaleIt != scaleEnd) {
452 if (scheme.isFixed()) {
453 if (sender == *scaleIt) {
454 scheme.setColor(pos, (*scaleIt)->getValue());
455 }
456 } else {
457 if (sender == *threshIt) {
458 const double val = (*threshIt)->getValue();
459 double lo, hi;
460 if (pos != 0) {
461 threshIt--;
462 (*threshIt)->getRange(lo, hi);
463 (*threshIt)->setRange(lo, val);
464 threshIt++;
465 }
466 threshIt++;
467 if (threshIt != threshEnd) {
468 (*threshIt)->getRange(lo, hi);
469 (*threshIt)->setRange(val, hi);
470 }
471 scheme.setThreshold(pos, val);
472 return false;
473 }
474 if (sender == *scaleIt) {
475 scheme.setColor(pos, (*scaleIt)->getValue());
476 return false;
477 }
478 if (sender == *buttonIt) {
479 scheme.addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
480 return true;
481 } else if (sender == *(buttonIt + 1)) {
482 scheme.removeColor(pos);
483 return true;
484 }
485 threshIt++;
486 buttonIt += 2;
487 }
488 ++scaleIt;
489 pos++;
490 }
491 return false;
492}
493
494
495long
496GUIDialog_ViewSettings::onCmdColorChange(FXObject* sender, FXSelector, void* /*val*/) {
498 tmpSettings.copy(*mySettings);
499 int prevLaneMode = mySettings->getLaneEdgeMode();
500 int prevLaneScaleMode = mySettings->getLaneEdgeScaleMode();
501 int prevVehicleMode = mySettings->vehicleColorer.getActive();
502 int prevVehicleScaleMode = mySettings->vehicleScaler.getActive();
503 int prevPersonMode = mySettings->personColorer.getActive();
504 int prevContainerMode = mySettings->containerColorer.getActive();
505 int prevJunctionMode = mySettings->junctionColorer.getActive();
506 int prevPOIMode = mySettings->poiColorer.getActive();
507 int prevPolyMode = mySettings->polyColorer.getActive();
508 int prevDataMode = mySettings->dataColorer.getActive();
509 bool doRebuildColorMatrices = false;
510
511 tmpSettings.name = mySettings->name;
513
514 // additionals
523 if (mySettings->netedit) {
534
535 tmpSettings.widthSettings.tripWidth = myTripWidth->getValue();
536 tmpSettings.widthSettings.personTripWidth = myPersonTripWidth->getValue();
537 tmpSettings.widthSettings.walkWidth = myWalkWidth->getValue();
538 tmpSettings.widthSettings.rideWidth = myRideWidth->getValue();
539 tmpSettings.widthSettings.transportWidth = myTransportWidth->getValue();
540 tmpSettings.widthSettings.transhipWidth = myTranshipWidth->getValue();
541
554 }
555
556 tmpSettings.showGrid = (myShowGrid->getCheck() != FALSE);
557 tmpSettings.gridXSize = (double) myGridXSizeDialer->getValue();
558 tmpSettings.gridYSize = (double) myGridYSizeDialer->getValue();
559
563 } else {
566 }
567 tmpSettings.laneShowBorders = (myShowLaneBorders->getCheck() != FALSE);
568 tmpSettings.showBikeMarkings = (myShowBikeMarkings->getCheck() != FALSE);
569 tmpSettings.showLinkDecals = (myShowLaneDecals->getCheck() != FALSE);
570 tmpSettings.realisticLinkRules = (myRealisticLinkRules->getCheck() != FALSE);
571 tmpSettings.showLinkRules = (myShowLinkRules->getCheck() != FALSE);
572 tmpSettings.showRails = (myShowRails->getCheck() != FALSE);
573 tmpSettings.secondaryShape = (mySecondaryShape->getCheck() != FALSE);
574 tmpSettings.edgeName = myEdgeNamePanel->getSettings();
578 tmpSettings.edgeValue = myEdgeValuePanel->getSettings();
580 tmpSettings.hideConnectors = (myHideMacroConnectors->getCheck() != FALSE);
581 tmpSettings.showLaneDirection = (myShowLaneDirection->getCheck() != FALSE);
582 tmpSettings.showSublanes = (myShowSublanes->getCheck() != FALSE);
583 tmpSettings.spreadSuperposed = (mySpreadSuperposed->getCheck() != FALSE);
584 if (sender == myParamKey) {
586 tmpSettings.edgeParam = myParamKey->getText().text();
588 tmpSettings.laneParam = myParamKey->getText().text();
590 tmpSettings.edgeData = myParamKey->getText().text();
592 tmpSettings.edgeData = myParamKey->getText().text();
593 }
594 } else if (sender == myScalingParamKey) {
596 tmpSettings.edgeDataScaling = myScalingParamKey->getText().text();
597 }
598 } else if (sender == myVehicleParamKey) {
600 tmpSettings.vehicleParam = myVehicleParamKey->getText().text();
601 }
602 } else if (sender == myDataParamKey) {
604 tmpSettings.relDataAttr = myDataParamKey->getText().text();
605 }
606 } else if (sender == myVehicleTextPanel->myCheck) {
608 } else if (sender == myVehicleTextParamKey) {
609 tmpSettings.vehicleTextParam = myVehicleTextParamKey->getText().text();
610 } else if (sender == myPOITextPanel->myCheck) {
612 } else if (sender == myPOITextParamKey) {
613 tmpSettings.poiTextParam = myPOITextParamKey->getText().text();
614 } else if (sender == myMeanDataID) {
615 tmpSettings.edgeDataID = myMeanDataID->getText().text();
616 }
617 tmpSettings.edgeValueHideCheck = (myLaneColorRainbowCheck->getCheck() != FALSE);
618 tmpSettings.edgeValueHideThreshold = myLaneColorRainbowThreshold->getValue();
619 tmpSettings.edgeValueHideCheck2 = (myLaneColorRainbowCheck2->getCheck() != FALSE);
621 tmpSettings.laneWidthExaggeration = myLaneWidthUpscaleDialer->getValue();
622 tmpSettings.laneMinSize = myLaneMinWidthDialer->getValue();
623
627 tmpSettings.showBlinker = (myShowBlinker->getCheck() != FALSE);
628 tmpSettings.drawMinGap = (myShowMinGap->getCheck() != FALSE);
629 tmpSettings.drawBrakeGap = (myShowBrakeGap->getCheck() != FALSE);
630 tmpSettings.showBTRange = (myShowBTRange->getCheck() != FALSE);
631 tmpSettings.showRouteIndex = (myShowRouteIndex->getCheck() != FALSE);
632 tmpSettings.scaleLength = (myScaleLength->getCheck() != FALSE);
633 tmpSettings.drawReversed = (myDrawReversed->getCheck() != FALSE);
634 tmpSettings.showParkingInfo = (myShowParkingInfo->getCheck() != FALSE);
635 /*
636 tmpSettings.drawLaneChangePreference = (myShowLaneChangePreference->getCheck() != FALSE);
637 */
643
649
654
664
665 tmpSettings.addName = myAddNamePanel->getSettings();
667 tmpSettings.addSize = myAddSizePanel->getSettings();
668
670 tmpSettings.poiDetail = myPoiDetail->getValue();
671 tmpSettings.poiName = myPOINamePanel->getSettings();
672 tmpSettings.poiType = myPOITypePanel->getSettings();
673 tmpSettings.poiText = myPOITextPanel->getSettings();
674 tmpSettings.poiSize = myPOISizePanel->getSettings();
675
677 tmpSettings.polyName = myPolyNamePanel->getSettings();
678 tmpSettings.polyType = myPolyTypePanel->getSettings();
679 tmpSettings.polySize = myPolySizePanel->getSettings();
680
681 if (mySettings->netedit) {
682 tmpSettings.dataValue = myDataValuePanel->getSettings();
684 tmpSettings.dataValue = myDataValuePanel->getSettings();
685 tmpSettings.tazRelWidthExaggeration = myTazRelationUpscaleDialer->getValue();
687 tmpSettings.dataValueHideCheck = (myDataColorRainbowCheck->getCheck() != FALSE);
688 tmpSettings.dataValueHideThreshold = myDataColorRainbowThreshold->getValue();
689 }
690
691 tmpSettings.showLane2Lane = (myShowLane2Lane->getCheck() != FALSE);
692 tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE);
693 tmpSettings.drawCrossingsAndWalkingareas = (myDrawCrossingsAndWalkingAreas->getCheck() != FALSE);
694 tmpSettings.dither = (myDither->getCheck() != FALSE);
695 tmpSettings.fps = (myFPS->getCheck() != FALSE);
696 tmpSettings.drawBoundaries = (myDrawBoundaries->getCheck() != FALSE);
697 tmpSettings.forceDrawForPositionSelection = (myForceDrawForPositionSelection->getCheck() != FALSE);
698 tmpSettings.forceDrawForRectangleSelection = (myForceDrawForRectangleSelection->getCheck() != FALSE);
699 tmpSettings.disableDottedContours = (myDisableDottedContours->getCheck() != FALSE);
701 tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE);
702 tmpSettings.showColorLegend = (myShowColorLegend->getCheck() != FALSE);
703 tmpSettings.showVehicleColorLegend = (myShowVehicleColorLegend->getCheck() != FALSE);
704 tmpSettings.show3DTLSDomes = (myShow3DTLSDomes->getCheck() != FALSE);
705 tmpSettings.show3DTLSLinkMarkers = (myShow3DTLSLinkMarkers->getCheck() != FALSE);
706 tmpSettings.show3DHeadUpDisplay = (myShow3DHeadUpDisplay->getCheck() != FALSE);
707 tmpSettings.generate3DTLSModels = (myGenerate3DTLSModels->getCheck() != FALSE);
708 const unsigned char lightFactor = (unsigned char)myLight3DFactor->getValue();
709 tmpSettings.ambient3DLight.set(lightFactor / 2, lightFactor / 2, lightFactor / 2, 255);
710 tmpSettings.diffuse3DLight.set(lightFactor, lightFactor, lightFactor, 255);
711 tmpSettings.skyColor = MFXUtils::getRGBColor(mySkyColor->getRGBA());
712
713 // lanes (colors)
714 if (sender == myLaneColorRainbow) {
715 myParent->buildColorRainbow(tmpSettings, tmpSettings.getLaneEdgeScheme(), tmpSettings.getLaneEdgeMode(), GLO_LANE,
716 myLaneColorRainbowCheck->getCheck() != FALSE, myLaneColorRainbowThreshold->getValue(),
717 myLaneColorRainbowCheck2->getCheck() != FALSE, myLaneColorRainbowThreshold2->getValue());
718 doRebuildColorMatrices = true;
719 } else if (sender == myJunctionColorRainbow) {
720 myParent->buildColorRainbow(tmpSettings, tmpSettings.junctionColorer.getScheme(), tmpSettings.junctionColorer.getActive(), GLO_JUNCTION);
721 doRebuildColorMatrices = true;
722 } else if (sender == myDataColorRainbow) {
723 myParent->buildColorRainbow(tmpSettings, tmpSettings.dataColorer.getScheme(), tmpSettings.dataColorer.getActive(), GLO_TAZRELDATA,
724 myDataColorRainbowCheck->getCheck() != FALSE, myDataColorRainbowThreshold->getValue());
725 doRebuildColorMatrices = true;
726 }
727 if (tmpSettings.getLaneEdgeMode() == prevLaneMode) {
728 if (updateColorRanges(sender, myLaneColors.begin(), myLaneColors.end(),
729 myLaneThresholds.begin(), myLaneThresholds.end(), myLaneButtons.begin(),
730 tmpSettings.getLaneEdgeScheme())) {
731 doRebuildColorMatrices = true;
732 }
733 if (sender == myLaneColorInterpolation) {
734 tmpSettings.getLaneEdgeScheme().setInterpolated(myLaneColorInterpolation->getCheck() != FALSE);
735 doRebuildColorMatrices = true;
736 }
737 } else {
738 doRebuildColorMatrices = true;
739 }
740 // lanes (scaling)
741 if (tmpSettings.getLaneEdgeScaleMode() == prevLaneScaleMode) {
742 if (updateScaleRanges(sender, myLaneScales.begin(), myLaneScales.end(),
744 tmpSettings.getLaneEdgeScaleScheme())) {
745 doRebuildColorMatrices = true;
746 }
747 if (sender == myLaneScaleInterpolation) {
748 tmpSettings.getLaneEdgeScaleScheme().setInterpolated(myLaneScaleInterpolation->getCheck() != FALSE);
749 doRebuildColorMatrices = true;
750 }
751 } else {
752 doRebuildColorMatrices = true;
753 }
754 // vehicles
755 if (tmpSettings.vehicleColorer.getActive() == prevVehicleMode) {
756 if (updateColorRanges(sender, myVehicleColors.begin(), myVehicleColors.end(),
758 tmpSettings.vehicleColorer.getScheme())) {
759 doRebuildColorMatrices = true;
760 }
761 if (sender == myVehicleColorInterpolation) {
762 tmpSettings.vehicleColorer.getScheme().setInterpolated(myVehicleColorInterpolation->getCheck() != FALSE);
763 doRebuildColorMatrices = true;
764 }
765 } else {
766 doRebuildColorMatrices = true;
767 }
768 // vehicles (scaling)
769 if (tmpSettings.vehicleScaler.getActive() == prevVehicleScaleMode) {
770 if (updateScaleRanges(sender, myVehicleScales.begin(), myVehicleScales.end(),
772 tmpSettings.vehicleScaler.getScheme())) {
773 doRebuildColorMatrices = true;
774 }
775 if (sender == myVehicleScaleInterpolation) {
776 tmpSettings.vehicleScaler.getScheme().setInterpolated(myVehicleScaleInterpolation->getCheck() != FALSE);
777 doRebuildColorMatrices = true;
778 }
779 } else {
780 doRebuildColorMatrices = true;
781 }
782 // persons
783 if (tmpSettings.personColorer.getActive() == prevPersonMode) {
784 if (updateColorRanges(sender, myPersonColors.begin(), myPersonColors.end(),
786 tmpSettings.personColorer.getScheme())) {
787 doRebuildColorMatrices = true;
788 }
789 if (sender == myPersonColorInterpolation) {
790 tmpSettings.personColorer.getScheme().setInterpolated(myPersonColorInterpolation->getCheck() != FALSE);
791 doRebuildColorMatrices = true;
792 }
793 } else {
794 doRebuildColorMatrices = true;
795 }
796 // containers
797 if (tmpSettings.containerColorer.getActive() == prevContainerMode) {
798 if (updateColorRanges(sender, myContainerColors.begin(), myContainerColors.end(),
800 tmpSettings.containerColorer.getScheme())) {
801 doRebuildColorMatrices = true;
802 }
803 if (sender == myContainerColorInterpolation) {
805 doRebuildColorMatrices = true;
806 }
807 } else {
808 doRebuildColorMatrices = true;
809 }
810 // junctions
811 if (tmpSettings.junctionColorer.getActive() == prevJunctionMode) {
812 if (updateColorRanges(sender, myJunctionColors.begin(), myJunctionColors.end(),
814 tmpSettings.junctionColorer.getScheme())) {
815 doRebuildColorMatrices = true;
816 }
817 if (sender == myJunctionColorInterpolation) {
818 tmpSettings.junctionColorer.getScheme().setInterpolated(myJunctionColorInterpolation->getCheck() != FALSE);
819 doRebuildColorMatrices = true;
820 }
821 } else {
822 doRebuildColorMatrices = true;
823 }
824 // POIs
825 if (tmpSettings.poiColorer.getActive() == prevPOIMode) {
826 if (updateColorRanges(sender, myPOIColors.begin(), myPOIColors.end(),
827 myPOIThresholds.begin(), myPOIThresholds.end(), myPOIButtons.begin(),
828 tmpSettings.poiColorer.getScheme())) {
829 doRebuildColorMatrices = true;
830 }
831 if (sender == myPOIColorInterpolation) {
832 tmpSettings.poiColorer.getScheme().setInterpolated(myPOIColorInterpolation->getCheck() != FALSE);
833 doRebuildColorMatrices = true;
834 }
835 } else {
836 doRebuildColorMatrices = true;
837 }
838 // polygons
839 if (tmpSettings.polyColorer.getActive() == prevPolyMode) {
840 if (updateColorRanges(sender, myPolyColors.begin(), myPolyColors.end(),
841 myPolyThresholds.begin(), myPolyThresholds.end(), myPolyButtons.begin(),
842 tmpSettings.polyColorer.getScheme())) {
843 doRebuildColorMatrices = true;
844 }
845 if (sender == myPolyColorInterpolation) {
846 tmpSettings.polyColorer.getScheme().setInterpolated(myPolyColorInterpolation->getCheck() != FALSE);
847 doRebuildColorMatrices = true;
848 }
849 } else {
850 doRebuildColorMatrices = true;
851 }
852 // data
853 if (tmpSettings.netedit) {
854 if (tmpSettings.dataColorer.getActive() == prevDataMode) {
855 if (updateColorRanges(sender, myDataColors.begin(), myDataColors.end(),
856 myDataThresholds.begin(), myDataThresholds.end(), myDataButtons.begin(),
857 tmpSettings.dataColorer.getScheme())) {
858 doRebuildColorMatrices = true;
859 }
860 if (sender == myDataColorInterpolation) {
861 tmpSettings.dataColorer.getScheme().setInterpolated(myDataColorInterpolation->getCheck() != FALSE);
862 doRebuildColorMatrices = true;
863 }
864 } else {
865 doRebuildColorMatrices = true;
866 }
867 }
868 // openGL
869 if (sender == myRecalculateBoundaries) {
871 }
872
873 if (tmpSettings == *mySettings) {
874 return 1;
875 }
876
877 int index = mySchemeName->getCurrentItem();
878 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
879 // one of the initial settings is modified
880 // every time this happens we create a new scheme
881 int suffix = 1;
882 while (gSchemeStorage.contains("custom_" + toString(suffix))) {
883 suffix++;
884 }
885 tmpSettings.name = "custom_" + toString(suffix);
886 // the newly created settings must be entered in several places:
887 // - the comboBox mySchemeName of this dialog
888 // - the comboBox of the parent view (set as active)
889 // - the comboBox of all other views (only append) XXX @todo
890 index = mySchemeName->appendItem(tmpSettings.name.c_str());
891 mySchemeName->setCurrentItem(index);
892 myParent->getColoringSchemesCombo()->appendItem(tmpSettings.name.c_str());
893 }
894 myParent->getColoringSchemesCombo()->setCurrentItem(
895 myParent->getColoringSchemesCombo()->findItem(tmpSettings.name.c_str()));
896 gSchemeStorage.add(tmpSettings); // overwrites existing
897 mySettings = &gSchemeStorage.get(tmpSettings.name);
898 myParent->setColorScheme(tmpSettings.name);
899
900 if (doRebuildColorMatrices) {
902 }
903 myParent->handle(this, FXSEL(SEL_CHANGED, MID_SIMPLE_VIEW_COLORCHANGE), nullptr);
904 myParent->forceRefresh();
905 getApp()->forceRefresh();
906 return 1;
907}
908
909
910void
911GUIDialog_ViewSettings::loadSettings(const std::string& file) {
912 GUISettingsHandler handler(file, true, mySettings->netedit);
913 for (std::string settingsName : handler.addSettings(myParent)) {
914 FXint index = mySchemeName->appendItem(settingsName.c_str());
915 mySchemeName->setCurrentItem(index);
916 mySettings = &gSchemeStorage.get(settingsName);
917 }
918 if (handler.hasDecals()) {
920 myParent->getDecals() = handler.getDecals();
922 myParent->update();
923 myParent->getDecalsLockMutex().unlock();
924 }
925 if (handler.getDelay() >= 0) {
926 myParent->setDelay(handler.getDelay());
927 }
928 if (handler.getBreakpoints().size() > 0) {
930 }
931 handler.applyViewport(myParent);
933}
934
935
936void
938 for (const auto& decal : myParent->getDecals()) {
939 // only save decals with non empty filename
940 if (decal.filename.size() > 0) {
941 // check if decal is a light
942 const bool isLight = (decal.filename.substr(0, 5) == "light") && (decal.filename.length() == 6) && isdigit(decal.filename[5]);
943 if (isLight) {
945 dev.writeAttr(SUMO_ATTR_INDEX, decal.filename.substr(5, 1));
946 } else {
948 dev.writeAttr("file", decal.filename);
949 dev.writeAttr("screenRelative", decal.screenRelative);
950 }
951 dev.writeAttr(SUMO_ATTR_CENTER_X, decal.centerX);
952 dev.writeAttr(SUMO_ATTR_CENTER_Y, decal.centerY);
953 dev.writeAttr(SUMO_ATTR_CENTER_Z, decal.centerZ);
954 dev.writeAttr(SUMO_ATTR_WIDTH, decal.width);
955 dev.writeAttr(SUMO_ATTR_HEIGHT, decal.height);
956 dev.writeAttr("altitude", decal.altitude);
957 dev.writeAttr("rotation", decal.rot);
958 dev.writeAttr("tilt", decal.tilt);
959 dev.writeAttr("roll", decal.roll);
960 dev.writeAttr(SUMO_ATTR_LAYER, decal.layer);
961 dev.closeTag();
962 }
963 }
964}
965
966
967void
968GUIDialog_ViewSettings::loadDecals(const std::string& file) {
970 GUISettingsHandler handler(file);
971 if (handler.hasDecals()) {
972 myParent->getDecals() = handler.getDecals();
973 }
975 myParent->update();
976 myParent->getDecalsLockMutex().unlock();
977}
978
979
980long
981GUIDialog_ViewSettings::onCmdSaveSetting(FXObject*, FXSelector, void* /*data*/) {
982 int index = mySchemeName->getCurrentItem();
983 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
984 return 1;
985 }
986 // get the name
987 std::string name = "";
988 while (name.length() == 0) {
989 FXDialogBox dialog(this, TL("Enter a name"), GUIDesignViewSettingsDialog);
990 FXVerticalFrame* content = new FXVerticalFrame(&dialog, GUIDesignViewSettingsVerticalFrame5);
991 new FXLabel(content, TL("Please enter an alphanumeric name: "), nullptr, GUIDesignViewSettingsLabel2);
992 FXTextField* text = new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsTextField1);
993 new FXHorizontalSeparator(content, GUIDesignHorizontalSeparator);
994 FXHorizontalFrame* buttons = new FXHorizontalFrame(content, GUIDesignViewSettingsHorizontalFrame3);
995 new FXButton(buttons, TL("&OK"), nullptr, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsButton4);
996 new FXButton(buttons, TL("&Cancel"), nullptr, &dialog, FXDialogBox::ID_CANCEL, GUIDesignViewSettingsButton5);
997 dialog.create();
998 text->setFocus();
999 if (!dialog.execute()) {
1000 return 1;
1001 }
1002 name = text->getText().text();
1003 for (int i = 0; i < (int)name.length(); ++i) {
1004 if (name[i] != '_' && (name[i] < 'a' || name[i] > 'z') && (name[i] < 'A' || name[i] > 'Z') && (name[i] < '0' || name[i] > '9')) {
1005 name = "";
1006 break;
1007 }
1008 }
1009 }
1011 tmpSettings.copy(*mySettings);
1012 tmpSettings.name = name;
1013 if (name == mySettings->name || StringUtils::startsWith(mySettings->name, "custom_")) {
1015 myParent->getColoringSchemesCombo()->setItemText(index, name.c_str());
1016 } else {
1018 index = mySchemeName->appendItem(name.c_str());
1019 myParent->getColoringSchemesCombo()->appendItem(name.c_str());
1020 myParent->getColoringSchemesCombo()->setCurrentItem(
1021 myParent->getColoringSchemesCombo()->findItem(name.c_str()));
1022 }
1023 gSchemeStorage.add(tmpSettings);
1024 mySchemeName->setItemText(index, name.c_str());
1025 myParent->setColorScheme(name);
1026 mySettings = &gSchemeStorage.get(name);
1028 gSchemeStorage.writeSettings(getApp());
1029 return 1;
1030}
1031
1032
1033long
1034GUIDialog_ViewSettings::onUpdSaveSetting(FXObject* sender, FXSelector, void* ptr) {
1035 sender->handle(this,
1036 mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1037 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1038 ptr);
1039 return 1;
1040}
1041
1042
1043long
1044GUIDialog_ViewSettings::onCmdDeleteSetting(FXObject*, FXSelector, void* /*data*/) {
1045 int index = mySchemeName->getCurrentItem();
1046 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1047 return 1;
1048 }
1049 std::string name = mySchemeName->getItem(index).text();
1050 gSchemeStorage.remove(name);
1051 mySchemeName->removeItem(index);
1052 onCmdNameChange(nullptr, 0, (void*) mySchemeName->getItem(0).text());
1053 gSchemeStorage.writeSettings(getApp());
1054 return 1;
1055}
1056
1057
1058long
1059GUIDialog_ViewSettings::onUpdDeleteSetting(FXObject* sender, FXSelector, void* ptr) {
1060 sender->handle(this,
1061 mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1062 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1063 ptr);
1064 return 1;
1065}
1066
1067
1068long
1069GUIDialog_ViewSettings::onCmdExportSetting(FXObject*, FXSelector, void* /*data*/) {
1070 FXString file = MFXUtils::getFilename2Write(this, TL("Export view settings"), ".xml", GUIIconSubSys::getIcon(GUIIcon::SAVE), gCurrentFolder);
1071 if (file == "") {
1072 return 1;
1073 }
1074 try {
1075 OutputDevice& dev = OutputDevice::getDevice(file.text(), false);
1077 if (myParent->is3DView()) {
1078 dev.writeAttr(SUMO_ATTR_TYPE, "osg");
1079 }
1080 mySettings->save(dev);
1081 if (mySaveViewPort->getCheck()) {
1083 }
1084 if (mySaveDelay->getCheck()) {
1087 dev.closeTag();
1088 }
1089 if (mySaveDecals->getCheck()) {
1090 saveDecals(dev);
1091 }
1092 if (!mySettings->netedit && mySaveBreakpoints->getCheck()) {
1096 dev.closeTag();
1097 }
1098 }
1099 dev.closeTag();
1100 dev.close();
1101 } catch (IOError& e) {
1102 FXMessageBox::error(this, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1103 }
1104 return 1;
1105}
1106
1107
1108long
1109GUIDialog_ViewSettings::onUpdExportSetting(FXObject* sender, FXSelector, void* ptr) {
1110 sender->handle(this,
1111 (mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1112 && !mySaveViewPort->getCheck() && !mySaveDelay->getCheck() && !mySaveDecals->getCheck() && !mySaveBreakpoints->getCheck()) ?
1113 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1114 ptr);
1115 return 1;
1116}
1117
1118
1119long
1120GUIDialog_ViewSettings::onCmdImportSetting(FXObject*, FXSelector, void* /*data*/) {
1121 FXFileDialog opendialog(this, TL("Import view settings"));
1122 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::OPEN));
1123 opendialog.setSelectMode(SELECTFILE_ANY);
1124 opendialog.setPatternList("*.xml,*.xml.gz");
1125 if (gCurrentFolder.length() != 0) {
1126 opendialog.setDirectory(gCurrentFolder);
1127 }
1128 if (opendialog.execute()) {
1129 gCurrentFolder = opendialog.getDirectory();
1130 loadSettings(opendialog.getFilename().text());
1131 }
1132 return 1;
1133}
1134
1135
1136long
1137GUIDialog_ViewSettings::onCmdLoadDecal(FXObject*, FXSelector, void* /*data*/) {
1138 FXFileDialog opendialog(this, TL("Load Decals"));
1139 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1140 opendialog.setSelectMode(SELECTFILE_ANY);
1141 opendialog.setPatternList("*.xml,*.xml.gz");
1142 if (gCurrentFolder.length() != 0) {
1143 opendialog.setDirectory(gCurrentFolder);
1144 }
1145 if (opendialog.execute()) {
1146 gCurrentFolder = opendialog.getDirectory();
1147 loadDecals(opendialog.getFilename().text());
1148 }
1149 return 1;
1150}
1151
1152
1153long
1154GUIDialog_ViewSettings::onCmdLoadXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1155 FXFileDialog opendialog(this, TL("Load Decals"));
1156 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1157 opendialog.setSelectMode(SELECTFILE_ANY);
1158 opendialog.setPatternList("*.xml,*.xml.gz");
1159 if (gCurrentFolder.length() != 0) {
1160 opendialog.setDirectory(gCurrentFolder);
1161 }
1162 if (opendialog.execute()) {
1163 gCurrentFolder = opendialog.getDirectory();
1164 loadDecals(opendialog.getFilename().text());
1165 }
1166 return 1;
1167}
1168
1169
1170long
1171GUIDialog_ViewSettings::onCmdSaveXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1172 FXString file = MFXUtils::getFilename2Write(this, TL("Save Decals"), ".xml", GUIIconSubSys::getIcon(GUIIcon::EMPTY), gCurrentFolder);
1173 if (file == "") {
1174 return 1;
1175 }
1176 try {
1177 OutputDevice& dev = OutputDevice::getDevice(file.text());
1178 dev.openTag("decals");
1179 saveDecals(dev);
1180 dev.closeTag();
1181 dev.close();
1182 } catch (IOError& e) {
1183 FXMessageBox::error(myParent, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1184 }
1185 return 1;
1186}
1187
1188
1189long
1190GUIDialog_ViewSettings::onCmdClearDecals(FXObject*, FXSelector, void* /*data*/) {
1191 // lock decals mutex
1192 myParent->getDecalsLockMutex().lock();
1193 // clear decals
1194 myParent->getDecals().clear();
1195 // update view
1196 myParent->update();
1197 // fill table again
1199 // unlock decals mutex
1200 myParent->getDecalsLockMutex().unlock();
1201 return 1;
1202}
1203
1204
1205long
1206GUIDialog_ViewSettings::onUpdImportSetting(FXObject* sender, FXSelector, void* ptr) {
1207 sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1208 return 1;
1209}
1210
1211
1212FXMatrix*
1214 std::vector<FXColorWell*>& colors,
1215 std::vector<FXRealSpinner*>& thresholds,
1216 std::vector<FXButton*>& buttons,
1217 FXCheckButton* interpolation,
1218 GUIColorScheme& scheme) {
1220 FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1221 colors.clear();
1222 thresholds.clear();
1223 buttons.clear();
1224 const bool fixed = scheme.isFixed();
1225 std::vector<RGBColor>::const_iterator colIt = scheme.getColors().begin();
1226 std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1227 std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1228 while (colIt != scheme.getColors().end()) {
1229 colors.push_back(new FXColorWell(m, MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1));
1230 if (fixed) {
1231 new FXLabel(m, nameIt->c_str());
1232 new FXLabel(m, "");
1233 new FXLabel(m, "");
1234 } else {
1235 const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1236 FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1237 threshDialer->setValue(*threshIt);
1238 thresholds.push_back(threshDialer);
1239 if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1240 threshDialer->disable();
1241 threshDialer->hide();
1242 buttons.push_back(new FXButton(m, "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1243 buttons.back()->hide();
1244 buttons.push_back(new FXButton(m, TL("No Data"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1245 buttons.back()->disable();
1246 } else {
1247 buttons.push_back(new FXButton(m, TL("Add"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1248 buttons.push_back(new FXButton(m, TL("Remove"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1249 }
1250 }
1251 colIt++;
1252 threshIt++;
1253 nameIt++;
1254 }
1255 interpolation->setCheck(scheme.isInterpolated());
1256 if (fixed) {
1257 interpolation->disable();
1258 } else {
1259 if (colors.size() > 1) {
1260 interpolation->enable();
1261 if (interpolation->getCheck() != FALSE) {
1262 thresholds.front()->enable();
1263 } else {
1264 thresholds.front()->disable();
1265 }
1266 } else {
1267 interpolation->disable();
1268 thresholds.front()->disable();
1269 }
1270 }
1271 return m;
1272}
1273
1274
1275FXMatrix*
1277 std::vector<FXRealSpinner*>& scales,
1278 std::vector<FXRealSpinner*>& thresholds,
1279 std::vector<FXButton*>& buttons,
1280 FXCheckButton* interpolation,
1281 GUIScaleScheme& scheme) {
1283 FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1284 scales.clear();
1285 thresholds.clear();
1286 buttons.clear();
1287 const bool fixed = scheme.isFixed();
1288 std::vector<double>::const_iterator scaleIt = scheme.getColors().begin();
1289 std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1290 std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1291 while (scaleIt != scheme.getColors().end()) {
1292 FXRealSpinner* scaleDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX);
1293 scaleDialer->setValue(*scaleIt);
1294 scales.push_back(scaleDialer);
1295 if (fixed) {
1296 new FXLabel(m, nameIt->c_str());
1297 new FXLabel(m, "");
1298 new FXLabel(m, "");
1299 } else {
1300 const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1301 FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1302 threshDialer->setValue(*threshIt);
1303 thresholds.push_back(threshDialer);
1304 if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1305 threshDialer->disable();
1306 threshDialer->hide();
1307 buttons.push_back(new FXButton(m, "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1308 buttons.back()->hide();
1309 buttons.push_back(new FXButton(m, TL("No Data"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1310 buttons.back()->disable();
1311 } else {
1312 buttons.push_back(new FXButton(m, TL("Add"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1313 buttons.push_back(new FXButton(m, TL("Remove"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1314 }
1315 }
1316 scaleIt++;
1317 threshIt++;
1318 nameIt++;
1319 }
1320 interpolation->setCheck(scheme.isInterpolated());
1321 if (fixed) {
1322 interpolation->disable();
1323 } else {
1324 if (scales.size() > 1) {
1325 interpolation->enable();
1326 if (interpolation->getCheck() != FALSE) {
1327 thresholds.front()->enable();
1328 } else {
1329 thresholds.front()->disable();
1330 }
1331 } else {
1332 interpolation->disable();
1333 thresholds.front()->disable();
1334 }
1335 }
1336 return m;
1337}
1338
1339
1340void
1343 if (doCreate) {
1344 m->create();
1345 }
1347 myLaneColorRainbow->disable();
1348 } else {
1349 myLaneColorRainbow->enable();
1350 }
1352 myJunctionColorRainbow->disable();
1353 } else {
1354 myJunctionColorRainbow->enable();
1355 }
1356 std::string activeSchemeName = myLaneEdgeColorMode->getText().text();
1357 std::string activeScaleSchemeName = myLaneEdgeScaleMode->getText().text();
1358 myParamKey->clearItems();
1359 myScalingParamKey->clearItems();
1360 myMeanDataID->clearItems();
1361 myMeanDataID->hide();
1363 myParamKey->appendItem(mySettings->edgeParam.c_str());
1364 for (const std::string& attr : myParent->getEdgeLaneParamKeys(true)) {
1365 if (attr != mySettings->edgeParam) {
1366 myParamKey->appendItem(attr.c_str());
1367 }
1368 }
1369 myParamKey->enable();
1370 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) {
1371 myParamKey->appendItem(mySettings->laneParam.c_str());
1372 for (const std::string& attr : myParent->getEdgeLaneParamKeys(false)) {
1373 if (attr != mySettings->laneParam) {
1374 myParamKey->appendItem(attr.c_str());
1375 }
1376 }
1377 myParamKey->enable();
1378 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1379 myParamKey->appendItem(mySettings->edgeData.c_str());
1380 for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1381 if (attr != mySettings->edgeData) {
1382 myParamKey->appendItem(attr.c_str());
1383 }
1384 }
1385 myParamKey->enable();
1386 myParamKey->setEditable(false);
1387 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_LIVE) {
1388 if (mySettings->edgeDataID != "") {
1389 myMeanDataID->appendItem(mySettings->edgeDataID.c_str());
1390 }
1391 for (const std::string& attr : myParent->getMeanDataIDs()) {
1392 if (attr != mySettings->edgeDataID) {
1393 myMeanDataID->appendItem(attr.c_str());
1394 }
1395 }
1396 if (myMeanDataID->getNumItems() > 0) {
1397 if (mySettings->edgeDataID == "") {
1398 mySettings->edgeDataID = myMeanDataID->getItemText(0).text();
1399 }
1400 myMeanDataID->enable();
1401 myMeanDataID->setEditable(false);
1402 myMeanDataID->show();
1403 myMeanDataID->setNumVisible(myMeanDataID->getNumItems());
1404 myParamKey->appendItem(mySettings->edgeData.c_str());
1405 for (const std::string& attr : myParent->getMeanDataAttrs(mySettings->edgeDataID)) {
1406 if (attr != mySettings->edgeData) {
1407 myParamKey->appendItem(attr.c_str());
1408 }
1409 }
1410 myParamKey->enable();
1411 myParamKey->setEditable(false);
1412 }
1413 } else {
1414 myParamKey->disable();
1415 }
1416
1417 if (activeScaleSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1418 myScalingParamKey->appendItem(mySettings->edgeDataScaling.c_str());
1419 for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1420 if (attr != mySettings->edgeDataScaling) {
1421 myScalingParamKey->appendItem(attr.c_str());
1422 }
1423 }
1424 myScalingParamKey->enable();
1425 myScalingParamKey->setEditable(false);
1426 } else {
1427 myScalingParamKey->disable();
1428 }
1429
1430 myParamKey->setNumVisible(myParamKey->getNumItems());
1431 myScalingParamKey->setNumVisible(myScalingParamKey->getNumItems());
1432 myLaneColorSettingFrame->getParent()->recalc();
1433
1435 if (doCreate) {
1436 m->create();
1437 }
1438 myLaneScaleSettingFrame->getParent()->recalc();
1439
1441 if (doCreate) {
1442 m->create();
1443 }
1444 activeSchemeName = myVehicleColorMode->getText().text();
1445 myVehicleParamKey->setEditable(true);
1448 myVehicleParamKey->enable();
1449 } else {
1450 myVehicleParamKey->disable();
1451 }
1452 myVehicleColorSettingFrame->getParent()->recalc();
1453
1455 if (doCreate) {
1456 m->create();
1457 }
1458 myVehicleScaleSettingFrame->getParent()->recalc();
1459
1461 if (doCreate) {
1462 m->create();
1463 }
1464 myPersonColorSettingFrame->getParent()->recalc();
1466 if (doCreate) {
1467 m->create();
1468 }
1469 myContainerColorSettingFrame->getParent()->recalc();
1471 if (doCreate) {
1472 m->create();
1473 }
1474 myJunctionColorSettingFrame->getParent()->recalc();
1475 // POIs
1477 if (doCreate) {
1478 m->create();
1479 }
1480 myPOIColorSettingFrame->getParent()->recalc();
1481 // polygons
1483 if (doCreate) {
1484 m->create();
1485 }
1486 myPolyColorSettingFrame->getParent()->recalc();
1487
1488 // data
1489 if (mySettings->netedit) {
1491 if (doCreate) {
1492 m->create();
1493 }
1494 activeSchemeName = myDataColorMode->getText().text();
1495 myDataParamKey->setEditable(true);
1497 myDataParamKey->clearItems();
1498 myDataParamKey->appendItem(mySettings->relDataAttr.c_str());
1499 for (const std::string& attr : myParent->getRelDataAttrs()) {
1500 if (attr != mySettings->relDataAttr) {
1501 myDataParamKey->appendItem(attr.c_str());
1502 }
1503 }
1504 myDataParamKey->enable();
1505 } else {
1506 myDataParamKey->disable();
1507 }
1508 myDataColorSettingFrame->getParent()->recalc();
1509 }
1510
1511 layout();
1512 update();
1513}
1514
1515
1516void
1518 myVehicleParamKey->clearItems();
1519 myVehicleTextParamKey->clearItems();
1520 myVehicleParamKey->appendItem(mySettings->vehicleParam.c_str());
1522 for (const std::string& attr : myParent->getVehicleParamKeys(false)) {
1523 myVehicleParamKey->appendItem(attr.c_str());
1524 myVehicleTextParamKey->appendItem(attr.c_str());
1525 }
1526 myVehicleParamKey->setNumVisible(myVehicleParamKey->getNumItems());
1527 myVehicleTextParamKey->setNumVisible(myVehicleTextParamKey->getNumItems());
1528}
1529
1530
1531void
1533 myPOITextParamKey->clearItems();
1534 myPOITextParamKey->appendItem(mySettings->poiTextParam.c_str());
1535 for (const std::string& attr : myParent->getPOIParamKeys()) {
1536 myPOITextParamKey->appendItem(attr.c_str());
1537 }
1538 myPOITextParamKey->setNumVisible(myPOITextParamKey->getNumItems());
1539}
1540
1541
1542std::string
1544 return mySchemeName->getItem(mySchemeName->getCurrentItem()).text();
1545}
1546
1547
1548void
1550 if (name.c_str() == mySchemeName->getItemText(mySchemeName->getCurrentItem())) {
1551 return;
1552 }
1553 for (int i = 0; i < mySchemeName->getNumItems(); ++i) {
1554 if (name.c_str() == mySchemeName->getItemText(i)) {
1555 mySchemeName->setCurrentItem(i);
1556 onCmdNameChange(nullptr, 0, (void*)name.c_str());
1557 return;
1558 }
1559 }
1560}
1561
1562
1564 FXMatrix* parent,
1565 GUIDialog_ViewSettings* target,
1566 const std::string& title,
1567 const GUIVisualizationTextSettings& settings) {
1568 myCheck = new FXCheckButton(parent, title.c_str(), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1569 myCheck->setCheck(settings.showText);
1570 myMatrix0 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1571 mySelectedCheck = new FXCheckButton(myMatrix0, TL("Only for selected"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1572 mySelectedCheck->setCheck(settings.onlySelected);
1573 myConstSizeCheck = new FXCheckButton(myMatrix0, TL("constant text size"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1574 myConstSizeCheck->setCheck(settings.constSize);
1575 FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1576 new FXLabel(m1, TL("Size"), nullptr, GUIDesignViewSettingsLabel1);
1577 mySizeDial = new FXRealSpinner(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1578 mySizeDial->setRange(5, 1000);
1579 mySizeDial->setValue(settings.size);
1580 FXMatrix* m2 = new FXMatrix(parent, 4, GUIDesignViewSettingsMatrix5);
1581 new FXLabel(m2, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1583 new FXLabel(m2, TL("Background"), nullptr, GUIDesignViewSettingsLabel1);
1585}
1586
1587
1590 return GUIVisualizationTextSettings(myCheck->getCheck() != FALSE,
1591 mySizeDial->getValue(),
1592 MFXUtils::getRGBColor(myColorWell->getRGBA()),
1593 MFXUtils::getRGBColor(myBGColorWell->getRGBA()),
1594 myConstSizeCheck->getCheck() != FALSE,
1595 mySelectedCheck->getCheck() != FALSE);
1596}
1597
1598
1599void
1601 myCheck->setCheck(settings.showText);
1602 mySizeDial->setValue(settings.size);
1603 myColorWell->setRGBA(MFXUtils::getFXColor(settings.color));
1604 myBGColorWell->setRGBA(MFXUtils::getFXColor(settings.bgColor));
1605 myConstSizeCheck->setCheck(settings.constSize);
1606 mySelectedCheck->setCheck(settings.onlySelected);
1607}
1608
1609
1611 const GUIVisualizationSizeSettings& settings, GUIGlObjectType type):
1612 myDialogViewSettings(target),
1613 myType(type) {
1614 myCheck = new FXCheckButton(parent, TL("Draw with constant size when zoomed out"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1615 myCheck->setCheck(settings.constantSize);
1616 myCheckSelected = new FXCheckButton(parent, TL("Only for selected"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1617 myCheckSelected->setCheck(settings.constantSizeSelected);
1618 FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1619 new FXLabel(m1, TL("Minimum Size"), nullptr, GUIDesignViewSettingsLabel1);
1621 myMinSizeDial->setValue(settings.minSize);
1622 FXMatrix* m2 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1623 new FXLabel(m2, TL("Exaggerate by"), nullptr, GUIDesignViewSettingsLabel1);
1625 myExaggerateDial->setRange(0, 10000);
1626 myExaggerateDial->setValue(settings.exaggeration);
1627}
1628
1629
1633 myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1634 myCheck->getCheck() != FALSE,
1635 myCheckSelected->getCheck() != FALSE);
1636}
1637
1638
1639void
1641 myCheck->setCheck(settings.constantSize);
1642 myCheckSelected->setCheck(settings.constantSizeSelected);
1643 myMinSizeDial->setValue(settings.minSize);
1644 myExaggerateDial->setValue(settings.exaggeration);
1645}
1646
1647
1648long
1649GUIDialog_ViewSettings::SizePanel::onCmdSizeChange(FXObject* obj, FXSelector sel, void* ptr) {
1650 // mark boundaries for recomputing
1652 // continue as a normal change
1653 return myDialogViewSettings->onCmdColorChange(obj, sel, ptr);
1654}
1655
1656
1657void
1658GUIDialog_ViewSettings::buildHeader(FXVerticalFrame* contentFrame) {
1659 FXHorizontalFrame* horizontalFrame = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame1);
1660 mySchemeName = new FXComboBox(horizontalFrame, 20, this, MID_SIMPLE_VIEW_NAMECHANGE, GUIDesignViewSettingsComboBox1);
1661 for (const auto& name : gSchemeStorage.getNames()) {
1662 const int index = mySchemeName->appendItem(name.c_str());
1663 if (name == mySettings->name) {
1664 mySchemeName->setCurrentItem((FXint)index);
1665 }
1666 }
1667 mySchemeName->setNumVisible(5);
1668
1669 new FXButton(horizontalFrame, (std::string("\t\t") + TL("Save the setting to registry")).c_str(), GUIIconSubSys::getIcon(GUIIcon::SAVE_DATABASE), this, MID_SIMPLE_VIEW_SAVE, GUIDesignButtonToolbar);
1670 new FXButton(horizontalFrame, (std::string("\t\t") + TL("Remove the setting from registry")).c_str(), GUIIconSubSys::getIcon(GUIIcon::REMOVEDB), this, MID_SIMPLE_VIEW_DELETE, GUIDesignButtonToolbar);
1671 new FXButton(horizontalFrame, (std::string("\t\t") + TL("Export setting to file")).c_str(), GUIIconSubSys::getIcon(GUIIcon::SAVE), this, MID_SIMPLE_VIEW_EXPORT, GUIDesignButtonToolbar);
1672 new FXButton(horizontalFrame, (std::string("\t\t") + TL("Load setting from file")).c_str(), GUIIconSubSys::getIcon(GUIIcon::OPEN), this, MID_SIMPLE_VIEW_IMPORT, GUIDesignButtonToolbar);
1673
1674 new FXVerticalSeparator(horizontalFrame);
1675 new FXLabel(horizontalFrame, TL("Export includes:"), nullptr, GUIDesignViewSettingsLabel1);
1676 mySaveViewPort = new FXCheckButton(horizontalFrame, TL("Viewport"));
1677 mySaveDelay = new FXCheckButton(horizontalFrame, TL("Delay"));
1678 mySaveDecals = new FXCheckButton(horizontalFrame, TL("Decals"));
1679 mySaveBreakpoints = new FXCheckButton(horizontalFrame, TL("Breakpoints"));
1680 if (mySettings->netedit) {
1681 mySaveBreakpoints->disable();
1682 }
1683}
1684
1685
1686void
1688 // tab for the background
1689 new FXTabItem(tabbook, TL("Background"), nullptr, GUIDesignViewSettingsTabItemBook1);
1690 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1691 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1692
1693 FXMatrix* matrixColor = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
1694 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1696
1697 FXVerticalFrame* verticalFrameDecals = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame3);
1698 new FXLabel(verticalFrameDecals, TL("Decals:"));
1699 myDecalsTable = new MFXDecalsTable(this, verticalFrameDecals);
1700 FXHorizontalFrame* horizontalFrameButtonsDecals = new FXHorizontalFrame(verticalFrameDecals, GUIDesignViewSettingsHorizontalFrame2);
1701 new FXButton(horizontalFrameButtonsDecals, TL("&Load XML Decals"), nullptr, this, MID_SIMPLE_VIEW_LOAD_DECALS_XML, GUIDesignViewSettingsButton1);
1702 new FXButton(horizontalFrameButtonsDecals, TL("&Save XML Decals"), nullptr, this, MID_SIMPLE_VIEW_SAVE_DECALS_XML, GUIDesignViewSettingsButton1);
1703 new FXButton(horizontalFrameButtonsDecals, TL("&Clear Decals"), nullptr, this, MID_SIMPLE_VIEW_CLEAR_DECALS, GUIDesignViewSettingsButton1);
1704
1705 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1706
1707 FXMatrix* matrixGrid = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1708 myShowGrid = new FXCheckButton(matrixGrid, TL("Toggle grid"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1709 myShowGrid->setCheck(mySettings->showGrid);
1710 new FXLabel(matrixGrid, "");
1711 FXMatrix* matrixGridX = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1712 new FXLabel(matrixGridX, TL("x-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1713 myGridXSizeDialer = new FXRealSpinner(matrixGridX, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1714 myGridXSizeDialer->setRange(1, 10000);
1716 FXMatrix* matrixGridY = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1717 new FXLabel(matrixGridY, TL("y-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1718 myGridYSizeDialer = new FXRealSpinner(matrixGridY, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1719 myGridYSizeDialer->setRange(1, 10000);
1721}
1722
1723
1724void
1726 new FXTabItem(tabbook, TL("Streets"), nullptr, GUIDesignViewSettingsTabItemBook1);
1727 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1728 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1729 // ... color settings
1730 FXVerticalFrame* verticalFrameColor = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1731 FXMatrix* matrixColor = new FXMatrix(verticalFrameColor, 5, GUIDesignViewSettingsMatrix3);
1732 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1734 myLaneColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1735 myLaneColorSettingFrame = new FXVerticalFrame(verticalFrameColor, GUIDesignViewSettingsVerticalFrame4);
1736 myMeanDataID = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1737 myMeanDataID->disable();
1738 myMeanDataID->hide();
1739 myMeanDataID->setEditable(false);
1740 myParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1741 myParamKey->disable();
1742 myParamKey->setEditable(true);
1743
1744 // rainbow settings
1745 FXMatrix* matrixRainbow = new FXMatrix(verticalFrameColor, 5, GUIDesignViewSettingsMatrix3);
1746 myLaneColorRainbow = new FXButton(matrixRainbow, TL("Recalibrate Rainbow"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
1747 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
1748 myLaneColorRainbowCheck = new FXCheckButton(matrixRainbow, TL("hide below"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1749 myLaneColorRainbowThreshold = new FXRealSpinner(matrixRainbow, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1750 myLaneColorRainbowThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1752 myLaneColorRainbowCheck2 = new FXCheckButton(matrixRainbow, TL("hide above"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1753 myLaneColorRainbowThreshold2 = new FXRealSpinner(matrixRainbow, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1754 myLaneColorRainbowThreshold2->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1756
1757 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1758 // ... scale settings
1759 FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1760 FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 5, GUIDesignViewSettingsMatrix3);
1761 new FXLabel(matrixScale, TL("Scale width"), nullptr, GUIDesignViewSettingsLabel1);
1763 myLaneScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1764 myLaneScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
1765 myScalingParamKey = new FXComboBox(matrixScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1766 myScalingParamKey->disable();
1767 myScalingParamKey->setEditable(true);
1768
1774 } else {
1779 }
1780
1781 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1782 FXMatrix* matrixLanes = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1783
1784 myShowBikeMarkings = new FXCheckButton(matrixLanes, TL("Show bike markings"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1786 myShowLaneDecals = new FXCheckButton(matrixLanes, TL("Show turning arrows"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1788
1789 myShowLinkRules = new FXCheckButton(matrixLanes, TL("Show right-of-way rules"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1791 myRealisticLinkRules = new FXCheckButton(matrixLanes, TL("Realistic stop line colors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1793
1794 myShowLaneBorders = new FXCheckButton(matrixLanes, TL("Show lane borders"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1796 myShowLaneDirection = new FXCheckButton(matrixLanes, TL("Show lane direction"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1798
1799 myHideMacroConnectors = new FXCheckButton(matrixLanes, TL("Hide macro connectors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1801 myShowSublanes = new FXCheckButton(matrixLanes, TL("Show sublanes"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1803
1804 myShowRails = new FXCheckButton(matrixLanes, TL("Show rails"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1805 myShowRails->setCheck(mySettings->showRails);
1806 mySpreadSuperposed = new FXCheckButton(matrixLanes, (TL("Spread bidirectional railways/roads") + std::string("\t\t") + TL("Make both directional edges for a bidirectional railways or roads visible")).c_str(), this, MID_SIMPLE_VIEW_COLORCHANGE);
1808
1809 mySecondaryShape = new FXCheckButton(matrixLanes, TL("Secondary shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1811 new FXLabel(matrixLanes, " ", nullptr, GUIDesignViewSettingsLabel1);
1812
1813 FXMatrix* tmp0 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1814 new FXLabel(tmp0, TL("Exaggerate width by"), nullptr, GUIDesignViewSettingsLabel1);
1816 myLaneWidthUpscaleDialer->setRange(0, 1000000);
1818
1819 FXMatrix* tmp1 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1820 new FXLabel(tmp1, TL("Minimum size"), nullptr, GUIDesignViewSettingsLabel1);
1822 myLaneMinWidthDialer->setRange(0, 1000000);
1824
1825 // edge name
1826 myEdgeNamePanel = new NamePanel(matrixLanes, this, TL("Show edge id"), mySettings->edgeName);
1827 myStreetNamePanel = new NamePanel(matrixLanes, this, TL("Show street name"), mySettings->streetName);
1828 myEdgeValuePanel = new NamePanel(matrixLanes, this, TL("Show edge color value"), mySettings->edgeValue);
1829 myEdgeScaleValuePanel = new NamePanel(matrixLanes, this, TL("Show edge scale value"), mySettings->edgeScaleValue);
1830}
1831
1832
1833void
1835 new FXTabItem(tabbook, TL("Vehicles"), nullptr, GUIDesignViewSettingsTabItemBook1);
1836 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1837 FXVerticalFrame* verticalframe = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1838
1839 FXMatrix* matrixShowAs = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix3);
1840 new FXLabel(matrixShowAs, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
1842 myVehicleShapeDetail->appendIconItem(TL("'triangles'"));
1844 myVehicleShapeDetail->appendIconItem(TL("'simple shapes'"));
1845 myVehicleShapeDetail->appendIconItem(TL("'raster images'"));
1846 myVehicleShapeDetail->appendIconItem(TL("'circles'"));
1849
1850 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1851
1852 FXMatrix* matrixColor = new FXMatrix(verticalframe, 4, GUIDesignViewSettingsMatrix3);
1853 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1857 myVehicleColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1858 myVehicleParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1859 myVehicleParamKey->setEditable(true);
1860 myVehicleParamKey->disable();
1861
1862 myVehicleColorSettingFrame = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame4);
1863 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1864
1865 // vehicle scale settings
1866 FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame6);
1867 FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 3, GUIDesignViewSettingsMatrix3);
1868 new FXLabel(matrixScale, TL("Scale size"), nullptr, GUIDesignViewSettingsLabel1);
1870 myVehicleScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1871 myVehicleScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
1874 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1875
1876 FXMatrix* matrixVehicle = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
1877 myVehicleNamePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle id"), mySettings->vehicleName);
1878 myVehicleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle color value"), mySettings->vehicleValue);
1879 myVehicleScaleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle scale value"), mySettings->vehicleScaleValue);
1880 myVehicleTextPanel = new NamePanel(matrixVehicle, this, TL("Show vehicle text param"), mySettings->vehicleText);
1882 myVehicleTextParamKey->setEditable(true);
1883
1884 //new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1885
1886 FXMatrix* matrixShow = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
1887 myShowBlinker = new FXCheckButton(matrixShow, TL("Show blinker / brake lights"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1889 myShowMinGap = new FXCheckButton(matrixShow, TL("Show minimum gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1891 myShowBrakeGap = new FXCheckButton(matrixShow, TL("Show brake gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1893 myShowBTRange = new FXCheckButton(matrixShow, TL("Show Bluetooth range"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1895 myShowRouteIndex = new FXCheckButton(matrixShow, TL("Show route index"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1897 myScaleLength = new FXCheckButton(matrixShow, TL("Scale length with geometry"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1899 myShowParkingInfo = new FXCheckButton(matrixShow, TL("Show parking info"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1901 myDrawReversed = new FXCheckButton(matrixShow, TL("Draw reversed vehicles in reverse"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1903 //new FXLabel(matrixShow, " ", nullptr, GUIDesignViewSettingsLabel1);
1904 //myShowLaneChangePreference = new FXCheckButton(matrixShow, TL("Show lane change preference"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1905 //myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
1906 //tmpc = new FXCheckButton(matrixShow, TL("Show needed headway"), 0 ,0);
1907 //tmpc->disable();
1908
1909 //new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
1910
1911 FXMatrix* matrixSize = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix1);
1913}
1914
1915
1916void
1918 new FXTabItem(tabbook, TL("Persons"), nullptr, GUIDesignViewSettingsTabItemBook1);
1919 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1920 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1921
1922 FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
1923 new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
1925 myPersonShapeDetail->appendIconItem(TL("'triangles'"));
1926 myPersonShapeDetail->appendIconItem(TL("'circles'"));
1927 myPersonShapeDetail->appendIconItem(TL("'simple shapes'"));
1928 myPersonShapeDetail->appendIconItem(TL("'raster images'"));
1931
1932 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1933
1934 FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
1935 new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1939 myPersonColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1940
1941 myPersonColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
1942
1943 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1944
1945 FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
1946 myPersonNamePanel = new NamePanel(m103, this, TL("Show person id"), mySettings->personName);
1947 myPersonValuePanel = new NamePanel(m103, this, TL("Show person color value"), mySettings->personValue);
1948
1949 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1950
1951 FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1953}
1954
1955
1956void
1958 new FXTabItem(tabbook, TL("Containers"), nullptr, GUIDesignViewSettingsTabItemBook1);
1959 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1960 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1961
1962 FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
1963 new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
1965 myContainerShapeDetail->appendIconItem(TL("'triangles'"));
1967 myContainerShapeDetail->appendIconItem(TL("'simple shapes'"));
1968 myContainerShapeDetail->appendIconItem(TL("'raster images'"));
1971
1972 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1973
1974 FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
1975 new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1979 myContainerColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1980
1981 myContainerColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
1982
1983 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1984
1985 FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
1986 myContainerNamePanel = new NamePanel(m103, this, TL("Show container id"), mySettings->containerName);
1987
1988 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1989
1990 FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1992}
1993
1994
1995void
1997 new FXTabItem(tabbook, TL("Junctions"), nullptr, GUIDesignViewSettingsTabItemBook1);
1998 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1999 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2000 FXMatrix* m41 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2001 new FXLabel(m41, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2006
2007 myJunctionColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2008 myJunctionColorRainbow = new FXButton(verticalFrame, TL("Recalibrate Rainbow"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
2009 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2010
2011 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2012 FXMatrix* m42 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2014 myDrawJunctionShape = new FXCheckButton(m42, TL("Draw junction shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2016 myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, TL("Draw crossings/walkingareas"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2018 myShowLane2Lane = new FXCheckButton(m42, TL("Show lane to lane connections"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2020 new FXLabel(m42, " ", nullptr, GUIDesignViewSettingsLabel1);
2021
2022 myTLIndexPanel = new NamePanel(m42, this, TL("Show link tls index"), mySettings->drawLinkTLIndex);
2023 myJunctionIndexPanel = new NamePanel(m42, this, TL("Show link junction index"), mySettings->drawLinkJunctionIndex);
2024 myJunctionIDPanel = new NamePanel(m42, this, TL("Show junction id"), mySettings->junctionID);
2025 myInternalJunctionNamePanel = new NamePanel(m42, this, TL("Show internal junction id"), mySettings->internalJunctionName);
2026 myInternalEdgeNamePanel = new NamePanel(m42, this, TL("Show internal edge id"), mySettings->internalEdgeName);
2027 myCwaEdgeNamePanel = new NamePanel(m42, this, TL("Show crossing and walkingarea id"), mySettings->cwaEdgeName);
2028 myTLSPhaseIndexPanel = new NamePanel(m42, this, TL("Show traffic light phase index"), mySettings->tlsPhaseIndex);
2029 myTLSPhaseNamePanel = new NamePanel(m42, this, TL("Show traffic light phase name"), mySettings->tlsPhaseName);
2030 myJunctionNamePanel = new NamePanel(m42, this, TL("Show junction name"), mySettings->junctionName);
2031}
2032
2033
2034void
2036 new FXTabItem(tabbook, TL("Additional"), nullptr, GUIDesignViewSettingsTabItemBook1);
2037 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2038 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2039 // IDs
2040 FXMatrix* matrixIDs = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2041 myAddNamePanel = new NamePanel(matrixIDs, this, TL("Show object id"), mySettings->addName);
2042 myAddFullNamePanel = new NamePanel(matrixIDs, this, TL("Show full name"), mySettings->addFullName);
2043 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2044 //Sizes
2045 FXMatrix* matrixSizes = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2047 // color
2048 FXMatrix* matrixColor = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2049 new FXLabel(matrixColor, TL("StoppingPlace"), nullptr, GUIDesignViewSettingsLabel1);
2050 new FXLabel(matrixColor, TL("body"), nullptr, GUIDesignViewSettingsLabel1);
2051 new FXLabel(matrixColor, TL("sign"), nullptr, GUIDesignViewSettingsLabel1);
2052 new FXLabel(matrixColor, "busStops", nullptr, GUIDesignViewSettingsLabel1);
2055 new FXLabel(matrixColor, "trainStops", nullptr, GUIDesignViewSettingsLabel1);
2058 new FXLabel(matrixColor, "containerStops", nullptr, GUIDesignViewSettingsLabel1);
2061 new FXLabel(matrixColor, "chargingStations", nullptr, GUIDesignViewSettingsLabel1);
2064}
2065
2066
2067void
2069 new FXTabItem(tabbook, TL("Demand"), nullptr, GUIDesignViewSettingsTabItemBook1);
2070 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2071 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2072 // elements
2073 FXMatrix* demandMatrix = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2074 new FXLabel(demandMatrix, TL("element"), nullptr, GUIDesignViewSettingsLabel1);
2075 new FXLabel(demandMatrix, TL("color"), nullptr, GUIDesignViewSettingsLabel1);
2076 new FXLabel(demandMatrix, TL("width"), nullptr, GUIDesignViewSettingsLabel1);
2077 new FXLabel(demandMatrix, "trips", nullptr, GUIDesignViewSettingsLabel1);
2079 myTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2081 new FXLabel(demandMatrix, "personTrips", nullptr, GUIDesignViewSettingsLabel1);
2083 myPersonTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2085 new FXLabel(demandMatrix, "walks", nullptr, GUIDesignViewSettingsLabel1);
2087 myWalkWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2089 new FXLabel(demandMatrix, "rides", nullptr, GUIDesignViewSettingsLabel1);
2091 myRideWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2093 new FXLabel(demandMatrix, "transport", nullptr, GUIDesignViewSettingsLabel1);
2095 myTransportWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2097 new FXLabel(demandMatrix, "tranship", nullptr, GUIDesignViewSettingsLabel1);
2099 myTranshipWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2101 // stops
2102 FXMatrix* stopMatrix = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2103 new FXLabel(stopMatrix, "stop", nullptr, GUIDesignViewSettingsLabel1);
2105 new FXLabel(stopMatrix, "waypoint", nullptr, GUIDesignViewSettingsLabel1);
2107 new FXLabel(stopMatrix, "stop (persons)", nullptr, GUIDesignViewSettingsLabel1);
2109 new FXLabel(stopMatrix, "stop (containers)", nullptr, GUIDesignViewSettingsLabel1);
2111}
2112
2113
2114void
2116 new FXTabItem(tabbook, TL("POIs"), nullptr, GUIDesignViewSettingsTabItemBook1);
2117 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2118 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2119
2120 FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2121 new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2125 myPOIColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2126 myPOIColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2127
2128 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2129
2130 FXMatrix* m61 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2131
2132 new FXLabel(m61, TL("POI detail"), nullptr, GUIDesignViewSettingsLabel1);
2134 myPoiDetail->setRange(3, 100);
2135 myPoiDetail->setValue(mySettings->poiDetail);
2136
2137 myPOINamePanel = new NamePanel(m61, this, TL("Show poi id"), mySettings->poiName);
2138 myPOITypePanel = new NamePanel(m61, this, TL("Show poi type"), mySettings->poiType);
2139 myPOITextPanel = new NamePanel(m61, this, TL("Show poi text param"), mySettings->poiText);
2141 myPOITextParamKey->setEditable(true);
2142 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2143
2144 FXMatrix* m62 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2146}
2147
2148
2149void
2151 new FXTabItem(tabbook, TL("Polygons"), nullptr, GUIDesignViewSettingsTabItemBook1);
2152 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2153 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2154
2155 FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2156 new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2160 myPolyColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2161 myPolyColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2162
2163 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2164
2165 FXMatrix* m91 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2166 myPolyNamePanel = new NamePanel(m91, this, TL("Show polygon id"), mySettings->polyName);
2167 myPolyTypePanel = new NamePanel(m91, this, TL("Show polygon types"), mySettings->polyType);
2168 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2169
2171}
2172
2173
2174void
2176 new FXTabItem(tabbook, TL("Selection"), nullptr, GUIDesignViewSettingsTabItemBook1);
2177 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2178 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2179
2180 FXMatrix* m102 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2181 new FXLabel(m102, TL("Default Selection Color"), nullptr, GUIDesignViewSettingsLabel1);
2182 new FXLabel(m102, "", nullptr, GUIDesignViewSettingsLabel1);
2183
2184 new FXLabel(m102, TL("Miscellaneous"), nullptr, GUIDesignViewSettingsLabel1);
2186 new FXLabel(m102, "Edge", nullptr, GUIDesignViewSettingsLabel1);
2188 new FXLabel(m102, "Lane Edge", nullptr, GUIDesignViewSettingsLabel1);
2190 new FXLabel(m102, "Connection", nullptr, GUIDesignViewSettingsLabel1);
2192 new FXLabel(m102, "Prohibition", nullptr, GUIDesignViewSettingsLabel1);
2194 new FXLabel(m102, "Crossing", nullptr, GUIDesignViewSettingsLabel1);
2196 new FXLabel(m102, "Additional", nullptr, GUIDesignViewSettingsLabel1);
2198 new FXLabel(m102, "Route", nullptr, GUIDesignViewSettingsLabel1);
2200 new FXLabel(m102, "Vehicle", nullptr, GUIDesignViewSettingsLabel1);
2202 new FXLabel(m102, "Person", nullptr, GUIDesignViewSettingsLabel1);
2204 new FXLabel(m102, "PersonPlan", nullptr, GUIDesignViewSettingsLabel1);
2206 new FXLabel(m102, "edgeData", nullptr, GUIDesignViewSettingsLabel1);
2208}
2209
2210
2211void
2213 new FXTabItem(tabbook, TL("Data"), nullptr, GUIDesignViewSettingsTabItemBook1);
2214 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2215 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2216 // ... color settings
2217 FXVerticalFrame* verticalFrame2 = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
2218 FXMatrix* m111 = new FXMatrix(verticalFrame2, 4, GUIDesignViewSettingsMatrix3);
2219 new FXLabel(m111, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2221 myDataColorInterpolation = new FXCheckButton(m111, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2222 myDataColorSettingFrame = new FXVerticalFrame(verticalFrame2, GUIDesignViewSettingsVerticalFrame4);
2223 myDataParamKey = new FXComboBox(m111, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
2224 myDataParamKey->disable();
2225 myDataParamKey->setEditable(true);
2228
2229 // rainbow settings
2230 FXMatrix* m113 = new FXMatrix(verticalFrame2, 3, GUIDesignViewSettingsMatrix3);
2231 myDataColorRainbow = new FXButton(m113, TL("Recalibrate Rainbow"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
2232 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2233 myDataColorRainbowCheck = new FXCheckButton(m113, TL("hide below threshold"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2234 myDataColorRainbowThreshold = new FXRealSpinner(m113, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
2235 myDataColorRainbowThreshold->setRange(-100000000, 100000000);
2236
2237 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2238 FXMatrix* m112 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2239
2240 new FXLabel(m112, TL("Exaggerate edgeRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2242 myEdgeRelationUpscaleDialer->setRange(0, 1000000);
2244
2245 new FXLabel(m112, TL("Exaggerate tazRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2247 myTazRelationUpscaleDialer->setRange(0, 1000000);
2249
2250 // text decoration
2251 myDataValuePanel = new NamePanel(m112, this, TL("Show data color value"), mySettings->dataValue);
2252}
2253
2254
2255void
2257 new FXTabItem(tabbook, TL("Legend"), nullptr, GUIDesignViewSettingsTabItemBook1);
2258 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2259 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2260
2261 FXMatrix* m72 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2262 myShowSizeLegend = new FXCheckButton(m72, TL("Show Size Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2264 new FXLabel(m72, "");
2265 myShowColorLegend = new FXCheckButton(m72, TL("Show Edge Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2267 new FXLabel(m72, "");
2268 myShowVehicleColorLegend = new FXCheckButton(m72, TL("Show Vehicle Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2270 new FXLabel(m72, "");
2271}
2272
2273
2274void
2276 new FXTabItem(tabbook, "openGL", nullptr, GUIDesignViewSettingsTabItemBook1);
2277 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2278 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2279
2280 FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2281 myDither = new FXCheckButton(m82, TL("Dither"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2282 myDither->setCheck(mySettings->dither);
2283 FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2284 myFPS = new FXCheckButton(m83, "FPS", this, MID_SIMPLE_VIEW_COLORCHANGE);
2285 myFPS->setCheck(mySettings->fps);
2286 FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2287 myDrawBoundaries = new FXCheckButton(m84, TL("Draw boundaries"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2289 FXMatrix* m85 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2290 myForceDrawForPositionSelection = new FXCheckButton(m85, TL("Force draw for position selection"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2292 FXMatrix* m86 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2293 myForceDrawForRectangleSelection = new FXCheckButton(m86, TL("Force draw for rectangle selection"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2295 FXMatrix* m87 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2296 myDisableDottedContours = new FXCheckButton(m87, TL("Disable dotted contours during selection/deletion"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2298 FXMatrix* m88 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2299 myRecalculateBoundaries = new FXButton(m88, TL("Recalculate boundaries"), nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
2300 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2301 FXMatrix* m89 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2302 myGeometryIndicesPanel = new NamePanel(m89, this, TL("Show geometry point indices"), mySettings->geometryIndices);
2303}
2304
2305
2306void
2308 myFrame3D = new FXTabItem(tabbook, TL("3D view"), nullptr, GUIDesignViewSettingsTabItemBook1);
2309 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2310 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2311
2312 FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2313 myShow3DTLSLinkMarkers = new FXCheckButton(m82, TL("Show TLS link markers"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2315 //FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2316 myShow3DTLSDomes = new FXCheckButton(m82, TL("Show domes around TLS models from decals"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2318 //FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2319 myGenerate3DTLSModels = new FXCheckButton(m82, TL("Show auto-generated TLS models"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2321 myShow3DHeadUpDisplay = new FXCheckButton(m82, TL("Show head-up display"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2323
2324 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2325
2326 FXMatrix* m2 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2327 new FXLabel(m2, TL("Sun brightness"), nullptr, GUIDesignViewSettingsLabel1);
2329 myLight3DFactor->setRange(0, 255);
2331 /*
2332 new FXLabel(m2, "Ambient", nullptr, GUIDesignViewSettingsLabel1);
2333 myAmbient3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->ambient3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2334 myAmbient3DLight->setOpaqueOnly(true);
2335 new FXLabel(m2, "Diffuse", nullptr, GUIDesignViewSettingsLabel1);
2336 myDiffuse3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->diffuse3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2337 myDiffuse3DLight->setOpaqueOnly(true);
2338 */
2339 new FXLabel(m2, TL("Sky color"), nullptr, GUIDesignViewSettingsLabel1);
2341 mySkyColor->setOpaqueOnly(true);
2342
2343#ifdef HAVE_OSG
2345#else
2346 myFrame3D->disable();
2347#endif
2348}
2349
2350
2351void
2352GUIDialog_ViewSettings::buildButtons(FXVerticalFrame* contentFrame) {
2353 FXHorizontalFrame* horizontalFrameButtons = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame2);
2354 FXButton* OK = new FXButton(horizontalFrameButtons, TL("&OK"), nullptr, this, MID_SETTINGS_OK, GUIDesignViewSettingsButton2);
2355 new FXButton(horizontalFrameButtons, TL("&Cancel"), nullptr, this, MID_SETTINGS_CANCEL, GUIDesignViewSettingsButton3);
2356 OK->setFocus();
2357}
2358
2359/****************************************************************************/
long long int SUMOTime
Definition GUI.h:36
@ MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
Definition GUIAppEnum.h:624
@ MID_SIMPLE_VIEW_CLEAR_DECALS
For the clear-decals - button.
Definition GUIAppEnum.h:640
@ MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
Definition GUIAppEnum.h:626
@ MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
Definition GUIAppEnum.h:632
@ MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
Definition GUIAppEnum.h:630
@ MID_SIMPLE_VIEW_DELETE
For the delete - button.
Definition GUIAppEnum.h:628
@ MID_SIMPLE_VIEW_LOAD_DECALS_XML
For the load-decals - button.
Definition GUIAppEnum.h:636
@ MID_SIMPLE_VIEW_LOAD_DECAL
For the load-decals - button.
Definition GUIAppEnum.h:634
@ MID_SETTINGS_OK
Ok-button was pushed.
Definition GUIAppEnum.h:544
@ MID_SETTINGS_CANCEL
Cancel-button was pushed.
Definition GUIAppEnum.h:546
@ MID_SIMPLE_VIEW_SIZECHANGE
Informs the dialog about a size value's change.
Definition GUIAppEnum.h:622
@ MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
Definition GUIAppEnum.h:620
@ MID_SIMPLE_VIEW_SAVE_DECALS_XML
For the save-decals - button.
Definition GUIAppEnum.h:638
GUICompleteSchemeStorage gSchemeStorage
#define GUIDesignViewSettingsColorWell2
Definition GUIDesigns.h:574
#define GUIDesignViewSettingsMatrix3
Definition GUIDesigns.h:531
#define GUIDesignViewSettingsMainDialog
Definition GUIDesigns.h:502
#define GUIDesignViewSettingsMatrix5
Definition GUIDesigns.h:535
#define GUIDesignComboBoxStatic
Combo box static (not editable)
Definition GUIDesigns.h:291
#define GUIDesignViewSettingsComboBox1
Combo boxes.
Definition GUIDesigns.h:538
#define GUIDesignViewSettingsHorizontalFrame3
Definition GUIDesigns.h:524
#define GUIDesignViewSettingsVerticalFrame6
Definition GUIDesigns.h:517
#define GUIDesignViewSettingsHorizontalFrame2
Definition GUIDesigns.h:522
#define GUIDesignViewSettingsButton2
Definition GUIDesigns.h:563
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition GUIDesigns.h:118
#define GUIDesignViewSettingsMatrix1
Matrix.
Definition GUIDesigns.h:527
#define GUIDesignViewSettingsColorWell1
Color wells.
Definition GUIDesigns.h:572
#define GUIDesignViewSettingsButton4
Definition GUIDesigns.h:567
#define GUIDesignViewSettingsDialog
Definition GUIDesigns.h:504
#define GUIDesignViewSettingsMatrix4
Definition GUIDesigns.h:533
#define GUIDesignViewSettingsSpinDial2
Definition GUIDesigns.h:545
#define GUIDesignViewSettingsButton5
Definition GUIDesigns.h:569
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
Definition GUIDesigns.h:520
#define GUIDesignViewSettingsSpinDial1
Definition GUIDesigns.h:543
#define GUIDesignViewSettingsVerticalFrame5
Definition GUIDesigns.h:515
#define GUIDesignViewSettingsMatrix2
Definition GUIDesigns.h:529
#define GUIDesignViewSettingsLabel1
Label.
Definition GUIDesigns.h:553
#define GUIDesignViewSettingsTabBook1
Tab books.
Definition GUIDesigns.h:548
#define GUIDesignViewSettingsButton3
Definition GUIDesigns.h:565
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
Definition GUIDesigns.h:350
#define GUIDesignViewSettingsVerticalFrame2
Definition GUIDesigns.h:509
#define GUIDesignViewSettingsVerticalFrame3
Definition GUIDesigns.h:511
#define GUIDesignViewSettingsColorWell
ColorWell.
Definition GUIDesigns.h:541
#define GUIDesignHorizontalSeparator
Definition GUIDesigns.h:452
#define GUIDesignViewSettingsVerticalFrame4
Definition GUIDesigns.h:513
#define GUIDesignViewSettingsTabItemBook1
Definition GUIDesigns.h:550
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
Definition GUIDesigns.h:507
#define GUIDesignViewSettingsLabel2
Definition GUIDesigns.h:555
#define GUIDesignViewSettingsTextField1
textFields
Definition GUIDesigns.h:558
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
Definition GUIDesigns.h:202
#define GUIDesignViewSettingsButton1
Buttons.
Definition GUIDesigns.h:561
FXDEFMAP(GUIDialog_ViewSettings::SizePanel) GUIDialog_SizeMap[]
GUIGlObjectType
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_JUNCTION
a junction
@ GLO_LANE
a lane
@ GLO_CONTAINER
a container
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_VEHICLE
a vehicle
@ GLO_PERSON
a person
@ GLO_POI
a poi
@ GLO_POLYGON
a polygon
GUIPostDrawing gPostDrawing
FXString gCurrentFolder
The folder used as last.
@ OPEN
open icons
@ SAVE_DATABASE
@ SAVE
save icons
#define TL(string)
Definition MsgHandler.h:287
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:69
@ SUMO_TAG_DELAY
@ SUMO_TAG_BREAKPOINT
@ SUMO_TAG_VIEWSETTINGS_DECAL
@ SUMO_TAG_VIEWSETTINGS
@ SUMO_TAG_VIEWSETTINGS_LIGHT
@ SUMO_ATTR_VALUE
@ SUMO_ATTR_CENTER_Y
@ SUMO_ATTR_INDEX
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_HEIGHT
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_CENTER_Z
@ SUMO_ATTR_CENTER_X
@ SUMO_ATTR_WIDTH
@ SUMO_ATTR_TIME
trigger: the time of the step
#define UNUSED_PARAMETER(x)
Definition StdDefs.h:30
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
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.
void remove(const std::string name)
Removes the setting with the given name.
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 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
FXColorWell * myBGColorWell
BGColor well.
void update(const GUIVisualizationTextSettings &settings)
update
FXCheckButton * myCheck
check button
FXCheckButton * myConstSizeCheck
const size check
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
constructor
FXCheckButton * mySelectedCheck
draw only for selected?
FXCheckButton * myCheckSelected
check selected button
long onCmdSizeChange(FXObject *obj, FXSelector sel, void *ptr)
FXRealSpinner * myMinSizeDial
min size dial
void update(const GUIVisualizationSizeSettings &settings)
update
GUIVisualizationSizeSettings getSettings()
get settings
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings, GUIGlObjectType type)
FOX Declaration.
FXRealSpinner * myExaggerateDial
exaggerate dial
The dialog to change the view (gui) settings.
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
FXVerticalFrame * myVehicleColorSettingFrame
void buildBackgroundFrame(FXTabBook *tabbook)
build frames
FXCheckButton * myDataColorRainbowCheck
FXCheckButton * myVehicleColorInterpolation
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
MFXComboBoxIcon * myPolyColorMode
Polygons.
FXVerticalFrame * myDataColorSettingFrame
GUISUMOAbstractView * myParent
The parent view (which settings are changed)
std::vector< FXColorWell * > myPolyColors
MFXComboBoxIcon * myJunctionColorMode
junctions
FXVerticalFrame * myJunctionColorSettingFrame
void buildSelectionFrame(FXTabBook *tabbook)
void buildOpenGLFrame(FXTabBook *tabbook)
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
FXVerticalFrame * myContainerColorSettingFrame
FXRealSpinner * myLaneWidthUpscaleDialer
std::vector< FXColorWell * > myPOIColors
FXColorWell * myBusStopColor
additional colors
std::vector< FXButton * > myLaneScaleButtons
FXCheckButton * myDisableDottedContours
std::vector< FXColorWell * > myPersonColors
MFXComboBoxIcon * myVehicleShapeDetail
std::vector< FXButton * > myDataButtons
std::vector< FXRealSpinner * > myVehicleScales
std::vector< FXRealSpinner * > myPolyThresholds
FXCheckButton * myPOIColorInterpolation
std::vector< FXButton * > myContainerButtons
std::vector< FXRealSpinner * > myJunctionThresholds
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
FXRealSpinner * myLaneColorRainbowThreshold2
void show()
show view settings dialog
std::vector< FXButton * > myJunctionButtons
FXCheckButton * myShowVehicleColorLegend
void buildStreetsFrame(FXTabBook *tabbook)
FXRealSpinner * myTripWidth
demand widths
FXCheckButton * mySaveViewPort
load/save-menu
void buildVehiclesFrame(FXTabBook *tabbook)
FXCheckButton * myLaneColorRainbowCheck
std::vector< FXColorWell * > myJunctionColors
MFXComboBoxIcon * myLaneEdgeScaleMode
... lane scaler
FXCheckButton * myPersonColorInterpolation
long onCmdLoadXMLDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
FXColorWell * mySelectionColor
selection colors
FXVerticalFrame * myLaneScaleSettingFrame
std::vector< FXColorWell * > myVehicleColors
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.
std::vector< FXRealSpinner * > myVehicleThresholds
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXCheckButton * myPolyColorInterpolation
std::vector< FXButton * > myPersonButtons
FXCheckButton * myJunctionColorInterpolation
FXRealSpinner * myTazRelationUpscaleDialer
void buildHeader(FXVerticalFrame *contentFrame)
build header
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
FXVerticalFrame * myLaneColorSettingFrame
MFXComboBoxIcon * myPersonShapeDetail
FXCheckButton * myLaneScaleInterpolation
void buildDemandFrame(FXTabBook *tabbook)
FXCheckButton * myForceDrawForPositionSelection
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
FXVerticalFrame * myVehicleScaleSettingFrame
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)
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
void loadSettings(const std::string &file)
Loads a scheme from a file.
long onCmdClearDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be cleared.
std::vector< FXRealSpinner * > myDataThresholds
FXCheckButton * myDataColorInterpolation
FXCheckButton * myDrawCrossingsAndWalkingAreas
std::vector< FXButton * > myLaneButtons
FXCheckButton * myLaneColorInterpolation
FXVerticalFrame * myPersonColorSettingFrame
void buildContainersFrame(FXTabBook *tabbook)
MFXComboBoxIcon * myVehicleColorMode
Vehicles.
void buildLegendFrame(FXTabBook *tabbook)
std::vector< FXRealSpinner * > myVehicleScaleThresholds
long onCmdLoadDecal(FXObject *, FXSelector, void *data)
Called if the decal shall be loaded from a file.
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.
void loadDecals(const std::string &file)
Loads decals from a file.
FXVerticalFrame * myPOIColorSettingFrame
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
std::vector< FXColorWell * > myContainerColors
FXCheckButton * myForceDrawForRectangleSelection
GUISUMOAbstractView * getSUMOAbstractView()
get GUISUMOAbstractView parent
MFXComboBoxIcon * myContainerColorMode
Containers.
std::vector< FXRealSpinner * > myLaneScaleThresholds
FXRealSpinner * myLaneColorRainbowThreshold
FXCheckButton * myDither
openGL
MFXComboBoxIcon * myContainerShapeDetail
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
std::vector< FXRealSpinner * > myContainerThresholds
void buildPersonsFrame(FXTabBook *tabbook)
FXCheckButton * myShow3DTLSLinkMarkers
3D
MFXComboBoxIcon * myPOIColorMode
POIs.
void updatePOIParams()
reload known POI parameters
FXCheckButton * myShowLane2Lane
buttons
std::vector< FXColorWell * > myDataColors
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.
MFXComboBoxIcon * myLaneEdgeColorMode
... lane colorer
long onCmdSaveXMLDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
void buildAdditionalsFrame(FXTabBook *tabbook)
void buildPOIsFrame(FXTabBook *tabbook)
void buildPolygonsFrame(FXTabBook *tabbook)
void buildDataFrame(FXTabBook *tabbook)
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
void buildButtons(FXVerticalFrame *contentFrame)
build buttons
MFXComboBoxIcon * myVehicleScaleMode
vehicle scaler
std::vector< FXButton * > myVehicleScaleButtons
MFXComboBoxIcon * myPersonColorMode
Persons.
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
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
void build3DFrame(FXTabBook *tabbook)
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
MFXComboBoxIcon * myDataColorMode
Data.
std::vector< FXButton * > myPOIButtons
FXRealSpinner * myDataColorRainbowThreshold
FXCheckButton * myLaneColorRainbowCheck2
NamePanel * myEdgeNamePanel
name panels
FXRealSpinner * myEdgeRelationUpscaleDialer
void updateVehicleParams()
reload known vehicle parameters
std::vector< FXRealSpinner * > myPOIThresholds
std::vector< FXButton * > myPolyButtons
std::vector< FXButton * > myVehicleButtons
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Persists window position in the registry.
GUIGlObjectType recomputeBoundaries
recompute boundaries
const std::vector< double > & getThresholds() const
void setColor(const int pos, const T &color)
void setThreshold(const int pos, const double threshold)
const std::vector< std::string > & getNames() const
void removeColor(const int pos)
const std::string & getName() const
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
bool allowsNegativeValues() const
void fill(MFXComboBoxIcon &cb)
Fills the given combobox with the names of available colorings.
virtual std::vector< std::string > getMeanDataAttrs(const std::string &meanDataID) const
return list of available attributes for the given meanData id
void setDelay(double delay)
Sets the delay of the parent application.
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
std::vector< Decal > & getDecals()
The list of decals to show.
double getDelay() const
Returns the delay of the parent application.
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, bool hide=false, double hideThreshold=0, bool hide2=false, double hideThreshold2=0)
recalibrate color scheme according to the current value range
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
virtual std::vector< std::string > getMeanDataIDs() const
return list of loaded edgeData ids (being computed in the current simulation)
virtual void recalculateBoundaries()=0
recalculate boundaries
FXMutex & getDecalsLockMutex()
The mutex to use before accessing the decals list in order to avoid thread conflicts.
virtual bool is3DView() const
return whether this is a 3D view
virtual std::vector< std::string > getPOIParamKeys() const
return list of available vehicle parameters
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 std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
void remove(GUIDialog_EditViewport *)
remove viewport
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
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.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
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
RGBColor skyColor
sky background color
GUIVisualizationSizeSettings junctionSize
static const std::string SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL
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.
std::string edgeDataID
id for coloring by live edgeData
GUIScaler laneScaler
The lane scaler.
GUIVisualizationTextSettings edgeScaleValue
bool dither
Information whether dithering shall be enabled.
GUIColorer vehicleColorer
The vehicle colorer.
static const std::string SCHEME_NAME_EDGEDATA_LIVE
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.
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 geometryIndices
GUIVisualizationTextSettings dataValue
bool show3DTLSDomes
whether the semi-transparent domes around 3D TL models should be drawn
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
bool disableDottedContours
flag for disable dotted contours in netedit
GUIColorer polyColorer
The polygon colorer.
int vehicleQuality
The quality of vehicle drawing.
GUIVisualizationTextSettings drawLinkJunctionIndex
bool generate3DTLSModels
whether 3D TLS models should be generated automatically
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings edgeValue
bool fps
Information whether frames-per-second should be drawn.
bool edgeValueHideCheck2
threshold above which edge data value should not be rendered
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 hide 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.
RGBColor ambient3DLight
3D material light components
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
threshold below which edge data value should not be rendered
bool secondaryShape
whether secondary lane shape shall be drawn
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.
bool show3DHeadUpDisplay
whether to draw the head up display items
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 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)
bool drawReversed
Whether to draw reversed vehicles in their reversed state.
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.
void copy(const GUIVisualizationSettings &s)
copy all content from another GUIVisualizationSettings (note: DON'T USE in DrawGL functions!...
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.
std::string edgeDataScaling
key for scaling by edgeData
ComboBox with icon.
FXint getCurrentItem() const
Get the current item's index.
void setCurrentItem(FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXString getText() const
Get the text.
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
void fillTable()
fill table
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
Definition MFXUtils.cpp:30
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString &currentFolder)
Returns the file name to write.
Definition MFXUtils.cpp:82
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:112
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:106
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
void close()
Closes the device and removes it from the dictionary.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
unsigned char red() const
Returns the red-amount of the color.
Definition RGBColor.cpp:74
void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
assigns new values
Definition RGBColor.cpp:98
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
RGBColor vehicleTripColor
color for vehicle trips
RGBColor selectionColor
basic selection color
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 waypointColor
color for Waypoints
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 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 personTripWidth
width for person trips