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(), GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItems,
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() == FXRGB(255, 0, 0)) {
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 false);
158 dataHandler.buildDataSet(dataSetID);
159 // refresh tag selector
160 refreshDataSetSelector(myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID));
161 // change check button
162 myNewDataSetCheckButton->setCheck(FALSE, TRUE);
163 }
164 return 1;
165}
166
167
168long
170 //
171 return 1;
172}
173
174
175long
177 // update interval modul
178 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
179 return 1;
180}
181
182
183long
185 if (myNewDataSetCheckButton->getCheck() == TRUE) {
186 // enable textfield and label
187 myHorizontalFrameNewID->show();
188 myCreateDataSetButton->show();
189 // disable comboBox
190 myDataSetsComboBox->hide();
191 } else {
192 // disable textfield and label
193 myHorizontalFrameNewID->hide();
194 myCreateDataSetButton->hide();
195 // enable comboBox
196 myDataSetsComboBox->show();
197 }
198 // update interval modul
199 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
200 // set focus in text field ID
201 myNewDataSetIDTextField->setFocus();
202 return 1;
203}
204
205// ---------------------------------------------------------------------------
206// GNEGenericDataFrame::IntervalSelector - methods
207// ---------------------------------------------------------------------------
208
210 MFXGroupBoxModule(genericDataFrameParent, TL("Interval")),
211 myGenericDataFrameParent(genericDataFrameParent) {
212 // create check button for new interval
213 myNewIntervalCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new interval"), this, MID_GNE_SELECT, GUIDesignCheckButton);
214 // create begin label
217 // create begin TextField
219 myBeginTextField->setText("0");
220 // hide horizontal frame begin
222 // create end label
224 new FXLabel(myHorizontalFrameEnd, toString(SUMO_ATTR_END).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
225 // create end textfield
227 myEndTextField->setText("3600");
228 // hide horizontal frame end
229 myHorizontalFrameEnd->hide();
230 // create interval button
233 // Create tree list with fixed height
235 myIntervalsTreelist->setHeight(200);
236 // refresh interval selector
238 // IntervalSelector is always shown
239 show();
240}
241
242
244
245
246void
248 myNewIntervalCheckButton->enable();
249 myHorizontalFrameBegin->enable();
250 myBeginTextField->enable();
251 myHorizontalFrameEnd->enable();
252 myEndTextField->enable();
253 myCreateIntervalButton->enable();
254 myIntervalsTreelist->enable();
255}
256
257
258void
260 myNewIntervalCheckButton->disable();
261 myHorizontalFrameBegin->disable();
262 myBeginTextField->disable();
263 myHorizontalFrameEnd->disable();
264 myEndTextField->disable();
265 myCreateIntervalButton->disable();
266 myIntervalsTreelist->disable();
267}
268
269
270void
272 // first clear items from tree and intervalMap
273 myIntervalsTreelist->clearItems();
274 myTreeItemIntervalMap.clear();
275 // obtain data set
276 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
277 // add intervals
278 if (dataSet) {
279 // insert dataSetItem in Tree list
280 FXTreeItem* dataSetItem = myIntervalsTreelist->insertItem(
281 nullptr, nullptr,
282 dataSet->getHierarchyName().c_str(),
285 // by default item is expanded
286 dataSetItem->setExpanded(true);
287 // iterate over intevals
288 for (const auto& interval : dataSet->getDataIntervalChildren()) {
289 addIntervalItem(interval.second, dataSetItem);
290 }
291 }
292 // refresh attribute selector
293 if (myGenericDataFrameParent->myAttributeSelector) {
294 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
295 }
296 // recalc frame
297 recalc();
298}
299
300
303 // first check if there is elements in interval tree
304 if (myIntervalsTreelist->getNumItems() > 0) {
305 for (const auto& treeItem : myTreeItemIntervalMap) {
306 if (treeItem.first->isSelected()) {
307 return treeItem.second;
308 }
309 }
310 }
311 // no GNEDataInterval found, then return nullptr
312 return nullptr;
313}
314
315
316long
318 // first check that begin and end are valid
319 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text()) &&
320 GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
321 // obtain begin and end
322 const double begin = GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
323 const double end = GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
324 // get data set parent
325 GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
326 if (dataSet && dataSet->checkNewInterval(begin, end)) {
327 // declare dataHandler
328 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "",
329 myGenericDataFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed(),
330 false);
331 // build data interval
332 dataHandler.buildDataInterval(nullptr, dataSet->getID(), begin, end);
333 }
334 // disable select interval check button
335 myNewIntervalCheckButton->setCheck(FALSE, TRUE);
336 }
337 return 1;
338}
339
340
341long
343 // refresh attribute selector
344 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
345 return 1;
346}
347
348
349long
351 if (obj == myBeginTextField) {
352 // check if begin value can be parsed to double
353 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
354 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
355 myBeginTextField->killFocus();
356 } else {
357 myBeginTextField->setTextColor(FXRGB(255, 0, 0));
358 }
359 } else if (obj == myEndTextField) {
360 // check if end value can be parsed to double
361 if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
362 myEndTextField->setTextColor(FXRGB(0, 0, 0));
363 myEndTextField->killFocus();
364 } else {
365 myEndTextField->setTextColor(FXRGB(255, 0, 0));
366 }
367 }
368 return 1;
369}
370
371
372long
374 if (myNewIntervalCheckButton->getCheck() == TRUE) {
375 // enable begin and end elements
376 myHorizontalFrameBegin->show();
377 myHorizontalFrameEnd->show();
378 myCreateIntervalButton->show();
379 // refresh begin and end text fields
380 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
381 if (dataSet) {
382 if (dataSet->getDataIntervalChildren().empty()) {
383 // set default interval (1 hour)
384 myBeginTextField->setText("0");
385 myEndTextField->setText("3600");
386 } else {
387 // obtain last data interval
388 const GNEDataInterval* lastDataInterval = dataSet->getDataIntervalChildren().rbegin()->second;
389 const double intervalDuration = lastDataInterval->getAttributeDouble(SUMO_ATTR_END) - lastDataInterval->getAttributeDouble(SUMO_ATTR_BEGIN);
390 // set new begin end
391 myBeginTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END)).c_str());
392 myEndTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END) + intervalDuration).c_str());
393 }
394 }
395 } else {
396 // disable begin and end elements
397 myHorizontalFrameBegin->hide();
398 myHorizontalFrameEnd->hide();
399 myCreateIntervalButton->hide();
400 }
401 // refresh interval seletor
402 refreshIntervalSelector();
403 return 1;
404}
405
406
407FXTreeItem*
409 // insert item in Tree list
410 FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
411 dataInterval->getHierarchyName().c_str(),
414 // insert item in map
415 myTreeItemIntervalMap[item] = dataInterval;
416 // by default item is expanded
417 item->setExpanded(true);
418 // select first item
419 if (myTreeItemIntervalMap.size() == 1) {
420 item->setSelected(TRUE);
421 }
422 // return created FXTreeItem
423 return item;
424}
425
426// ---------------------------------------------------------------------------
427// GNEGenericDataFrame::AttributeSelector - methods
428// ---------------------------------------------------------------------------
429
431 MFXGroupBoxModule(genericDataFrameParent, TL("Data attributes")),
432 myGenericDataFrameParent(genericDataFrameParent),
433 myMinMaxLabel(nullptr),
434 myGenericDataTag(tag) {
435 // Create MFXComboBoxIcon
438 // build rainbow
440 // refresh interval selector
442 // AttributeSelector is always shown
443 show();
444}
445
446
448
449
450void
452 // save current attribute
453 const auto currentAttribute = myAttributesComboBox->getText();
454 // clear items
455 myAttributesComboBox->clearItems();
456 // restore myMinMaxLabel
457 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
458 // fill myAttributesComboBox depending of data sets
459 if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
460 myAttributesComboBox->appendIconItem("<no dataSet selected>");
461 myAttributesComboBox->disable();
462 } else {
463 // add all item
464 myAttributesComboBox->appendIconItem("<all>");
465 // add attributes depending of interval
466 if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
467 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
468 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
469 // add all parameters
470 for (const auto& attribute : parameters) {
471 myAttributesComboBox->appendIconItem(attribute.c_str());
472 }
473 } else {
474 // retrieve all parameters within begin and end
475 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
476 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
477 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
478 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
479 // add all parameters
480 for (const auto& attribute : parameters) {
481 myAttributesComboBox->appendIconItem(attribute.c_str());
482 }
483 }
484 // enable combo Box
485 myAttributesComboBox->enable();
486 // set current item
487 for (int i = 0; i < myAttributesComboBox->getNumItems(); i++) {
488 if (myAttributesComboBox->getItemText(i) == currentAttribute.text()) {
489 myAttributesComboBox->setCurrentItem(i, TRUE);
490 }
491 }
492 }
493 // show parameters
494 if (myGenericDataFrameParent->myTemplateGenericData) {
495 myGenericDataFrameParent->myGenericDataAttributesEditor->showAttributesEditor(myGenericDataFrameParent->myTemplateGenericData, true);
496 }
497 // update view net
498 myGenericDataFrameParent->getViewNet()->updateViewNet();
499}
500
501
502std::string
504 if (myAttributesComboBox->getNumItems() == 0) {
505 return "";
506 } else if (myAttributesComboBox->getText() == TL("<all>")) {
507 return "";
508 } else {
509 return myAttributesComboBox->getText().text();
510 }
511}
512
513
514const RGBColor&
515GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
516 // update myMinMaxLabel
517 myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
518 // return scaled color
519 return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
520}
521
522
523long
525 // empty attribute means <all>
526 if (myAttributesComboBox->getText().empty()) {
527 myAttributesComboBox->setCurrentItem(0);
528 }
529 if (myAttributesComboBox->getText() == TL("<all>")) {
530 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
531 }
532 // update view
533 myGenericDataFrameParent->getViewNet()->updateViewNet();
534 return 1;
535}
536
537// ---------------------------------------------------------------------------
538// GNEGenericDataFrame - methods
539// ---------------------------------------------------------------------------
540
545
546
551
552
557
558
563
564
565void
567 // first refresh data set selector
569 // check if there is an edge path creator
570 if (myPathCreator) {
572 }
573 // show frame
575}
576
577
578void
580 if (myPathCreator) {
581 // reset candidate edges
582 for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
583 edge.second->resetCandidateFlags();
584 }
585 }
586 // hide frame
588}
589
590
591void
593 // refresh data set selector
595 // check if there is an edge path creator
596 if (myPathCreator) {
598 }
599}
600
601
602GNEGenericDataFrame::GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
603 GNEFrame(viewParent, viewNet, toString(tag)) {
604 // create DataSetSelector
606 // create IntervalSelector module
608 // create AttributeSelector module
609 myAttributeSelector = new AttributeSelector(this, tag);
610 // create parameter editor module
612 // create GNEPathCreator module
613 if (pathCreator) {
614 myPathCreator = new GNEPathCreator(this, viewNet->getNet()->getDataPathManager());
615 }
616 // create AC depending of tag
617 if (tag == GNE_TAG_EDGEREL_SINGLE) {
618 myTemplateGenericData = new GNEEdgeData(viewNet->getNet());
619 } else if (tag == SUMO_TAG_EDGEREL) {
621 } else if (tag == SUMO_TAG_TAZREL) {
623 } else {
624 throw ProcessError("Invalid data tag");
625 }
626}
627
628
632
633
634void
638
639
640bool
641GNEGenericDataFrame::createPath(const bool /*useLastRoute*/) {
642 // this function has to be reimplemented in all child frames that uses a GNEPathCreator
643 return false;
644}
645
646/****************************************************************************/
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:680
#define GUIDesignButton
Definition GUIDesigns.h:82
#define GUIDesignComboBox
Definition GUIDesigns.h:293
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition GUIDesigns.h:311
#define GUIDesignTextField
Definition GUIDesigns.h:59
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:399
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:74
#define GUIDesignComboBoxVisibleItems
Definition GUIDesigns.h:49
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:192
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
Definition GUIDesigns.h:252
@ 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:321
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:121
virtual void show()
show Frame
Definition GNEFrame.cpp:120
virtual void hide()
hide Frame
Definition GNEFrame.cpp:129
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:183
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:147
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
A single child window which contains a view of the simulation area.
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
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