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.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 #include <config.h>
21 
22 #include <netedit/GNENet.h>
23 #include <netedit/GNEViewNet.h>
29 
30 #include "GNEGenericDataFrame.h"
31 
32 
33 // ===========================================================================
34 // FOX callback mapping
35 // ===========================================================================
36 
42 
43 };
44 
50 };
51 
54 };
55 
56 // Object implementation
57 FXIMPLEMENT(GNEGenericDataFrame::DataSetSelector, MFXGroupBoxModule, DataSetSelectorMap, ARRAYNUMBER(DataSetSelectorMap))
58 FXIMPLEMENT(GNEGenericDataFrame::IntervalSelector, MFXGroupBoxModule, IntervalSelectorMap, ARRAYNUMBER(IntervalSelectorMap))
59 FXIMPLEMENT(GNEGenericDataFrame::AttributeSelector, MFXGroupBoxModule, AttributeSelectorMap, ARRAYNUMBER(AttributeSelectorMap))
60 
61 // ===========================================================================
62 // method definitions
63 // ===========================================================================
64 
65 // ---------------------------------------------------------------------------
66 // GNEGenericDataFrame::DataSetSelector - methods
67 // ---------------------------------------------------------------------------
68 
70  MFXGroupBoxModule(genericDataFrameParent, TL("DataSet")),
71  myGenericDataFrameParent(genericDataFrameParent) {
72  // create check button for new data set
73  myNewDataSetCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new dataSet"), this, MID_GNE_SELECT, GUIDesignCheckButton);
74  // Create MFXComboBoxIcon
75  myDataSetsComboBox = new MFXComboBoxIcon(getCollapsableFrame(), GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItemsMedium,
77  // create new id label
78  myHorizontalFrameNewID = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
79  new FXLabel(myHorizontalFrameNewID, "new dataSet ID", nullptr, GUIDesignLabelThickedFixed(100));
80  // create new id textField
81  myNewDataSetIDTextField = new FXTextField(myHorizontalFrameNewID, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
82  // hide horizontal frame
83  myHorizontalFrameNewID->hide();
84  // create dataSet button
85  myCreateDataSetButton = GUIDesigns::buildFXButton(getCollapsableFrame(), TL("Create dataSet"), "", "", GUIIconSubSys::getIcon(GUIIcon::DATASET), this, MID_GNE_CREATE, GUIDesignButton);
86  myCreateDataSetButton->hide();
87  // refresh interval selector
88  refreshDataSetSelector(nullptr);
89  // DataSetSelector is always shown
90  show();
91 }
92 
93 
95 
96 
97 void
99  // clear items
100  myDataSetsComboBox->clearItems();
101  // declare item index
102  int currentItemIndex = -1;
103  // fill myDataSetsComboBox with all DataSets
104  for (const auto& dataSet : myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDataSets()) {
105  // check if we have to set currentItemIndex
106  if ((currentItemIndex == -1) && (dataSet.second == currentDataSet)) {
107  currentItemIndex = myDataSetsComboBox->getNumItems();
108  }
109  myDataSetsComboBox->appendIconItem(dataSet.second->getID().c_str(), dataSet.second->getACIcon());
110  }
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->getItemText(myDataSetsComboBox->getCurrentItem()), 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(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, false);
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  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
204  new FXLabel(myHorizontalFrameBegin, toString(SUMO_ATTR_BEGIN).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
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, GUIDesignLabelThickedFixed(100));
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 tree list with fixed height
223  myIntervalsTreelist->setHeight(200);
224  // refresh interval selector
226  // IntervalSelector is always shown
227  show();
228 }
229 
230 
232 
233 
234 void
236  // first clear items from tree and intervalMap
237  myIntervalsTreelist->clearItems();
238  myTreeItemIntervalMap.clear();
239  // obtain data set
240  const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
241  // add intervals
242  if (dataSet) {
243  // insert dataSetItem in Tree list
244  FXTreeItem* dataSetItem = myIntervalsTreelist->insertItem(
245  nullptr, nullptr,
246  dataSet->getHierarchyName().c_str(),
249  // by default item is expanded
250  dataSetItem->setExpanded(true);
251  // iterate over intevals
252  for (const auto& interval : dataSet->getDataIntervalChildren()) {
253  addIntervalItem(interval.second, dataSetItem);
254  }
255  }
256  // refresh attribute selector
257  if (myGenericDataFrameParent->myAttributeSelector) {
258  myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
259  }
260  // recalc frame
261  recalc();
262 }
263 
264 
267  // first check if there is elements in interval tree
268  if (myIntervalsTreelist->getNumItems() > 0) {
269  for (const auto& treeItem : myTreeItemIntervalMap) {
270  if (treeItem.first->isSelected()) {
271  return treeItem.second;
272  }
273  }
274  }
275  // no GNEDataInterval found, then return nullptr
276  return nullptr;
277 }
278 
279 
280 long
282  // first check that begin and end are valid
283  if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text()) &&
284  GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
285  // obtain begin and end
286  const double begin = GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
287  const double end = GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
288  // get data set parent
289  GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
290  if (dataSet && dataSet->checkNewInterval(begin, end)) {
291  // declare dataHandler
292  GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "", true, false);
293  // build data interval
294  dataHandler.buildDataInterval(nullptr, dataSet->getID(), begin, end);
295  }
296  // disable select interval check button
297  myNewIntervalCheckButton->setCheck(FALSE, TRUE);
298  }
299  return 1;
300 }
301 
302 
303 long
305  // refresh attribute selector
306  myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
307  return 1;
308 }
309 
310 
311 long
313  if (obj == myBeginTextField) {
314  // check if begin value can be parsed to double
315  if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
316  myBeginTextField->setTextColor(FXRGB(0, 0, 0));
317  myBeginTextField->killFocus();
318  } else {
319  myBeginTextField->setTextColor(FXRGB(255, 0, 0));
320  }
321  } else if (obj == myEndTextField) {
322  // check if end value can be parsed to double
323  if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
324  myEndTextField->setTextColor(FXRGB(0, 0, 0));
325  myEndTextField->killFocus();
326  } else {
327  myEndTextField->setTextColor(FXRGB(255, 0, 0));
328  }
329  }
330  return 1;
331 }
332 
333 
334 long
336  if (myNewIntervalCheckButton->getCheck() == TRUE) {
337  // enable begin and end elements
338  myHorizontalFrameBegin->show();
339  myHorizontalFrameEnd->show();
340  myCreateIntervalButton->show();
341  // refresh begin and end text fields
342  const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
343  if (dataSet) {
344  if (dataSet->getDataIntervalChildren().empty()) {
345  // set default interval (1 hour)
346  myBeginTextField->setText("0");
347  myEndTextField->setText("3600");
348  } else {
349  // obtain last data interval
350  const GNEDataInterval* lastDataInterval = dataSet->getDataIntervalChildren().rbegin()->second;
351  const double intervalDuration = lastDataInterval->getAttributeDouble(SUMO_ATTR_END) - lastDataInterval->getAttributeDouble(SUMO_ATTR_BEGIN);
352  // set new begin end
353  myBeginTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END)).c_str());
354  myEndTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END) + intervalDuration).c_str());
355  }
356  }
357  } else {
358  // disable begin and end elements
359  myHorizontalFrameBegin->hide();
360  myHorizontalFrameEnd->hide();
361  myCreateIntervalButton->hide();
362  }
363  // refresh interval seletor
364  refreshIntervalSelector();
365  return 1;
366 }
367 
368 
369 FXTreeItem*
371  // insert item in Tree list
372  FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
373  dataInterval->getHierarchyName().c_str(),
376  // insert item in map
377  myTreeItemIntervalMap[item] = dataInterval;
378  // by default item is expanded
379  item->setExpanded(true);
380  // select first item
381  if (myTreeItemIntervalMap.size() == 1) {
382  item->setSelected(TRUE);
383  }
384  // return created FXTreeItem
385  return item;
386 }
387 
388 // ---------------------------------------------------------------------------
389 // GNEGenericDataFrame::AttributeSelector - methods
390 // ---------------------------------------------------------------------------
391 
393  MFXGroupBoxModule(genericDataFrameParent, TL("Data attributes")),
394  myGenericDataFrameParent(genericDataFrameParent),
395  myMinMaxLabel(nullptr),
396  myGenericDataTag(tag) {
397  // Create MFXComboBoxIcon
400  // build rainbow
401  myMinMaxLabel = buildRainbow(this);
402  // refresh interval selector
404  // AttributeSelector is always shown
405  show();
406 }
407 
408 
410 
411 
412 void
414  // save current attribute
415  const auto currentAttribute = myAttributesComboBox->getText();
416  // clear items
417  myAttributesComboBox->clearItems();
418  // restore myMinMaxLabel
419  myMinMaxLabel->setText(TL("Scale: Min -> Max"));
420  // fill myAttributesComboBox depending of data sets
421  if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
422  myAttributesComboBox->appendIconItem("<no dataSet selected>");
423  myAttributesComboBox->disable();
424  } else {
425  // add all item
426  myAttributesComboBox->appendIconItem("<all>");
427  // add attributes depending of interval
428  if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
429  const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
430  myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
431  // add all parameters
432  for (const auto& attribute : parameters) {
433  myAttributesComboBox->appendIconItem(attribute.c_str());
434  }
435  } else {
436  // retrieve all parameters within begin and end
437  const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
438  myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
439  myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
440  myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
441  // add all parameters
442  for (const auto& attribute : parameters) {
443  myAttributesComboBox->appendIconItem(attribute.c_str());
444  }
445  }
446  // enable combo Box
447  myAttributesComboBox->enable();
448  // set current item
449  for (int i = 0; i < myAttributesComboBox->getNumItems(); i++) {
450  if (myAttributesComboBox->getItemText(i) == currentAttribute.text()) {
451  myAttributesComboBox->setCurrentItem(i, TRUE);
452  }
453  }
454  }
455  // recalc frame
456  recalc();
457  // update view net
458  myGenericDataFrameParent->getViewNet()->updateViewNet();
459 }
460 
461 
462 std::string
464  if (myAttributesComboBox->getNumItems() == 0) {
465  return "";
466  } else if (myAttributesComboBox->getText() == TL("<all>")) {
467  return "";
468  } else {
469  return myAttributesComboBox->getText().text();
470  }
471 }
472 
473 
474 const RGBColor&
475 GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
476  // update myMinMaxLabel
477  myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
478  // return scaled color
479  return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
480 }
481 
482 
483 long
485  // empty attribute means <all>
486  if (myAttributesComboBox->getText().empty()) {
487  myAttributesComboBox->setCurrentItem(0);
488  }
489  if (myAttributesComboBox->getText() == TL("<all>")) {
490  myMinMaxLabel->setText(TL("Scale: Min -> Max"));
491  }
492  // update view
493  myGenericDataFrameParent->getViewNet()->updateViewNet();
494  return 1;
495 }
496 
497 // ---------------------------------------------------------------------------
498 // GNEGenericDataFrame - methods
499 // ---------------------------------------------------------------------------
500 
503  return myDataSetSelector;
504 }
505 
506 
509  return myIntervalSelector;
510 }
511 
512 
515  return myAttributeSelector;
516 }
517 
518 
521  return myPathCreator;
522 }
523 
524 
527  return myGenericDataTag;
528 }
529 
530 
531 void
533  // first refresh data set selector
535  // check if there is an edge path creator
536  if (myPathCreator) {
538  }
539  // show frame
540  GNEFrame::show();
541 }
542 
543 
544 void
546  if (myPathCreator) {
547  // reset candidate edges
548  for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
549  edge.second.second->resetCandidateFlags();
550  }
551  }
552  // hide frame
553  GNEFrame::hide();
554 }
555 
556 
557 void
559  // refresh data set selector
561  // check if there is an edge path creator
562  if (myPathCreator) {
564  }
565 }
566 
567 
568 GNEGenericDataFrame::GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
569  GNEFrame(viewParent, viewNet, toString(tag)),
570  myDataSetSelector(nullptr),
571  myIntervalSelector(nullptr),
572  myAttributeSelector(nullptr),
573  myGenericDataAttributes(nullptr),
574  myPathCreator(nullptr),
575  myGenericDataTag(tag) {
576  // create DataSetSelector
578  // create IntervalSelector module
580  // create AttributeSelector module
581  myAttributeSelector = new AttributeSelector(this, tag);
582  // create parameter editor module
584  // create GNEPathCreator module
585  if (pathCreator) {
586  myPathCreator = new GNEPathCreator(this);
587  }
588 }
589 
590 
592 
593 
594 void
596  //
597 }
598 
599 
600 bool
601 GNEGenericDataFrame::createPath(const bool /*useLastRoute*/) {
602  // this function has to be reimplemented in all child frames that uses a GNEPathCreator
603  return false;
604 }
605 
606 /****************************************************************************/
FXDEFMAP(GNEGenericDataFrame::DataSetSelector) DataSetSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:930
@ MID_GNE_DATASET_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:958
@ MID_GNE_CREATE
create element
Definition: GUIAppEnum.h:932
@ MID_GNE_DATAINTERVAL_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition: GUIAppEnum.h:960
@ MID_GNE_DATASET_NEW
create new data set
Definition: GUIAppEnum.h:956
@ MID_GNE_SELECT
select element
Definition: GUIAppEnum.h:948
#define GUIDesignTreeListFixedHeight
tree list with fixed height
Definition: GUIDesigns.h:683
#define GUIDesignButton
Definition: GUIDesigns.h:88
#define GUIDesignComboBox
Definition: GUIDesigns.h:299
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:317
#define GUIDesignTextField
Definition: GUIDesigns.h:65
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:405
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
Definition: GUIDesigns.h:53
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:80
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:198
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
Definition: GUIDesigns.h:258
@ DATAINTERVAL
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:295
#define TL(string)
Definition: MsgHandler.h:315
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)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
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:396
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
Definition: GNEDataSet.cpp:340
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:309
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition: GNEFrame.cpp:317
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
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 *)
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
const std::map< std::string, std::pair< const GUIGlObject *, GNEEdge * > > & getEdges() const
map with the ID and pointer to edges of net
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:121
void showPathCreatorModule(const GNETagProperties &tagProperty, 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:88
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
Definition: GUIDesigns.cpp:128
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
ComboBox with icon.
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