Eclipse SUMO - Simulation of Urban MObility
GNEFlowEditor.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 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 /****************************************************************************/
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
25 
26 // ===========================================================================
27 // class declaration
28 // ===========================================================================
29 
30 class GNEFrame;
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
35 
38  FXDECLARE(GNEFlowEditor)
39 
40 public:
42  GNEFlowEditor(GNEViewNet* viewNet, GNEFrame* frameParent);
43 
46 
48  void showFlowEditor(const std::vector<GNEAttributeCarrier*> editedFlows);
49 
51  void hideFlowEditor();
52 
54  bool shownFlowEditor() const;
55 
57  void refreshFlowEditor();
58 
61 
63  bool areFlowValuesValid() const;
64 
68  long onCmdSetFlowAttribute(FXObject*, FXSelector, void*);
69 
71 
72 protected:
75 
77  void refreshSingleFlow();
78 
80  void refreshMultipleFlows();
81 
83  const std::string getFlowAttribute(SumoXMLAttr attr);
84 
85 private:
88 
91 
93  FXHorizontalFrame* myTerminateFrameTextField = nullptr;
94 
97 
99  FXTextField* myTerminateTextField = nullptr;
100 
102  FXHorizontalFrame* mySpacingFrameComboBox = nullptr;
103 
106 
108  FXHorizontalFrame* mySpacingFrameTextField = nullptr;
109 
112 
114  FXTextField* mySpacingTextField = nullptr;
115 
117  std::vector<GNEAttributeCarrier*> myEditedFlows;
118 
121 };
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_NOTHING
invalid attribute
void getFlowAttributes(CommonXMLStructure::SumoBaseObject *baseObject)
get flow attributes
long onCmdSetFlowAttribute(FXObject *, FXSelector, void *)
void refreshSingleFlow()
refresh single flow
MFXLabelTooltip * mySpacingLabel
Label for spacing.
FXTextField * myTerminateTextField
textField for terminate attribute
Definition: GNEFlowEditor.h:99
MFXComboBoxIcon * myTerminateComboBox
ComboBox for terminate options (end, number, end/number)
Definition: GNEFlowEditor.h:90
FOX_CONSTRUCTOR(GNEFlowEditor)
FOX need this.
SumoXMLAttr myPerHourAttr
per hours attr (vehicles/person/container)
MFXComboBoxIcon * mySpacingComboBox
ComboBox for spacing comboBox (perHour, period, probability)
GNEViewNet * myViewNet
pointer to viewNet
Definition: GNEFlowEditor.h:87
const std::string getFlowAttribute(SumoXMLAttr attr)
get flow attribute (of the current edited flows)
GNEFlowEditor(GNEViewNet *viewNet, GNEFrame *frameParent)
FOX-declaration.
void refreshFlowEditor()
refresh GNEFlowEditor
FXHorizontalFrame * mySpacingFrameTextField
horizontal frame for spacing textField
MFXLabelTooltip * myTerminateLabel
Label for terminate definition.
Definition: GNEFlowEditor.h:96
~GNEFlowEditor()
destructor
void hideFlowEditor()
hide group box
FXTextField * mySpacingTextField
textField for spacing attribute
std::vector< GNEAttributeCarrier * > myEditedFlows
edited flows
void showFlowEditor(const std::vector< GNEAttributeCarrier * > editedFlows)
show GNEFlowEditor modul
void refreshMultipleFlows()
refresh multiple flows
bool shownFlowEditor() const
shown GNEFlowEditor modul
FXHorizontalFrame * mySpacingFrameComboBox
horizontal frame for terminate options
FXHorizontalFrame * myTerminateFrameTextField
horizontal frame for terminate definition
Definition: GNEFlowEditor.h:93
bool areFlowValuesValid() const
check if parameters of attributes are valid
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)