Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2025 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
22#include <netedit/GNENet.h>
32
33#include "GNEGenericDataFrame.h"
34
35// ===========================================================================
36// FOX callback mapping
37// ===========================================================================
38
45
52
56
57// Object implementation
58FXIMPLEMENT(GNEGenericDataFrame::DataSetSelector, MFXGroupBoxModule, DataSetSelectorMap, ARRAYNUMBER(DataSetSelectorMap))
59FXIMPLEMENT(GNEGenericDataFrame::IntervalSelector, MFXGroupBoxModule, IntervalSelectorMap, ARRAYNUMBER(IntervalSelectorMap))
60FXIMPLEMENT(GNEGenericDataFrame::AttributeSelector, MFXGroupBoxModule, AttributeSelectorMap, ARRAYNUMBER(AttributeSelectorMap))
61
62// ===========================================================================
63// method definitions
64// ===========================================================================
65
66// ---------------------------------------------------------------------------
67// GNEGenericDataFrame::DataSetSelector - methods
68// ---------------------------------------------------------------------------
69
71 MFXGroupBoxModule(genericDataFrameParent, TL("DataSet")),
72 myGenericDataFrameParent(genericDataFrameParent) {
73 // create check button for new data set
74 myNewDataSetCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new dataSet"), this, MID_GNE_SELECT, GUIDesignCheckButton);
75 // Create MFXComboBoxIcon
76 myDataSetsComboBox = new MFXComboBoxIcon(getCollapsableFrame(), genericDataFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
78 // create new id label
79 myHorizontalFrameNewID = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
80 new FXLabel(myHorizontalFrameNewID, "new dataSet ID", nullptr, GUIDesignLabelThickedFixed(100));
81 // create new id textField
82 myNewDataSetIDTextField = new FXTextField(myHorizontalFrameNewID, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
83 // hide horizontal frame
84 myHorizontalFrameNewID->hide();
85 // create dataSet button
86 myCreateDataSetButton = GUIDesigns::buildFXButton(getCollapsableFrame(), TL("Create dataSet"), "", "", GUIIconSubSys::getIcon(GUIIcon::DATASET), this, MID_GNE_CREATE, GUIDesignButton);
87 myCreateDataSetButton->hide();
88 // refresh interval selector
89 refreshDataSetSelector(nullptr);
90 // DataSetSelector is always shown
91 show();
92}
93
94
96
97
98void
100 // clear items
101 myDataSetsComboBox->clearItems();
102 // declare item index
103 int currentItemIndex = -1;
104 // fill myDataSetsComboBox with all DataSets
105 for (const auto& dataSet : myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDataSets()) {
106 // check if we have to set currentItemIndex
107 if ((currentItemIndex == -1) && (dataSet.second == currentDataSet)) {
108 currentItemIndex = myDataSetsComboBox->getNumItems();
109 }
110 myDataSetsComboBox->appendIconItem(dataSet.second->getID().c_str(), dataSet.second->getACIcon());
111 }
112 // check if we have to set current element
113 if (currentItemIndex != -1) {
114 myDataSetsComboBox->setCurrentItem(currentItemIndex, FALSE);
115 if (myGenericDataFrameParent->getIntervalSelector()) {
116 myGenericDataFrameParent->getIntervalSelector()->enableContents();
117 }
118 } else if (myGenericDataFrameParent->getIntervalSelector()) {
119 myGenericDataFrameParent->getIntervalSelector()->disableContents();
120 }
121 // recalc frame
122 recalc();
123 // refresh interval selector
124 if (myGenericDataFrameParent->myIntervalSelector) {
125 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
126 }
127}
128
129
132 if ((myNewDataSetCheckButton->getCheck() == TRUE) || (myDataSetsComboBox->getNumItems() == 0)) {
133 return nullptr;
134 } else {
135 return myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(myDataSetsComboBox->getItemText(myDataSetsComboBox->getCurrentItem()), false);
136 }
137}
138
139
140long
142 // first disable interval selector
143 myGenericDataFrameParent->getIntervalSelector()->disableContents();
144 // get string
145 const std::string dataSetID = myNewDataSetIDTextField->getText().text();
146 // check conditions
147 if (myNewDataSetIDTextField->getTextColor() == GUIDesignTextColorRed) {
148 WRITE_WARNING(TL("Invalid dataSet ID"));
149 } else if (dataSetID.empty()) {
150 WRITE_WARNING(TL("Invalid empty dataSet ID"));
151 } else if (myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID, false) != nullptr) {
152 WRITE_WARNING(TL("Invalid duplicated dataSet ID"));
153 } else {
154 // build data set
155 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "",
156 myGenericDataFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
157 dataHandler.buildDataSet(dataSetID);
158 // refresh tag selector
159 refreshDataSetSelector(myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID));
160 // change check button
161 myNewDataSetCheckButton->setCheck(FALSE, TRUE);
162 }
163 return 1;
164}
165
166
167long
169 //
170 return 1;
171}
172
173
174long
176 // update interval modul
177 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
178 return 1;
179}
180
181
182long
184 if (myNewDataSetCheckButton->getCheck() == TRUE) {
185 // enable textfield and label
186 myHorizontalFrameNewID->show();
187 myCreateDataSetButton->show();
188 // disable comboBox
189 myDataSetsComboBox->hide();
190 } else {
191 // disable textfield and label
192 myHorizontalFrameNewID->hide();
193 myCreateDataSetButton->hide();
194 // enable comboBox
195 myDataSetsComboBox->show();
196 }
197 // update interval modul
198 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
199 // set focus in text field ID
200 myNewDataSetIDTextField->setFocus();
201 return 1;
202}
203
204// ---------------------------------------------------------------------------
205// GNEGenericDataFrame::IntervalSelector - methods
206// ---------------------------------------------------------------------------
207
209 MFXGroupBoxModule(genericDataFrameParent, TL("Interval")),
210 myGenericDataFrameParent(genericDataFrameParent) {
211 // create check button for new interval
212 myNewIntervalCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new interval"), this, MID_GNE_SELECT, GUIDesignCheckButton);
213 // create begin label
216 // create begin TextField
218 myBeginTextField->setText("0");
219 // hide horizontal frame begin
221 // create end label
223 new FXLabel(myHorizontalFrameEnd, toString(SUMO_ATTR_END).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
224 // create end textfield
226 myEndTextField->setText("3600");
227 // hide horizontal frame end
228 myHorizontalFrameEnd->hide();
229 // create interval button
232 // Create tree list with fixed height
234 myIntervalsTreelist->setHeight(200);
235 // refresh interval selector
237 // IntervalSelector is always shown
238 show();
239}
240
241
243
244
245void
247 myNewIntervalCheckButton->enable();
248 myHorizontalFrameBegin->enable();
249 myBeginTextField->enable();
250 myHorizontalFrameEnd->enable();
251 myEndTextField->enable();
252 myCreateIntervalButton->enable();
253 myIntervalsTreelist->enable();
254}
255
256
257void
259 myNewIntervalCheckButton->disable();
260 myHorizontalFrameBegin->disable();
261 myBeginTextField->disable();
262 myHorizontalFrameEnd->disable();
263 myEndTextField->disable();
264 myCreateIntervalButton->disable();
265 myIntervalsTreelist->disable();
266}
267
268
269void
271 // first clear items from tree and intervalMap
272 myIntervalsTreelist->clearItems();
273 myTreeItemIntervalMap.clear();
274 // obtain data set
275 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
276 // add intervals
277 if (dataSet) {
278 // insert dataSetItem in Tree list
279 FXTreeItem* dataSetItem = myIntervalsTreelist->insertItem(
280 nullptr, nullptr,
281 dataSet->getHierarchyName().c_str(),
284 // by default item is expanded
285 dataSetItem->setExpanded(true);
286 // iterate over intevals
287 for (const auto& interval : dataSet->getDataIntervalChildren()) {
288 addIntervalItem(interval.second, dataSetItem);
289 }
290 }
291 // refresh attribute selector
292 if (myGenericDataFrameParent->myAttributeSelector) {
293 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
294 }
295 // recalc frame
296 recalc();
297}
298
299
302 // first check if there is elements in interval tree
303 if (myIntervalsTreelist->getNumItems() > 0) {
304 for (const auto& treeItem : myTreeItemIntervalMap) {
305 if (treeItem.first->isSelected()) {
306 return treeItem.second;
307 }
308 }
309 }
310 // no GNEDataInterval found, then return nullptr
311 return nullptr;
312}
313
314
315long
317 // first check that begin and end are valid
318 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text()) &&
319 GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
320 // obtain begin and end
321 const double begin = GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
322 const double end = GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
323 // get data set parent
324 GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
325 if (dataSet && dataSet->checkNewInterval(begin, end)) {
326 // declare dataHandler
327 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "",
328 myGenericDataFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
329 // build data interval
330 dataHandler.buildDataInterval(nullptr, dataSet->getID(), begin, end);
331 }
332 // disable select interval check button
333 myNewIntervalCheckButton->setCheck(FALSE, TRUE);
334 }
335 return 1;
336}
337
338
339long
341 // refresh attribute selector
342 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
343 return 1;
344}
345
346
347long
349 if (obj == myBeginTextField) {
350 // check if begin value can be parsed to double
351 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
352 myBeginTextField->setTextColor(GUIDesignTextColorBlack);
353 myBeginTextField->killFocus();
354 } else {
355 myBeginTextField->setTextColor(GUIDesignTextColorRed);
356 }
357 } else if (obj == myEndTextField) {
358 // check if end value can be parsed to double
359 if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
360 myEndTextField->setTextColor(GUIDesignTextColorBlack);
361 myEndTextField->killFocus();
362 } else {
363 myEndTextField->setTextColor(GUIDesignTextColorRed);
364 }
365 }
366 return 1;
367}
368
369
370long
372 if (myNewIntervalCheckButton->getCheck() == TRUE) {
373 // enable begin and end elements
374 myHorizontalFrameBegin->show();
375 myHorizontalFrameEnd->show();
376 myCreateIntervalButton->show();
377 // refresh begin and end text fields
378 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
379 if (dataSet) {
380 if (dataSet->getDataIntervalChildren().empty()) {
381 // set default interval (1 hour)
382 myBeginTextField->setText("0");
383 myEndTextField->setText("3600");
384 } else {
385 // obtain last data interval
386 const GNEDataInterval* lastDataInterval = dataSet->getDataIntervalChildren().rbegin()->second;
387 const double intervalDuration = lastDataInterval->getAttributeDouble(SUMO_ATTR_END) - lastDataInterval->getAttributeDouble(SUMO_ATTR_BEGIN);
388 // set new begin end
389 myBeginTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END)).c_str());
390 myEndTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END) + intervalDuration).c_str());
391 }
392 }
393 } else {
394 // disable begin and end elements
395 myHorizontalFrameBegin->hide();
396 myHorizontalFrameEnd->hide();
397 myCreateIntervalButton->hide();
398 }
399 // refresh interval seletor
400 refreshIntervalSelector();
401 return 1;
402}
403
404
405FXTreeItem*
407 // insert item in Tree list
408 FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
409 dataInterval->getHierarchyName().c_str(),
412 // insert item in map
413 myTreeItemIntervalMap[item] = dataInterval;
414 // by default item is expanded
415 item->setExpanded(true);
416 // select first item
417 if (myTreeItemIntervalMap.size() == 1) {
418 item->setSelected(TRUE);
419 }
420 // return created FXTreeItem
421 return item;
422}
423
424// ---------------------------------------------------------------------------
425// GNEGenericDataFrame::AttributeSelector - methods
426// ---------------------------------------------------------------------------
427
429 MFXGroupBoxModule(genericDataFrameParent, TL("Data attributes")),
430 myGenericDataFrameParent(genericDataFrameParent),
431 myMinMaxLabel(nullptr),
432 myGenericDataTag(tag) {
433 // Create MFXComboBoxIcon
436 // build rainbow
438 // refresh interval selector
440 // AttributeSelector is always shown
441 show();
442}
443
444
446
447
448void
450 // save current attribute
451 const auto currentAttribute = myAttributesComboBox->getText();
452 // clear items
453 myAttributesComboBox->clearItems();
454 // restore myMinMaxLabel
455 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
456 // fill myAttributesComboBox depending of data sets
457 if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
458 myAttributesComboBox->appendIconItem("<no dataSet selected>");
459 myAttributesComboBox->disable();
460 } else {
461 // add all item
462 myAttributesComboBox->appendIconItem("<all>");
463 // add attributes depending of interval
464 if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
465 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
466 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
467 // add all parameters
468 for (const auto& attribute : parameters) {
469 myAttributesComboBox->appendIconItem(attribute.c_str());
470 }
471 } else {
472 // retrieve all parameters within begin and end
473 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
474 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
475 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
476 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
477 // add all parameters
478 for (const auto& attribute : parameters) {
479 myAttributesComboBox->appendIconItem(attribute.c_str());
480 }
481 }
482 // enable combo Box
483 myAttributesComboBox->enable();
484 // set current item
485 for (int i = 0; i < myAttributesComboBox->getNumItems(); i++) {
486 if (myAttributesComboBox->getItemText(i) == currentAttribute.text()) {
487 myAttributesComboBox->setCurrentItem(i, TRUE);
488 }
489 }
490 }
491 // show parameters
492 if (myGenericDataFrameParent->myTemplateGenericData) {
493 myGenericDataFrameParent->myGenericDataAttributesEditor->showAttributesEditor(myGenericDataFrameParent->myTemplateGenericData, true);
494 }
495 // update view net
496 myGenericDataFrameParent->getViewNet()->updateViewNet();
497}
498
499
500std::string
502 if (myAttributesComboBox->getNumItems() == 0) {
503 return "";
504 } else if (myAttributesComboBox->getText() == TL("<all>")) {
505 return "";
506 } else {
507 return myAttributesComboBox->getText().text();
508 }
509}
510
511
512const RGBColor&
513GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
514 // update myMinMaxLabel
515 myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
516 // return scaled color
517 return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
518}
519
520
521long
523 // empty attribute means <all>
524 if (myAttributesComboBox->getText().empty()) {
525 myAttributesComboBox->setCurrentItem(0);
526 }
527 if (myAttributesComboBox->getText() == TL("<all>")) {
528 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
529 }
530 // update view
531 myGenericDataFrameParent->getViewNet()->updateViewNet();
532 return 1;
533}
534
535// ---------------------------------------------------------------------------
536// GNEGenericDataFrame - methods
537// ---------------------------------------------------------------------------
538
543
544
549
550
555
556
561
562
563void
565 // first refresh data set selector
567 // check if there is an edge path creator
568 if (myPathCreator) {
570 }
571 // show frame
573}
574
575
576void
578 if (myPathCreator) {
579 // reset candidate edges
580 for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
581 edge.second->resetCandidateFlags();
582 }
583 }
584 // hide frame
586}
587
588
589void
591 // refresh data set selector
593 // check if there is an edge path creator
594 if (myPathCreator) {
596 }
597}
598
599
600GNEGenericDataFrame::GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
601 GNEFrame(viewParent, viewNet, toString(tag)) {
602 // create DataSetSelector
604 // create IntervalSelector module
606 // create AttributeSelector module
607 myAttributeSelector = new AttributeSelector(this, tag);
608 // create parameter editor module
610 // create GNEPathCreator module
611 if (pathCreator) {
612 myPathCreator = new GNEPathCreator(this, viewNet->getNet()->getDataPathManager());
613 }
614 // create AC depending of tag
615 if (tag == GNE_TAG_EDGEREL_SINGLE) {
616 myTemplateGenericData = new GNEEdgeData(viewNet->getNet());
617 } else if (tag == SUMO_TAG_EDGEREL) {
619 } else if (tag == SUMO_TAG_TAZREL) {
621 } else {
622 throw ProcessError("Invalid data tag");
623 }
624}
625
626
630
631
632void
636
637
638bool
639GNEGenericDataFrame::createPath(const bool /*useLastRoute*/) {
640 // this function has to be reimplemented in all child frames that uses a GNEPathCreator
641 return false;
642}
643
644/****************************************************************************/
FXDEFMAP(GNEGenericDataFrame::DataSetSelector) DataSetSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:991
@ MID_GNE_DATASET_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
@ MID_GNE_CREATE
create element
Definition GUIAppEnum.h:993
@ MID_GNE_DATAINTERVAL_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
@ MID_GNE_DATASET_NEW
create new data set
@ MID_GNE_SELECT
select element
#define GUIDesignTreeListFixedHeight
tree list with fixed height
Definition GUIDesigns.h:696
#define GUIDesignTextColorRed
red color (for invalid text)
Definition GUIDesigns.h:44
#define GUIDesignButton
Definition GUIDesigns.h:100
#define GUIDesignComboBox
Definition GUIDesigns.h:295
#define GUIDesignTextField
Definition GUIDesigns.h:74
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:430
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:92
#define GUIDesignComboBoxVisibleItems
Definition GUIDesigns.h:64
#define GUIDesignTextColorBlack
black color (for correct text)
Definition GUIDesigns.h:38
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:194
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
Definition GUIDesigns.h:254
@ DATAINTERVAL
#define WRITE_WARNING(msg)
Definition MsgHandler.h:287
#define TL(string)
Definition MsgHandler.h:305
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ GNE_TAG_EDGEREL_SINGLE
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ 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
bool buildDataInterval(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &dataSetID, const double begin, const double end)
Builds DataInterval.
bool buildDataSet(const std::string &id)
Builds DataSet (exclusive of netedit)
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)
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
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
An Element which don't belong to GNENet but has influence in the simulation.
Definition GNEEdgeData.h:32
An Element which don't belong to GNENet but has influence in the simulation.
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition GNEFrame.cpp:252
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:152
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:121
virtual void show()
show Frame
Definition GNEFrame.cpp:117
virtual void hide()
hide Frame
Definition GNEFrame.cpp:126
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)
FOX needs this.
FXHorizontalFrame * myHorizontalFrameEnd
interval end horizontal frame
GNEDataInterval * getDataInterval() const
get current select data set ID
long onCmdCreateInterval(FXObject *, FXSelector, void *)
void disableContents() const
disable contents
FXCheckButton * myNewIntervalCheckButton
check button to create a new interval
FXButton * myCreateIntervalButton
create interval button
IntervalSelector(GNEGenericDataFrame *genericDataFrameParent)
FOX-declaration.
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
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)
GNEGenericData * myTemplateGenericData
template generic data
GNEPathCreator * getPathCreator() const
get GNEPathCreator modul
AttributeSelector * myAttributeSelector
attribute selector modul
const DataSetSelector * getDataSetSelector() const
get dataSet selector modul
GNEAttributesEditor * myGenericDataAttributesEditor
parameters editor creator
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
GNEPathManager * getDataPathManager()
get data path manager
Definition GNENet.cpp:180
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:144
void showPathCreatorModule(const GNETagProperties *tagProperty, const bool consecutives)
show GNEPathCreator for the given tag
An Element which don't belong to GNENet but has influence in the simulation.
GNENet * getNet() const
get the net object
GNEViewParent * getViewParent() const
get the net object
A single child window which contains a view of the simulation area.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
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
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
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