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
56 FXIMPLEMENT(GNEGenericDataFrame::DataSetSelector, FXGroupBoxModule, DataSetSelectorMap, ARRAYNUMBER(DataSetSelectorMap))
57 FXIMPLEMENT(GNEGenericDataFrame::IntervalSelector, FXGroupBoxModule, IntervalSelectorMap, ARRAYNUMBER(IntervalSelectorMap))
58 FXIMPLEMENT(GNEGenericDataFrame::AttributeSelector, FXGroupBoxModule, AttributeSelectorMap, ARRAYNUMBER(AttributeSelectorMap))
59 
60 // ===========================================================================
61 // method definitions
62 // ===========================================================================
63 
64 // ---------------------------------------------------------------------------
65 // GNEGenericDataFrame::DataSetSelector - methods
66 // ---------------------------------------------------------------------------
67 
69  FXGroupBoxModule(genericDataFrameParent->myContentFrame, "DataSet"),
70  myGenericDataFrameParent(genericDataFrameParent) {
71  // create check button for new data set
72  myNewDataSetCheckButton = new FXCheckButton(getCollapsableFrame(), "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(), "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 
95 void
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 
124 GNEDataSet*
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 
134 long
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("Invalid dataSet ID");
141  } else if (dataSetID.empty()) {
142  WRITE_WARNING("Invalid empty dataSet ID");
143  } else if (myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID, false) != nullptr) {
144  WRITE_WARNING("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 
158 long
160  //
161  return 1;
162 }
163 
164 
165 long
167  // update interval modul
168  myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
169  return 1;
170 }
171 
172 
173 long
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  FXGroupBoxModule(genericDataFrameParent->myContentFrame, "Interval"),
199  myGenericDataFrameParent(genericDataFrameParent) {
200  // create check button for new interval
201  myNewIntervalCheckButton = new FXCheckButton(getCollapsableFrame(), "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
209  myHorizontalFrameBegin->hide();
210  // create end label
212  new FXLabel(myHorizontalFrameEnd, toString(SUMO_ATTR_END).c_str(), nullptr, GUIDesignLabelAttribute);
213  // create end textfield
215  myEndTextField->setText("3600");
216  // hide horizontal frame end
217  myHorizontalFrameEnd->hide();
218  // create interval button
220  myCreateIntervalButton->hide();
221  // Create three list
223  // refresh interval selector
225  // IntervalSelector is always shown
226  show();
227 }
228 
229 
231 
232 
233 void
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(),
246  dataSet->getIcon(),
247  dataSet->getIcon());
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 
279 long
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 
302 long
304  // refresh attribute selector
305  myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
306  return 1;
307 }
308 
309 
310 long
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 
333 long
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 
368 FXTreeItem*
370  // insert item in Tree list
371  FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
372  dataInterval->getHierarchyName().c_str(),
373  dataInterval->getIcon(),
374  dataInterval->getIcon());
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  FXGroupBoxModule(genericDataFrameParent->myContentFrame, "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 
410 void
412  // first clear items
413  myAttributesComboBox->clearItems();
414  // restore myMinMaxLabel
415  myMinMaxLabel->setText("Scale: Min -> Max");
416  // fill myAttributesComboBox depending of data sets
417  if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
418  myAttributesComboBox->appendItem("<no dataSet selected>");
419  myAttributesComboBox->disable();
420  } else {
421  // add all item
422  myAttributesComboBox->appendItem("<all>");
423  // add attributes depending of interval
424  if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
425  const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
426  myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
427  // add all parameters
428  for (const auto& attribute : parameters) {
429  myAttributesComboBox->appendItem(attribute.c_str());
430  }
431  } else {
432  // retrieve all parameters within begin and end
433  const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
434  myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
435  myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
436  myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
437  // add all parameters
438  for (const auto& attribute : parameters) {
439  myAttributesComboBox->appendItem(attribute.c_str());
440  }
441  }
442  // enable combo Box
443  myAttributesComboBox->enable();
444  // adjust visible items
445  if (myAttributesComboBox->getNumItems() < 10) {
446  myAttributesComboBox->setNumVisible(myAttributesComboBox->getNumItems());
447  } else {
448  myAttributesComboBox->setNumVisible(10);
449  }
450  }
451  // recalc frame
452  recalc();
453  // update view net
454  myGenericDataFrameParent->getViewNet()->updateViewNet();
455 }
456 
457 
458 std::string
460  if (myAttributesComboBox->getNumItems() == 0) {
461  return "";
462  } else if (myAttributesComboBox->getText() == "<all>") {
463  return "";
464  } else {
465  return myAttributesComboBox->getText().text();
466  }
467 }
468 
469 
470 const RGBColor&
471 GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
472  // update myMinMaxLabel
473  myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
474  // return scaled color
475  return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
476 }
477 
478 
479 long
481  // empty attribute means <all>
482  if (myAttributesComboBox->getText().empty()) {
483  myAttributesComboBox->setText("<all>");
484  }
485  if (myAttributesComboBox->getText() == "<all>") {
486  myMinMaxLabel->setText("Scale: Min -> Max");
487  }
488  // update view
489  myGenericDataFrameParent->getViewNet()->updateViewNet();
490  return 1;
491 }
492 
493 // ---------------------------------------------------------------------------
494 // GNEGenericDataFrame - methods
495 // ---------------------------------------------------------------------------
496 
499  return myDataSetSelector;
500 }
501 
502 
505  return myIntervalSelector;
506 }
507 
508 
511  return myAttributeSelector;
512 }
513 
514 
517  return myPathCreator;
518 }
519 
520 
523  return myGenericDataTag;
524 }
525 
526 
527 void
529  // first refresh data set selector
531  // check if there is an edge path creator
532  if (myPathCreator) {
534  }
535  // show frame
536  GNEFrame::show();
537 }
538 
539 
540 void
542  if (myPathCreator) {
543  // reset candidate edges
544  for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
545  edge.second->resetCandidateFlags();
546  }
547  }
548  // hide frame
549  GNEFrame::hide();
550 }
551 
552 
553 GNEGenericDataFrame::GNEGenericDataFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
554  GNEFrame(horizontalFrameParent, viewNet, toString(tag)),
555  myDataSetSelector(nullptr),
556  myIntervalSelector(nullptr),
557  myAttributeSelector(nullptr),
558  myGenericDataAttributes(nullptr),
559  myPathCreator(nullptr),
560  myGenericDataTag(tag) {
561  // create DataSetSelector
563  // create IntervalSelector modul
565  // create AttributeSelector modul
566  myAttributeSelector = new AttributeSelector(this, tag);
567  // create parameter editor modul
569  // create PathCreator modul
570  if (pathCreator) {
572  }
573 }
574 
575 
577 
578 
579 void
581  //
582 }
583 
584 
585 void
587  // this function has to be reimplemente in all child frames that uses a PathCreator
588 }
589 
590 /****************************************************************************/
FXDEFMAP(GNEGenericDataFrame::DataSetSelector) DataSetSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:797
@ MID_GNE_DATASET_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:823
@ MID_GNE_CREATE
create element
Definition: GUIAppEnum.h:799
@ MID_GNE_DATAINTERVAL_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:825
@ MID_GNE_DATASET_NEW
create new data set
Definition: GUIAppEnum.h:821
@ MID_GNE_SELECT
select element
Definition: GUIAppEnum.h:813
#define GUIDesignButton
Definition: GUIDesigns.h:68
#define GUIDesignComboBox
Definition: GUIDesigns.h:267
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:285
#define GUIDesignTextField
Definition: GUIDesigns.h:42
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:343
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
Definition: GUIDesigns.h:217
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:60
#define GUIDesignTreeListFrame
Tree list used in frames to represent elements children.
Definition: GUIDesigns.h:612
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:145
@ DATAINTERVAL
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:280
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
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
FXIcon * getIcon() const
get FXIcon associated to this AC
GNENet * getNet() const
get pointer to net
void buildDataSet(const std::string &dataSetID)
Builds DataSet (exlcusive 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 belongs to GNENet but has influency in the simulation.
double getAttributeDouble(SumoXMLAttr key) const
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
const std::string & getID() const
get ID
Definition: GNEDataSet.cpp:131
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNEDataSet.cpp:378
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
Definition: GNEDataSet.cpp:298
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:267
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:114
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:117
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
void showPathCreatorModule(SumoXMLTag element, const bool firstElement, const bool consecutives)
show PathCreator for the given tag
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
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
GNEFrameAttributeModules::GenericDataAttributes * myGenericDataAttributes
parameters editor creator
void intervalSelected()
interval selected
IntervalSelector * myIntervalSelector
interval selector modul
GNEFrameModules::PathCreator * myPathCreator
edge path creator (used for Walks, rides and trips)
DataSetSelector * myDataSetSelector
dataSet selector modul
const AttributeSelector * getAttributeSelector() const
getattribute selector modul
virtual void createPath()
create path
AttributeSelector * myAttributeSelector
attribute selector modul
const DataSetSelector * getDataSetSelector() const
get dataSet selector modul
SumoXMLTag getTag() const
@bried get element type of this data frame
GNEFrameModules::PathCreator * getPathCreator() const
get PathCreator modul
SumoXMLTag myGenericDataTag
generic data tag
const IntervalSelector * getIntervalSelector() const
get interval selector modul
GNEGenericDataFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet, SumoXMLTag tag, const bool pathCreator)
Constructor (protected due GNEGenericDataFrame is abtract)
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:125
GNENet * getNet() const
get the net object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static const RGBColor & getRainbowScaledColor(const double min, const double max, const double value)
get rainbow scaled color