Eclipse SUMO - Simulation of Urban MObility
GNEGenericDataFrame.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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#include <config.h>
21
22#include <netedit/GNENet.h>
23#include <netedit/GNEViewNet.h>
28
29#include "GNEGenericDataFrame.h"
30
31
32// ===========================================================================
33// FOX callback mapping
34// ===========================================================================
35
41
42};
43
49};
50
53};
54
55// Object implementation
56FXIMPLEMENT(GNEGenericDataFrame::DataSetSelector, MFXGroupBoxModule, DataSetSelectorMap, ARRAYNUMBER(DataSetSelectorMap))
57FXIMPLEMENT(GNEGenericDataFrame::IntervalSelector, MFXGroupBoxModule, IntervalSelectorMap, ARRAYNUMBER(IntervalSelectorMap))
58FXIMPLEMENT(GNEGenericDataFrame::AttributeSelector, MFXGroupBoxModule, AttributeSelectorMap, ARRAYNUMBER(AttributeSelectorMap))
59
60// ===========================================================================
61// method definitions
62// ===========================================================================
63
64// ---------------------------------------------------------------------------
65// GNEGenericDataFrame::DataSetSelector - methods
66// ---------------------------------------------------------------------------
67
69 MFXGroupBoxModule(genericDataFrameParent, TL("DataSet")),
70 myGenericDataFrameParent(genericDataFrameParent) {
71 // create check button for new data set
72 myNewDataSetCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new dataSet"), this, MID_GNE_SELECT, GUIDesignCheckButton);
73 // Create FXComboBox
74 myDataSetsComboBox = new FXComboBox(getCollapsableFrame(), GUIDesignComboBoxNCol, this, MID_GNE_DATASET_SELECTED, GUIDesignComboBox);
75 // create new id label
76 myHorizontalFrameNewID = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
77 new FXLabel(myHorizontalFrameNewID, "new dataSet ID", nullptr, GUIDesignLabelAttribute);
78 // create new id textField
79 myNewDataSetIDTextField = new FXTextField(myHorizontalFrameNewID, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
80 // hide horizontal frame
81 myHorizontalFrameNewID->hide();
82 // create dataSet button
83 myCreateDataSetButton = new FXButton(getCollapsableFrame(), TL("Create dataSet"), GUIIconSubSys::getIcon(GUIIcon::DATASET), this, MID_GNE_CREATE, GUIDesignButton);
84 myCreateDataSetButton->hide();
85 // refresh interval selector
86 refreshDataSetSelector(nullptr);
87 // DataSetSelector is always shown
88 show();
89}
90
91
93
94
95void
97 // clear items
98 myDataSetsComboBox->clearItems();
99 // declare item index
100 int currentItemIndex = -1;
101 // fill myDataSetsComboBox with all DataSets
102 for (const auto& dataSet : myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDataSets()) {
103 // check if we have to set currentItemIndex
104 if ((currentItemIndex == -1) && (dataSet == currentDataSet)) {
105 currentItemIndex = myDataSetsComboBox->getNumItems();
106 }
107 myDataSetsComboBox->appendItem(dataSet->getID().c_str());
108 }
109 // Set visible items
110 myDataSetsComboBox->setNumVisible((int)myDataSetsComboBox->getNumItems());
111 // check if we have to set current element
112 if (currentItemIndex != -1) {
113 myDataSetsComboBox->setCurrentItem(currentItemIndex, FALSE);
114 }
115 // recalc frame
116 recalc();
117 // refresh interval selector
118 if (myGenericDataFrameParent->myIntervalSelector) {
119 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
120 }
121}
122
123
126 if ((myNewDataSetCheckButton->getCheck() == TRUE) || (myDataSetsComboBox->getNumItems() == 0)) {
127 return nullptr;
128 } else {
129 return myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(myDataSetsComboBox->getItem(myDataSetsComboBox->getCurrentItem()).text(), false);
130 }
131}
132
133
134long
136 // get string
137 const std::string dataSetID = myNewDataSetIDTextField->getText().text();
138 // check conditions
139 if (myNewDataSetIDTextField->getTextColor() == FXRGB(255, 0, 0)) {
140 WRITE_WARNING(TL("Invalid dataSet ID"));
141 } else if (dataSetID.empty()) {
142 WRITE_WARNING(TL("Invalid empty dataSet ID"));
143 } else if (myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID, false) != nullptr) {
144 WRITE_WARNING(TL("Invalid duplicated dataSet ID"));
145 } else {
146 // build data set
147 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "", true);
148 dataHandler.buildDataSet(dataSetID);
149 // refresh tag selector
150 refreshDataSetSelector(myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID));
151 // change check button
152 myNewDataSetCheckButton->setCheck(FALSE, TRUE);
153 }
154 return 1;
155}
156
157
158long
160 //
161 return 1;
162}
163
164
165long
167 // update interval modul
168 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
169 return 1;
170}
171
172
173long
175 if (myNewDataSetCheckButton->getCheck() == TRUE) {
176 // enable textfield and label
177 myHorizontalFrameNewID->show();
178 myCreateDataSetButton->show();
179 // disable comboBox
180 myDataSetsComboBox->hide();
181 } else {
182 // disable textfield and label
183 myHorizontalFrameNewID->hide();
184 myCreateDataSetButton->hide();
185 // enable comboBox
186 myDataSetsComboBox->show();
187 }
188 // update interval modul
189 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
190 return 1;
191}
192
193// ---------------------------------------------------------------------------
194// GNEGenericDataFrame::IntervalSelector - methods
195// ---------------------------------------------------------------------------
196
198 MFXGroupBoxModule(genericDataFrameParent, TL("Interval")),
199 myGenericDataFrameParent(genericDataFrameParent) {
200 // create check button for new interval
201 myNewIntervalCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new interval"), this, MID_GNE_SELECT, GUIDesignCheckButton);
202 // create begin label
205 // create begin TextField
207 myBeginTextField->setText("0");
208 // hide horizontal frame begin
210 // create end label
213 // create end textfield
215 myEndTextField->setText("3600");
216 // hide horizontal frame end
217 myHorizontalFrameEnd->hide();
218 // create interval button
221 // Create three list
223 // refresh interval selector
225 // IntervalSelector is always shown
226 show();
227}
228
229
231
232
233void
235 // first clear items from tree and intervalMap
236 myIntervalsTreelist->clearItems();
237 myTreeItemIntervalMap.clear();
238 // obtain data set
239 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
240 // add intervals
241 if (dataSet) {
242 // insert dataSetItem in Tree list
243 FXTreeItem* dataSetItem = myIntervalsTreelist->insertItem(
244 nullptr, nullptr,
245 dataSet->getHierarchyName().c_str(),
248 // by default item is expanded
249 dataSetItem->setExpanded(true);
250 // iterate over intevals
251 for (const auto& interval : dataSet->getDataIntervalChildren()) {
252 addIntervalItem(interval.second, dataSetItem);
253 }
254 }
255 // refresh attribute selector
256 if (myGenericDataFrameParent->myAttributeSelector) {
257 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
258 }
259 // recalc frame
260 recalc();
261}
262
263
266 // first check if there is elements in interval tree
267 if (myIntervalsTreelist->getNumItems() > 0) {
268 for (const auto& treeItem : myTreeItemIntervalMap) {
269 if (treeItem.first->isSelected()) {
270 return treeItem.second;
271 }
272 }
273 }
274 // no GNEDataInterval found, then return nullptr
275 return nullptr;
276}
277
278
279long
281 // first check that begin and end are valid
282 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text()) &&
283 GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
284 // obtain begin and end
285 const double begin = GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
286 const double end = GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
287 // get data set parent
288 GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
289 if (dataSet && dataSet->checkNewInterval(begin, end)) {
290 // declare dataHandler
291 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "", true);
292 // build data interval
293 dataHandler.buildDataInterval(nullptr, dataSet->getID(), begin, end);
294 }
295 // disable select interval check button
296 myNewIntervalCheckButton->setCheck(FALSE, TRUE);
297 }
298 return 1;
299}
300
301
302long
304 // refresh attribute selector
305 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
306 return 1;
307}
308
309
310long
312 if (obj == myBeginTextField) {
313 // check if begin value can be parsed to double
314 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
315 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
316 myBeginTextField->killFocus();
317 } else {
318 myBeginTextField->setTextColor(FXRGB(255, 0, 0));
319 }
320 } else if (obj == myEndTextField) {
321 // check if end value can be parsed to double
322 if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
323 myEndTextField->setTextColor(FXRGB(0, 0, 0));
324 myEndTextField->killFocus();
325 } else {
326 myEndTextField->setTextColor(FXRGB(255, 0, 0));
327 }
328 }
329 return 1;
330}
331
332
333long
335 if (myNewIntervalCheckButton->getCheck() == TRUE) {
336 // enable begin and end elements
337 myHorizontalFrameBegin->show();
338 myHorizontalFrameEnd->show();
339 myCreateIntervalButton->show();
340 // refresh begin and end text fields
341 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
342 if (dataSet) {
343 if (dataSet->getDataIntervalChildren().empty()) {
344 // set default interval (1 hour)
345 myBeginTextField->setText("0");
346 myEndTextField->setText("3600");
347 } else {
348 // obtain last data interval
349 const GNEDataInterval* lastDataInterval = dataSet->getDataIntervalChildren().rbegin()->second;
350 const double intervalDuration = lastDataInterval->getAttributeDouble(SUMO_ATTR_END) - lastDataInterval->getAttributeDouble(SUMO_ATTR_BEGIN);
351 // set new begin end
352 myBeginTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END)).c_str());
353 myEndTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END) + intervalDuration).c_str());
354 }
355 }
356 } else {
357 // disable begin and end elements
358 myHorizontalFrameBegin->hide();
359 myHorizontalFrameEnd->hide();
360 myCreateIntervalButton->hide();
361 }
362 // refresh interval seletor
363 refreshIntervalSelector();
364 return 1;
365}
366
367
368FXTreeItem*
370 // insert item in Tree list
371 FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
372 dataInterval->getHierarchyName().c_str(),
375 // insert item in map
376 myTreeItemIntervalMap[item] = dataInterval;
377 // by default item is expanded
378 item->setExpanded(true);
379 // select first item
380 if (myTreeItemIntervalMap.size() == 1) {
381 item->setSelected(TRUE);
382 }
383 // return created FXTreeItem
384 return item;
385}
386
387// ---------------------------------------------------------------------------
388// GNEGenericDataFrame::AttributeSelector - methods
389// ---------------------------------------------------------------------------
390
392 MFXGroupBoxModule(genericDataFrameParent, TL("Data attributes")),
393 myGenericDataFrameParent(genericDataFrameParent),
394 myMinMaxLabel(nullptr),
395 myGenericDataTag(tag) {
396 // Create FXComboBox
398 // build rainbow
400 // refresh interval selector
402 // AttributeSelector is always shown
403 show();
404}
405
406
408
409
410void
412 // save current attribute
413 const auto currentAttribute = myAttributesComboBox->getText();
414 // clear items
415 myAttributesComboBox->clearItems();
416 // restore myMinMaxLabel
417 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
418 // fill myAttributesComboBox depending of data sets
419 if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
420 myAttributesComboBox->appendItem("<no dataSet selected>");
421 myAttributesComboBox->disable();
422 } else {
423 // add all item
424 myAttributesComboBox->appendItem("<all>");
425 // add attributes depending of interval
426 if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
427 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
428 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
429 // add all parameters
430 for (const auto& attribute : parameters) {
431 myAttributesComboBox->appendItem(attribute.c_str());
432 }
433 } else {
434 // retrieve all parameters within begin and end
435 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
436 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
437 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
438 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
439 // add all parameters
440 for (const auto& attribute : parameters) {
441 myAttributesComboBox->appendItem(attribute.c_str());
442 }
443 }
444 // enable combo Box
445 myAttributesComboBox->enable();
446 // adjust visible items
447 if (myAttributesComboBox->getNumItems() < 10) {
448 myAttributesComboBox->setNumVisible(myAttributesComboBox->getNumItems());
449 } else {
450 myAttributesComboBox->setNumVisible(10);
451 }
452 // set current item
453 for (int i = 0; i < myAttributesComboBox->getNumItems(); i++) {
454 if (myAttributesComboBox->getItem(i).text() == currentAttribute) {
455 myAttributesComboBox->setCurrentItem(i, TRUE);
456 }
457 }
458 }
459 // recalc frame
460 recalc();
461 // update view net
462 myGenericDataFrameParent->getViewNet()->updateViewNet();
463}
464
465
466std::string
468 if (myAttributesComboBox->getNumItems() == 0) {
469 return "";
470 } else if (myAttributesComboBox->getText() == "<all>") {
471 return "";
472 } else {
473 return myAttributesComboBox->getText().text();
474 }
475}
476
477
478const RGBColor&
479GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
480 // update myMinMaxLabel
481 myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
482 // return scaled color
483 return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
484}
485
486
487long
489 // empty attribute means <all>
490 if (myAttributesComboBox->getText().empty()) {
491 myAttributesComboBox->setText("<all>");
492 }
493 if (myAttributesComboBox->getText() == "<all>") {
494 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
495 }
496 // update view
497 myGenericDataFrameParent->getViewNet()->updateViewNet();
498 return 1;
499}
500
501// ---------------------------------------------------------------------------
502// GNEGenericDataFrame - methods
503// ---------------------------------------------------------------------------
504
507 return myDataSetSelector;
508}
509
510
513 return myIntervalSelector;
514}
515
516
519 return myAttributeSelector;
520}
521
522
525 return myPathCreator;
526}
527
528
531 return myGenericDataTag;
532}
533
534
535void
537 // first refresh data set selector
539 // check if there is an edge path creator
540 if (myPathCreator) {
542 }
543 // show frame
545}
546
547
548void
550 if (myPathCreator) {
551 // reset candidate edges
552 for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
553 edge.second->resetCandidateFlags();
554 }
555 }
556 // hide frame
558}
559
560
561void
563 // refresh data set selector
565 // check if there is an edge path creator
566 if (myPathCreator) {
568 }
569}
570
571
572GNEGenericDataFrame::GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
573 GNEFrame(viewParent, viewNet, toString(tag)),
574 myDataSetSelector(nullptr),
575 myIntervalSelector(nullptr),
576 myAttributeSelector(nullptr),
578 myPathCreator(nullptr),
579 myGenericDataTag(tag) {
580 // create DataSetSelector
582 // create IntervalSelector modul
584 // create AttributeSelector modul
585 myAttributeSelector = new AttributeSelector(this, tag);
586 // create parameter editor modul
588 // create GNEPathCreator modul
589 if (pathCreator) {
590 myPathCreator = new GNEPathCreator(this);
591 }
592}
593
594
596
597
598void
600 //
601}
602
603
604bool
605GNEGenericDataFrame::createPath(const bool /*useLastRoute*/) {
606 // this function has to be reimplemente in all child frames that uses a GNEPathCreator
607 return false;
608}
609
610/****************************************************************************/
FXDEFMAP(GNEGenericDataFrame::DataSetSelector) DataSetSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:870
@ MID_GNE_DATASET_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:896
@ MID_GNE_CREATE
create element
Definition: GUIAppEnum.h:872
@ MID_GNE_DATAINTERVAL_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:898
@ MID_GNE_DATASET_NEW
create new data set
Definition: GUIAppEnum.h:894
@ MID_GNE_SELECT
select element
Definition: GUIAppEnum.h:886
#define GUIDesignButton
Definition: GUIDesigns.h:77
#define GUIDesignComboBox
Definition: GUIDesigns.h:306
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:321
#define GUIDesignTextField
Definition: GUIDesigns.h:48
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:397
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
Definition: GUIDesigns.h:241
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:69
#define GUIDesignTreeListFrame
Tree list used in frames to represent elements children.
Definition: GUIDesigns.h:665
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:169
@ DATAINTERVAL
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:265
#define TL(string)
Definition: MsgHandler.h:282
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
const std::string getID() const
get ID (all Attribute Carriers have one)
GNENet * getNet() const
get pointer to net
void buildDataSet(const std::string &dataSetID)
Builds DataSet (exclusive of NETEDIT)
void buildDataInterval(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &dataSetID, const double begin, const double end)
Builds DataInterval.
An Element which don't belong to GNENet but has influence in the simulation.
double getAttributeDouble(SumoXMLAttr key) const
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNEDataSet.cpp:348
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
Definition: GNEDataSet.cpp:292
bool checkNewInterval(const double newBegin, const double newEnd)
check if a new GNEDataInterval with the given begin and end can be inserted in current GNEDataSet
Definition: GNEDataSet.cpp:261
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition: GNEFrame.cpp:316
GNEViewNet * myViewNet
FOX need this.
Definition: GNEFrame.h:117
virtual void show()
show Frame
Definition: GNEFrame.cpp:115
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:124
AttributeSelector(GNEGenericDataFrame *genericDataFrameParent, SumoXMLTag tag)
FOX-declaration.
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
std::string getFilteredAttribute() const
get filtered attribute
FXComboBox * 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 *)
void refreshDataSetSelector(const GNEDataSet *currentDataSet)
refresh interval selector
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.
FXTreeList * myIntervalsTreelist
tree list to show the interval list
FXTreeItem * addIntervalItem(GNEDataInterval *dataInterval, FXTreeItem *itemParent=nullptr)
add interval item into list
FXHorizontalFrame * myHorizontalFrameEnd
interval end horizontal frame
GNEDataInterval * getDataInterval() const
get current select data set ID
long onCmdCreateInterval(FXObject *, FXSelector, void *)
FXCheckButton * myNewIntervalCheckButton
check button to create a new interval
FXButton * myCreateIntervalButton
create interval button
IntervalSelector(GNEGenericDataFrame *genericDataFrameParent)
FOX-declaration.
FXTextField * myEndTextField
interval end
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
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
GNEGenericDataFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, SumoXMLTag tag, const bool pathCreator)
Constructor (protected due GNEGenericDataFrame is abtract)
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
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:132
void showPathCreatorModule(SumoXMLTag element, const bool firstElement, const bool consecutives)
show GNEPathCreator for the given tag
GNENet * getNet() const
get the net object
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:84
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static const RGBColor & getRainbowScaledColor(const double min, const double max, const double value)
get rainbow scaled color