Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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
30class GNEFrame;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
38 FXDECLARE(GNEFlowEditor)
39
40public:
42 GNEFlowEditor(GNEViewNet* viewNet, GNEFrame* frameParent);
43
46
48 void showFlowEditor(GNEAttributeCarrier* firstEditedFlow, const std::unordered_set<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
72protected:
75
77 void refreshSingleFlow();
78
81
83 const std::string getFlowAttribute(SumoXMLAttr attr);
84
85private:
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::unordered_set<GNEAttributeCarrier*> myEditedFlows;
118
121
124};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
void getFlowAttributes(CommonXMLStructure::SumoBaseObject *baseObject)
get flow attributes
long onCmdSetFlowAttribute(FXObject *, FXSelector, void *)
std::unordered_set< GNEAttributeCarrier * > myEditedFlows
edited flows
void refreshSingleFlow()
refresh single flow
MFXLabelTooltip * mySpacingLabel
Label for spacing.
FXTextField * myTerminateTextField
textField for terminate attribute
MFXComboBoxIcon * myTerminateComboBox
ComboBox for terminate options (end, number, end/number)
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
const std::string getFlowAttribute(SumoXMLAttr attr)
get flow attribute (of the current edited flows)
void showFlowEditor(GNEAttributeCarrier *firstEditedFlow, const std::unordered_set< GNEAttributeCarrier * > editedFlows)
show GNEFlowEditor modul
void refreshFlowEditor()
refresh GNEFlowEditor
FXHorizontalFrame * mySpacingFrameTextField
horizontal frame for spacing textField
MFXLabelTooltip * myTerminateLabel
Label for terminate definition.
~GNEFlowEditor()
destructor
void hideFlowEditor()
hide group box
FXTextField * mySpacingTextField
textField for spacing attribute
void refreshMultipleFlows()
refresh multiple flows
bool shownFlowEditor() const
shown GNEFlowEditor modul
GNEAttributeCarrier * myFirstEditedFlow
first edited flow
FXHorizontalFrame * mySpacingFrameComboBox
horizontal frame for terminate options
FXHorizontalFrame * myTerminateFrameTextField
horizontal frame for terminate definition
bool areFlowValuesValid() const
check if parameters of attributes are valid
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)