Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEGenericDataFrame.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/****************************************************************************/
18// The Widget for add genericData elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30class GNEDataInterval;
31class GNEDataSet;
32
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
42
43public:
44 // ===========================================================================
45 // class DataSetSelector
46 // ===========================================================================
47
51
52 public:
54 DataSetSelector(GNEGenericDataFrame* genericDataFrameParent);
55
58
60 void refreshDataSetSelector(const GNEDataSet* currentDataSet);
61
63 GNEDataSet* getDataSet() const;
64
68 long onCmdCreateDataSet(FXObject*, FXSelector, void*);
69
71 long onCmdSetNewDataSetID(FXObject*, FXSelector, void*);
72
74 long onCmdSelectDataSet(FXObject* obj, FXSelector, void*);
75
77 long onCmdSelectCheckButton(FXObject* obj, FXSelector, void*);
78
80
81 protected:
82 FOX_CONSTRUCTOR(DataSetSelector)
83
84 private:
87
90
92 FXHorizontalFrame* myHorizontalFrameNewID;
93
96
99
102 };
103
104 // ===========================================================================
105 // class IntervalSelector
106 // ===========================================================================
107
111
112 public:
114 IntervalSelector(GNEGenericDataFrame* genericDataFrameParent);
115
118
120 void enableContents() const;
121
123 void disableContents() const;
124
127
130
134 long onCmdCreateInterval(FXObject*, FXSelector, void*);
135
137 long onCmdSelectInterval(FXObject*, FXSelector, void*);
138
140 long onCmdSetIntervalAttribute(FXObject*, FXSelector, void*);
141
143 long onCmdSelectCheckButton(FXObject* obj, FXSelector, void*);
144
146
147 protected:
149 FOX_CONSTRUCTOR(IntervalSelector)
150
151 private:
153 FXTreeItem* addIntervalItem(GNEDataInterval* dataInterval, FXTreeItem* itemParent = nullptr);
154
157
160
162 FXHorizontalFrame* myHorizontalFrameBegin;
163
165 FXTextField* myBeginTextField;
166
168 FXHorizontalFrame* myHorizontalFrameEnd;
169
171 FXTextField* myEndTextField;
172
175
178
180 std::map<FXTreeItem*, GNEDataInterval*> myTreeItemIntervalMap;
181 };
182
183 // ===========================================================================
184 // class AttributeSelector
185 // ===========================================================================
186
190
191 public:
193 AttributeSelector(GNEGenericDataFrame* genericDataFrameParent, SumoXMLTag tag);
194
197
200
202 std::string getFilteredAttribute() const;
203
205 const RGBColor& getScaledColor(const double min, const double max, const double value) const;
206
209
211 long onCmdSelectAttribute(FXObject*, FXSelector, void*);
212
214
215 protected:
216 FOX_CONSTRUCTOR(AttributeSelector)
217
218 private:
221
224
227
230 };
231
233 const DataSetSelector* getDataSetSelector() const;
234
237
240
243
245 SumoXMLTag getTag() const;
246
248 void show();
249
251 void hide();
252
255
256protected:
263 GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator);
264
267
269 void intervalSelected();
270
272 virtual bool createPath(const bool useLastRoute);
273
276
279
282
285
288
291
292private:
295
298};
SumoXMLTag
Numbers representing SUMO-XML - element names.
An Element which don't belong to GNENet but has influence in the simulation.
long onCmdSelectAttribute(FXObject *, FXSelector, void *)
Called when the user select a attribute in the combo boz.
const RGBColor & getScaledColor(const double min, const double max, const double value) const
get color for the given value
FXLabel * myMinMaxLabel
label for min/max attribute
void refreshAttributeSelector()
refresh interval selector
GNEGenericDataFrame * myGenericDataFrameParent
pointer to genericData frame Parent
std::string getFilteredAttribute() const
get filtered attribute
SumoXMLTag myGenericDataTag
generic data tag
MFXComboBoxIcon * myAttributesComboBox
combo box for attributes
GNEDataSet * getDataSet() const
get current select data set ID
long onCmdSelectDataSet(FXObject *obj, FXSelector, void *)
Called when the user select an existent data set.
long onCmdCreateDataSet(FXObject *, FXSelector, void *)
FXButton * myCreateDataSetButton
create dataSet button
void refreshDataSetSelector(const GNEDataSet *currentDataSet)
refresh interval selector
FXHorizontalFrame * myHorizontalFrameNewID
horizontal frame new id
MFXComboBoxIcon * myDataSetsComboBox
comboBox with intervals
long onCmdSetNewDataSetID(FXObject *, FXSelector, void *)
Called when the user set a new data set ID.
long onCmdSelectCheckButton(FXObject *obj, FXSelector, void *)
Called when the user select check button.
FXTextField * myNewDataSetIDTextField
interval new id
GNEGenericDataFrame * myGenericDataFrameParent
pointer to genericData frame Parent
FXCheckButton * myNewDataSetCheckButton
check button to create a new dataSet
FXTreeList * myIntervalsTreelist
tree list to show the interval list
FXTreeItem * addIntervalItem(GNEDataInterval *dataInterval, FXTreeItem *itemParent=nullptr)
FOX needs this.
FXHorizontalFrame * myHorizontalFrameEnd
interval end horizontal frame
GNEDataInterval * getDataInterval() const
get current select data set ID
long onCmdCreateInterval(FXObject *, FXSelector, void *)
std::map< FXTreeItem *, GNEDataInterval * > myTreeItemIntervalMap
map used to save the Tree items with their GNEDataInterval
GNEGenericDataFrame * myGenericDataFrameParent
pointer to genericData frame Parent
void disableContents() const
disable contents
FXCheckButton * myNewIntervalCheckButton
check button to create a new interval
FXButton * myCreateIntervalButton
create interval button
FXHorizontalFrame * myHorizontalFrameBegin
interval begin horizontal frame
long onCmdSetIntervalAttribute(FXObject *, FXSelector, void *)
Called when the user changes begin or end.
long onCmdSelectInterval(FXObject *, FXSelector, void *)
Called when the user select an interval in the list.
void refreshIntervalSelector()
refresh interval selector
long onCmdSelectCheckButton(FXObject *obj, FXSelector, void *)
Called when the user select check button.
FXTextField * myBeginTextField
interval begin text field
GNEGenericDataFrame & operator=(const GNEGenericDataFrame &)=delete
Invalidated assignment operator.
GNEGenericDataFrame(const GNEGenericDataFrame &)=delete
Invalidated copy constructor.
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame
GNEFrameAttributeModules::GenericDataAttributes * myGenericDataAttributes
parameters editor creator
virtual bool createPath(const bool useLastRoute)
create path
void intervalSelected()
interval selected
IntervalSelector * myIntervalSelector
interval selector modul
DataSetSelector * myDataSetSelector
dataSet selector modul
const AttributeSelector * getAttributeSelector() const
getattribute selector modul
GNEPathCreator * getPathCreator() const
get GNEPathCreator modul
AttributeSelector * myAttributeSelector
attribute selector modul
const DataSetSelector * getDataSetSelector() const
get dataSet selector modul
SumoXMLTag getTag() const
@bried get element type of this data frame
SumoXMLTag myGenericDataTag
generic data tag
GNEPathCreator * myPathCreator
edge path creator (used for Walks, rides and trips)
const IntervalSelector * getIntervalSelector() const
get interval selector modul
A single child window which contains a view of the simulation area.
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)