Line data Source code
1 : /****************************************************************************/
2 : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 : // Copyright (C) 2001-2026 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 : /****************************************************************************/
14 : /// @file GUIDialog_ViewSettings.h
15 : /// @author Daniel Krajzewicz
16 : /// @author Jakob Erdmann
17 : /// @author Michael Behrisch
18 : /// @date Wed, 21. Dec 2005
19 : ///
20 : // The dialog to change the view (gui) settings.
21 : /****************************************************************************/
22 : #pragma once
23 : #include <config.h>
24 :
25 : #include <utils/foxtools/fxheader.h>
26 : #include <utils/gui/windows/GUISUMOAbstractView.h>
27 : #include <utils/gui/div/GUIPersistentWindowPos.h>
28 : #include <utils/foxtools/MFXDecalsTable.h>
29 :
30 :
31 : // ===========================================================================
32 : // class declarations
33 : // ===========================================================================
34 :
35 : class MFXComboBoxIcon;
36 :
37 : // ===========================================================================
38 : // class definitions
39 : // ===========================================================================
40 : /**
41 : * @class GUIDialog_ViewSettings
42 : * @brief The dialog to change the view (gui) settings.
43 : *
44 : * @todo Check whether saving/loading settings should be done via XML
45 : */
46 : class GUIDialog_ViewSettings : public FXTopWindow, public GUIPersistentWindowPos {
47 : /// @brief FOX Declaration
48 0 : FXDECLARE(GUIDialog_ViewSettings)
49 :
50 : public:
51 : /// @brief NamePanel
52 : class NamePanel {
53 :
54 : public:
55 : /// @brief constructor
56 : NamePanel(FXMatrix* parent, GUIDialog_ViewSettings* target,
57 : const std::string& title,
58 : const GUIVisualizationTextSettings& settings);
59 :
60 : /// @brief get settings
61 : GUIVisualizationTextSettings getSettings();
62 :
63 : /// @brief update
64 : void update(const GUIVisualizationTextSettings& settings);
65 :
66 : /// @brief check button
67 : FXCheckButton* myCheck = nullptr;
68 :
69 : /// @brief size dial
70 : FXRealSpinner* mySizeDial = nullptr;
71 :
72 : /// @brief color well
73 : FXColorWell* myColorWell = nullptr;
74 :
75 : /// @brief BGColor well
76 : FXColorWell* myBGColorWell = nullptr;
77 :
78 : /// @brief draw only for selected?
79 : FXCheckButton* mySelectedCheck = nullptr;
80 :
81 : /// @brief const size check
82 : FXCheckButton* myConstSizeCheck = nullptr;
83 :
84 : /// @brief Matrix
85 : FXMatrix* myMatrix0 = nullptr;
86 : };
87 :
88 : /// @brief SizePanel
89 : class SizePanel : public FXObject {
90 : /// @brief FOX Declaration
91 0 : FXDECLARE(SizePanel)
92 :
93 : public:
94 : /// @brief constructor
95 : SizePanel(FXMatrix* parent, GUIDialog_ViewSettings* target,
96 : const GUIVisualizationSizeSettings& settings, GUIGlObjectType type);
97 :
98 : /// @brief get settings
99 : GUIVisualizationSizeSettings getSettings();
100 :
101 : /// @brief update
102 : void update(const GUIVisualizationSizeSettings& settings);
103 :
104 : /// @name FOX-callbacks
105 : /// @{
106 : /// @brief Called if something (color, width, etc.) has been changed
107 : long onCmdSizeChange(FXObject* obj, FXSelector sel, void* ptr);
108 :
109 : /// @}
110 :
111 : /// @brief min size dial
112 : FXRealSpinner* myMinSizeDial = nullptr;
113 :
114 : /// @brief exaggerate dial
115 : FXRealSpinner* myExaggerateDial = nullptr;
116 :
117 : /// @brief check button
118 : FXCheckButton* myCheck = nullptr;
119 :
120 : /// @brief check selected button
121 : FXCheckButton* myCheckSelected = nullptr;
122 :
123 : protected:
124 : /// @brief FOX needs this
125 0 : FOX_CONSTRUCTOR(SizePanel)
126 :
127 : private:
128 : /// @brief pointer to dialog viewSettings
129 : GUIDialog_ViewSettings* myDialogViewSettings = nullptr;
130 :
131 : /// @brief GLObject type associated with this size
132 : GUIGlObjectType myType = GLO_NETWORK;
133 : };
134 :
135 : /// @brief NamePanel
136 : class RainbowPanel {
137 :
138 : public:
139 : /// @brief constructor
140 : RainbowPanel(FXComposite* parent, GUIDialog_ViewSettings* target,
141 : const GUIVisualizationRainbowSettings& settings);
142 :
143 : /// @brief get settings
144 : GUIVisualizationRainbowSettings getSettings();
145 :
146 : /// @brief update
147 : void update(const GUIVisualizationRainbowSettings& settings);
148 :
149 : FXButton* myColorRainbow = nullptr;
150 :
151 : MFXComboBoxIcon* myRainbowStyle = nullptr;
152 :
153 : /// @brief check button
154 : FXCheckButton* myHideMinCheck = nullptr;
155 :
156 : /// @brief threshold dial
157 : FXRealSpinner* myMinThreshold = nullptr;
158 :
159 : /// @brief check button
160 : FXCheckButton* myHideMaxCheck = nullptr;
161 :
162 : /// @brief threshold dial
163 : FXRealSpinner* myMaxThreshold = nullptr;
164 :
165 : /// @brief check button
166 : FXCheckButton* mySetNeutral = nullptr;
167 :
168 : /// @brief threshold dial
169 : FXRealSpinner* myNeutralThreshold = nullptr;
170 :
171 : /// @brief check button
172 : FXCheckButton* myFixRange = nullptr;
173 : };
174 :
175 : /** @brief Constructor
176 : * @param[in] parent The view to report changed settings to
177 : * @param[in, out] settings The current settings that can be changed
178 : */
179 : GUIDialog_ViewSettings(GUISUMOAbstractView* parent, GUIVisualizationSettings* settings);
180 :
181 : /// @brief FOX need this
182 0 : GUIDialog_ViewSettings() : myBackup("DUMMY") {}
183 :
184 : /// @brief Destructor
185 : ~GUIDialog_ViewSettings();
186 :
187 : /// @brief show view settings dialog
188 : void show();
189 : using FXTopWindow::show; // to silence the warning C4266 about a hidden function
190 :
191 : /// @brief get GUISUMOAbstractView parent
192 : GUISUMOAbstractView* getSUMOAbstractView();
193 :
194 : /** @brief Sets current settings (called if reopened)
195 : * @param[in, out] settings The current settings that can be changed
196 : */
197 : void setCurrent(GUIVisualizationSettings* settings);
198 :
199 : /// @brief keyboard functions
200 : //@{
201 : long onKeyPress(FXObject* o, FXSelector sel, void* data);
202 : //@}
203 :
204 : /// @name FOX-callbacks
205 : /// @{
206 :
207 : /// @brief Called if the OK-button was pressed
208 : long onCmdOk(FXObject*, FXSelector, void*);
209 :
210 : /// @brief Called if the Cancel-button was pressed
211 : long onCmdCancel(FXObject*, FXSelector, void*);
212 :
213 : /// @brief Called if something (color, width, etc.) has been changed
214 : long onCmdColorChange(FXObject*, FXSelector, void*);
215 :
216 : /// @brief Called if the name of the scheme was changed
217 : long onCmdNameChange(FXObject*, FXSelector, void*);
218 :
219 : /// @brief Called if the settings shall be saved into the registry
220 : long onCmdSaveSetting(FXObject*, FXSelector, void* data);
221 :
222 : /// @brief Called when updating the button that allows to save the settings into the registry
223 : long onUpdSaveSetting(FXObject*, FXSelector, void* data);
224 :
225 : /// @brief Called if the settings shall be deleted
226 : long onCmdDeleteSetting(FXObject*, FXSelector, void* data);
227 :
228 : /// @brief Called when updating the button that allows to delete settings
229 : long onUpdDeleteSetting(FXObject*, FXSelector, void* data);
230 :
231 : /// @brief Called if the settings shall be exported into a file
232 : long onCmdExportSetting(FXObject*, FXSelector, void* data);
233 :
234 : /// @brief Called when updating the button that allows to export settings into a file
235 : long onUpdExportSetting(FXObject*, FXSelector, void* data);
236 :
237 : /// @brief Called if the settings shall be read from a file
238 : long onCmdImportSetting(FXObject*, FXSelector, void* data);
239 :
240 : /// @brief Called when updating the button that allows to read settings from a file
241 : long onUpdImportSetting(FXObject*, FXSelector, void* data);
242 :
243 : /// @brief Called if the decal shall be loaded from a file
244 : long onCmdLoadDecal(FXObject*, FXSelector, void* data);
245 :
246 : /// @brief Called if the decals shall be loaded from a file
247 : long onCmdLoadXMLDecals(FXObject*, FXSelector, void* data);
248 :
249 : /// @brief Called if the decals shall be saved to a file
250 : long onCmdSaveXMLDecals(FXObject*, FXSelector, void* data);
251 :
252 : /// @brief Called if the decals shall be cleared
253 : long onCmdClearDecals(FXObject*, FXSelector, void* data);
254 : /// @}
255 :
256 : /** @brief Returns the name of the currently chosen scheme
257 : * @return The name of the edited (chosen) scheme)
258 : */
259 : std::string getCurrentScheme() const;
260 :
261 : /** @brief Sets the named scheme as the current
262 : * @param[in] The name of the scheme that shall be set as current
263 : */
264 : void setCurrentScheme(const std::string&);
265 :
266 0 : void hide() {
267 0 : saveWindowPos();
268 0 : FXTopWindow::hide();
269 0 : }
270 :
271 : protected:
272 : /// @brief The parent view (which settings are changed)
273 : GUISUMOAbstractView* myParent = nullptr;
274 :
275 : /// @brief The current settings
276 : GUIVisualizationSettings* mySettings = nullptr;
277 :
278 : /// @brief A backup of the settings (used if the "Cancel" button is pressed)
279 : GUIVisualizationSettings myBackup;
280 :
281 : /// @name Dialog elements
282 : /// @{
283 :
284 : MFXComboBoxIcon* mySchemeName = nullptr;
285 : FXCheckButton* myShowGrid = nullptr;
286 : FXRealSpinner* myGridXSizeDialer = nullptr;
287 : FXRealSpinner* myGridYSizeDialer = nullptr;
288 :
289 : FXColorWell* myBackgroundColor = nullptr;
290 : MFXDecalsTable* myDecalsTable = nullptr;
291 :
292 : /// @brief selection colors
293 : FXColorWell* mySelectionColor = nullptr;
294 : FXColorWell* mySelectedEdgeColor = nullptr;
295 : FXColorWell* mySelectedLaneColor = nullptr;
296 : FXColorWell* mySelectedConnectionColor = nullptr;
297 : FXColorWell* mySelectedProhibitionColor = nullptr;
298 : FXColorWell* mySelectedCrossingColor = nullptr;
299 : FXColorWell* mySelectedAdditionalColor = nullptr;
300 : FXColorWell* mySelectedRouteColor = nullptr;
301 : FXColorWell* mySelectedVehicleColor = nullptr;
302 : FXColorWell* mySelectedPersonColor = nullptr;
303 : FXColorWell* mySelectedPersonPlanColor = nullptr;
304 : FXColorWell* mySelectedEdgeDataColor = nullptr;
305 :
306 : /// @brief additional colors
307 : FXColorWell* myBusStopColor = nullptr;
308 : FXColorWell* myBusStopColorSign = nullptr;
309 : FXColorWell* myTrainStopColor = nullptr;
310 : FXColorWell* myTrainStopColorSign = nullptr;
311 : FXColorWell* myContainerStopColor = nullptr;
312 : FXColorWell* myContainerStopColorSign = nullptr;
313 : FXColorWell* myParkingAreaColor = nullptr;
314 : FXColorWell* myParkingAreaColorSign = nullptr;
315 : FXColorWell* myParkingSpaceColor = nullptr;
316 : FXColorWell* myParkingSpaceColorSign = nullptr;
317 : FXColorWell* myChargingStationColor = nullptr;
318 : FXColorWell* myChargingStationColorSign = nullptr;
319 : FXColorWell* myStopColor = nullptr;
320 : FXColorWell* myWaypointColor = nullptr;
321 : FXColorWell* myVehicleTripsColor = nullptr;
322 : FXColorWell* myStopPersonsColor = nullptr;
323 : FXColorWell* myPersonTripColor = nullptr;
324 : FXColorWell* myWalkColor = nullptr;
325 : FXColorWell* myRideColor = nullptr;
326 : FXColorWell* myStopContainersColor = nullptr;
327 : FXColorWell* myTransportColor = nullptr;
328 : FXColorWell* myTranshipColor = nullptr;
329 :
330 : /// @brief demand widths
331 :
332 : FXRealSpinner* myTripWidth = nullptr;
333 : FXRealSpinner* myPersonTripWidth = nullptr;
334 : FXRealSpinner* myWalkWidth = nullptr;
335 : FXRealSpinner* myRideWidth = nullptr;
336 : FXRealSpinner* myTransportWidth = nullptr;
337 : FXRealSpinner* myTranshipWidth = nullptr;
338 :
339 : /// @brief ... lane colorer
340 : MFXComboBoxIcon* myLaneEdgeColorMode = nullptr;
341 : FXVerticalFrame* myLaneColorSettingFrame = nullptr;
342 : std::vector<FXColorWell*> myLaneColors;
343 : std::vector<FXRealSpinner*> myLaneThresholds;
344 : std::vector<FXButton*> myLaneButtons;
345 : FXCheckButton* myLaneColorInterpolation = nullptr;
346 : FXComboBox* myParamKey = nullptr;
347 : FXComboBox* myScalingParamKey = nullptr;
348 : MFXComboBoxIcon* myMeanDataID = nullptr;
349 :
350 : /// @brief ... lane scaler
351 : MFXComboBoxIcon* myLaneEdgeScaleMode = nullptr;
352 : FXVerticalFrame* myLaneScaleSettingFrame = nullptr;
353 : std::vector<FXRealSpinner*> myLaneScales;
354 : std::vector<FXRealSpinner*> myLaneScaleThresholds;
355 : std::vector<FXButton*> myLaneScaleButtons;
356 : FXCheckButton* myLaneScaleInterpolation = nullptr;
357 :
358 : FXCheckButton* myShowLaneBorders = nullptr;
359 : FXCheckButton* myShowBikeMarkings = nullptr;
360 : FXCheckButton* myShowLaneDecals = nullptr;
361 : FXCheckButton* myRealisticLinkRules = nullptr;
362 : FXCheckButton* myShowLinkRules = nullptr;
363 : FXCheckButton* myShowRails = nullptr;
364 : FXCheckButton* mySecondaryShape = nullptr;
365 : FXCheckButton* myHideMacroConnectors = nullptr;
366 : FXCheckButton* myShowLaneDirection = nullptr;
367 : FXCheckButton* myShowSublanes = nullptr;
368 : FXCheckButton* mySpreadSuperposed = nullptr;
369 : FXCheckButton* myDisableHideByZoom = nullptr;
370 : FXRealSpinner* myLaneWidthUpscaleDialer = nullptr;
371 : FXRealSpinner* myLaneMinWidthDialer = nullptr;
372 :
373 : /// @brief Vehicles
374 : MFXComboBoxIcon* myVehicleColorMode, *myVehicleShapeDetail = nullptr;
375 : FXVerticalFrame* myVehicleColorSettingFrame = nullptr;
376 : std::vector<FXColorWell*> myVehicleColors;
377 : std::vector<FXRealSpinner*> myVehicleThresholds;
378 : std::vector<FXButton*> myVehicleButtons;
379 : FXCheckButton* myVehicleColorInterpolation = nullptr;
380 :
381 : /// @brief vehicle scaler
382 : MFXComboBoxIcon* myVehicleScaleMode = nullptr;
383 : FXVerticalFrame* myVehicleScaleSettingFrame = nullptr;
384 : std::vector<FXRealSpinner*> myVehicleScales;
385 : std::vector<FXRealSpinner*> myVehicleScaleThresholds;
386 : std::vector<FXButton*> myVehicleScaleButtons;
387 : FXCheckButton* myVehicleScaleInterpolation = nullptr;
388 :
389 : FXCheckButton* myShowBlinker = nullptr;
390 : FXCheckButton* myShowMinGap = nullptr;
391 : FXCheckButton* myShowBrakeGap = nullptr;
392 : FXCheckButton* myShowBTRange = nullptr;
393 : FXCheckButton* myShowRouteIndex = nullptr;
394 : FXCheckButton* myScaleLength = nullptr;
395 : FXCheckButton* myDrawReversed = nullptr;
396 : FXCheckButton* myShowParkingInfo = nullptr;
397 : FXCheckButton* myShowChargingInfo = nullptr;
398 : /*FXCheckButton* myShowLaneChangePreference = nullptr;*/
399 :
400 : FXComboBox* myVehicleParamKey = nullptr;
401 : FXComboBox* myVehicleScalingParamKey = nullptr;
402 : FXComboBox* myVehicleTextParamKey = nullptr;
403 :
404 : /// @brief Persons
405 : MFXComboBoxIcon* myPersonColorMode, *myPersonShapeDetail = nullptr;
406 : FXVerticalFrame* myPersonColorSettingFrame = nullptr;
407 : std::vector<FXColorWell*> myPersonColors;
408 : std::vector<FXRealSpinner*> myPersonThresholds;
409 : std::vector<FXButton*> myPersonButtons;
410 : FXCheckButton* myPersonColorInterpolation = nullptr;
411 : FXCheckButton* myShowPedestrianNetwork = nullptr;
412 : FXColorWell* myPedestrianNetworkColor = nullptr;
413 :
414 : /// @brief Containers
415 : MFXComboBoxIcon* myContainerColorMode, *myContainerShapeDetail = nullptr;
416 : FXVerticalFrame* myContainerColorSettingFrame = nullptr;
417 : std::vector<FXColorWell*> myContainerColors;
418 : std::vector<FXRealSpinner*> myContainerThresholds;
419 : std::vector<FXButton*> myContainerButtons;
420 : FXCheckButton* myContainerColorInterpolation = nullptr;
421 : FXRealSpinner* myContainerMinSizeDialer, *myContainerUpscaleDialer = nullptr;
422 :
423 : /// @brief junctions
424 : MFXComboBoxIcon* myJunctionColorMode = nullptr;
425 : FXVerticalFrame* myJunctionColorSettingFrame = nullptr;
426 : std::vector<FXColorWell*> myJunctionColors;
427 : std::vector<FXRealSpinner*> myJunctionThresholds;
428 : std::vector<FXButton*> myJunctionButtons;
429 : FXCheckButton* myJunctionColorInterpolation = nullptr;
430 :
431 : /// @brief POIs
432 : MFXComboBoxIcon* myPOIColorMode, *myPOIShapeDetail = nullptr;
433 : FXVerticalFrame* myPOIColorSettingFrame = nullptr;
434 : std::vector<FXColorWell*> myPOIColors;
435 : std::vector<FXRealSpinner*> myPOIThresholds;
436 : std::vector<FXButton*> myPOIButtons;
437 : FXCheckButton* myPOIColorInterpolation = nullptr;
438 : FXComboBox* myPOITextParamKey = nullptr;
439 : FXSpinner* myPoiDetail = nullptr;
440 : FXCheckButton* myPOIUseCustomLayer = nullptr;
441 : FXRealSpinner* myPOICustomLayer = nullptr;
442 :
443 : /// @brief Polygons
444 : MFXComboBoxIcon* myPolyColorMode, *myPolyShapeDetail = nullptr;
445 : FXVerticalFrame* myPolyColorSettingFrame = nullptr;
446 : std::vector<FXColorWell*> myPolyColors;
447 : std::vector<FXRealSpinner*> myPolyThresholds;
448 : std::vector<FXButton*> myPolyButtons;
449 : FXCheckButton* myPolyColorInterpolation = nullptr;
450 : FXCheckButton* myPolyUseCustomLayer = nullptr;
451 : FXRealSpinner* myPolyCustomLayer = nullptr;
452 :
453 : /// @brief Data color
454 : MFXComboBoxIcon* myDataColorMode = nullptr;
455 : FXVerticalFrame* myDataColorSettingFrame = nullptr;
456 : std::vector<FXColorWell*> myDataColors;
457 : std::vector<FXRealSpinner*> myDataThresholds;
458 : std::vector<FXButton*> myDataButtons;
459 : FXCheckButton* myDataColorInterpolation = nullptr;
460 : FXComboBox* myDataParamKey = nullptr;
461 : FXRealSpinner* myEdgeRelationUpscaleDialer = nullptr;
462 : FXRealSpinner* myTazRelationUpscaleDialer = nullptr;
463 :
464 : /// @brief Data scaler
465 : MFXComboBoxIcon* myDataScaleMode = nullptr;
466 : FXVerticalFrame* myDataScaleSettingFrame = nullptr;
467 : std::vector<FXRealSpinner*> myDataScales;
468 : std::vector<FXRealSpinner*> myDataScaleThresholds;
469 : std::vector<FXButton*> myDataScaleButtons;
470 : FXCheckButton* myDataScaleInterpolation = nullptr;
471 : FXComboBox* myDataScaleParamKey = nullptr;
472 :
473 : /// @brief buttons
474 : FXCheckButton* myShowLane2Lane = nullptr;
475 : FXCheckButton* myDrawJunctionShape = nullptr;
476 : FXCheckButton* myDrawCrossingsAndWalkingAreas = nullptr;
477 : FXCheckButton* myShowSizeLegend = nullptr;
478 : FXCheckButton* myShowColorLegend = nullptr;
479 : FXCheckButton* myShowVehicleColorLegend = nullptr;
480 :
481 : /// @brief
482 : FXCheckButton* myIgnoreColorSchemeFor3DVehicles = nullptr;
483 : FXCheckButton* myShow3DTLSLinkMarkers = nullptr;
484 : FXCheckButton* myShow3DTLSDomes = nullptr;
485 : FXCheckButton* myShow3DHeadUpDisplay = nullptr;
486 : FXCheckButton* myGenerate3DTLSModels = nullptr;
487 : FXSpinner* myLight3DFactor = nullptr;
488 : //FXColorWell* myAmbient3DLight = nullptr;
489 : //FXColorWell* myDiffuse3DLight = nullptr;
490 : FXColorWell* mySkyColor = nullptr;
491 :
492 : /// @brief openGL
493 : FXCheckButton* myDither = nullptr;
494 : FXCheckButton* myFPS = nullptr;
495 : FXCheckButton* myTrueZ = nullptr;
496 : FXCheckButton* myDrawBoundaries = nullptr;
497 : FXCheckButton* myForceDrawForRectangleSelection = nullptr;
498 : FXCheckButton* myDisableDottedContours = nullptr;
499 : FXButton* myRecalculateBoundaries = nullptr;
500 : FXRealSpinner* myComboRows = nullptr;
501 : FXRealSpinner* myUIScale = nullptr;
502 :
503 : /// @brief name panels
504 : NamePanel* myEdgeNamePanel = nullptr;
505 : NamePanel* myInternalEdgeNamePanel = nullptr;
506 : NamePanel* myCwaEdgeNamePanel = nullptr;
507 : NamePanel* myStreetNamePanel = nullptr;
508 : NamePanel* myEdgeValuePanel = nullptr;
509 : NamePanel* myEdgeScaleValuePanel = nullptr;
510 : NamePanel* myJunctionIndexPanel = nullptr;
511 : NamePanel* myTLIndexPanel = nullptr;
512 : NamePanel* myJunctionIDPanel = nullptr;
513 : NamePanel* myJunctionNamePanel = nullptr;
514 : NamePanel* myInternalJunctionNamePanel = nullptr;
515 : NamePanel* myTLSPhaseIndexPanel = nullptr;
516 : NamePanel* myTLSPhaseNamePanel = nullptr;
517 : NamePanel* myVehicleNamePanel = nullptr;
518 : NamePanel* myVehicleValuePanel = nullptr;
519 : NamePanel* myVehicleScaleValuePanel = nullptr;
520 : NamePanel* myVehicleTextPanel = nullptr;
521 : NamePanel* myPersonNamePanel = nullptr;
522 : NamePanel* myPersonValuePanel = nullptr;
523 : NamePanel* myContainerNamePanel = nullptr;
524 : NamePanel* myAddNamePanel = nullptr;
525 : NamePanel* myAddFullNamePanel = nullptr;
526 : NamePanel* myPOINamePanel = nullptr;
527 : NamePanel* myPOITypePanel = nullptr;
528 : NamePanel* myPOITextPanel = nullptr;
529 : NamePanel* myPolyNamePanel = nullptr;
530 : NamePanel* myPolyTypePanel = nullptr;
531 : NamePanel* myDataValuePanel = nullptr;
532 : NamePanel* myGeometryIndicesPanel = nullptr;
533 :
534 : /// @brief size panels
535 : SizePanel* myVehicleSizePanel = nullptr;
536 : SizePanel* myPersonSizePanel = nullptr;
537 : SizePanel* myContainerSizePanel = nullptr;
538 : SizePanel* myPOISizePanel = nullptr;
539 : SizePanel* myPolySizePanel = nullptr;
540 : SizePanel* myAddSizePanel = nullptr;
541 : SizePanel* myJunctionSizePanel = nullptr;
542 :
543 : /// @brief rainbow panels
544 : RainbowPanel* myEdgeRainbowPanel = nullptr;
545 : RainbowPanel* myJunctionRainbowPanel = nullptr;
546 : RainbowPanel* myDataRainbowPanel = nullptr;
547 : RainbowPanel* myVehicleRainbowPanel = nullptr;
548 :
549 : /// @brief load/save-menu
550 : FXCheckButton* mySaveViewPort = nullptr;
551 : FXCheckButton* mySaveDelay = nullptr;
552 : FXCheckButton* mySaveDecals = nullptr;
553 : FXCheckButton* mySaveBreakpoints = nullptr;
554 :
555 : /// @}
556 :
557 : /// @brief Frame3D
558 : FXTabItem* myFrame3D = nullptr;
559 :
560 : /// @brief update color ranges
561 : bool updateColorRanges(FXObject* sender, std::vector<FXColorWell*>::const_iterator colIt,
562 : std::vector<FXColorWell*>::const_iterator colEnd,
563 : std::vector<FXRealSpinner*>::const_iterator threshIt,
564 : std::vector<FXRealSpinner*>::const_iterator threshEnd,
565 : std::vector<FXButton*>::const_iterator buttonIt,
566 : GUIColorScheme& scheme);
567 :
568 : /// @brief update scale ranges
569 : bool updateScaleRanges(FXObject* sender, std::vector<FXRealSpinner*>::const_iterator colIt,
570 : std::vector<FXRealSpinner*>::const_iterator colEnd,
571 : std::vector<FXRealSpinner*>::const_iterator threshIt,
572 : std::vector<FXRealSpinner*>::const_iterator threshEnd,
573 : std::vector<FXButton*>::const_iterator buttonIt,
574 : GUIScaleScheme& scheme);
575 :
576 : /// @brief Rebuilds manipulators for the current coloring scheme
577 : FXMatrix* rebuildColorMatrix(FXVerticalFrame* frame,
578 : std::vector<FXColorWell*>& colors,
579 : std::vector<FXRealSpinner*>& thresholds,
580 : std::vector<FXButton*>& buttons,
581 : FXCheckButton* interpolation,
582 : GUIColorScheme& scheme);
583 :
584 : /// @brief Rebuilds manipulators for the current scaling scheme
585 : FXMatrix* rebuildScaleMatrix(FXVerticalFrame* frame,
586 : std::vector<FXRealSpinner*>& scales,
587 : std::vector<FXRealSpinner*>& thresholds,
588 : std::vector<FXButton*>& buttons,
589 : FXCheckButton* interpolation,
590 : GUIScaleScheme& scheme);
591 :
592 : /** @brief Rebuilds color changing dialogs after choosing another coloring scheme
593 : * @param[in] doCreate Whether "create" shall be called (only if built the first time)
594 : */
595 : void rebuildColorMatrices(bool doCreate = false);
596 :
597 : /** @brief Loads a scheme from a file
598 : * @param[in] file The name of the file to read the settings from
599 : */
600 : void loadSettings(const std::string& file);
601 :
602 : /** @brief Writes the currently used decals into a file
603 : * @param[in] file The name of the file to write the decals into
604 : */
605 : void saveDecals(OutputDevice& dev) const;
606 :
607 : /** @brief Loads decals from a file
608 : * @param[in] file The name of the file to read the decals from
609 : */
610 : void loadDecals(const std::string& file);
611 :
612 : /// @brief reload known vehicle parameters
613 : void updateVehicleParams();
614 :
615 : /// @brief reload known POI parameters
616 : void updatePOIParams();
617 :
618 : /// @brief build header
619 : void buildHeader(FXVerticalFrame* contentFrame);
620 :
621 : /// @brief build frames
622 : /// @{
623 :
624 : void buildBackgroundFrame(FXTabBook* tabbook);
625 : void buildStreetsFrame(FXTabBook* tabbook);
626 : void buildVehiclesFrame(FXTabBook* tabbook);
627 : void buildPersonsFrame(FXTabBook* tabbook);
628 : void buildContainersFrame(FXTabBook* tabbook);
629 : void buildJunctionsFrame(FXTabBook* tabbook);
630 : void buildAdditionalsFrame(FXTabBook* tabbook);
631 : void buildDemandFrame(FXTabBook* tabbook);
632 : void buildPOIsFrame(FXTabBook* tabbook);
633 : void buildPolygonsFrame(FXTabBook* tabbook);
634 : void buildSelectionFrame(FXTabBook* tabbook);
635 : void buildDataFrame(FXTabBook* tabbook);
636 : void buildLegendFrame(FXTabBook* tabbook);
637 : void buildOpenGLFrame(FXTabBook* tabbook);
638 : void build3DFrame(FXTabBook* tabbook);
639 :
640 : ///@}
641 :
642 : /// @brief build buttons
643 : void buildButtons(FXVerticalFrame* contentFrame);
644 :
645 : private:
646 : /// @brief invalidated copy constructor
647 : GUIDialog_ViewSettings(const GUIDialog_ViewSettings& s) = delete;
648 :
649 : /// @brief invalidated assignment operator
650 : GUIDialog_ViewSettings& operator=(const GUIDialog_ViewSettings& s) = delete;
651 : };
|