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-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>
31
32#include "GNEGenericDataFrame.h"
33
34
35// ===========================================================================
36// FOX callback mapping
37// ===========================================================================
38
46
53
57
58// Object implementation
59FXIMPLEMENT(GNEGenericDataFrame::DataSetSelector, MFXGroupBoxModule, DataSetSelectorMap, ARRAYNUMBER(DataSetSelectorMap))
60FXIMPLEMENT(GNEGenericDataFrame::IntervalSelector, MFXGroupBoxModule, IntervalSelectorMap, ARRAYNUMBER(IntervalSelectorMap))
61FXIMPLEMENT(GNEGenericDataFrame::AttributeSelector, MFXGroupBoxModule, AttributeSelectorMap, ARRAYNUMBER(AttributeSelectorMap))
62
63// ===========================================================================
64// method definitions
65// ===========================================================================
66
67// ---------------------------------------------------------------------------
68// GNEGenericDataFrame::DataSetSelector - methods
69// ---------------------------------------------------------------------------
70
72 MFXGroupBoxModule(genericDataFrameParent, TL("DataSet")),
73 myGenericDataFrameParent(genericDataFrameParent) {
74 // create check button for new data set
75 myNewDataSetCheckButton = new FXCheckButton(getCollapsableFrame(), TL("Create new dataSet"), this, MID_GNE_SELECT, GUIDesignCheckButton);
76 // Create MFXComboBoxIcon
77 myDataSetsComboBox = new MFXComboBoxIcon(getCollapsableFrame(), GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItemsMedium,
79 // create new id label
80 myHorizontalFrameNewID = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
81 new FXLabel(myHorizontalFrameNewID, "new dataSet ID", nullptr, GUIDesignLabelThickedFixed(100));
82 // create new id textField
83 myNewDataSetIDTextField = new FXTextField(myHorizontalFrameNewID, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
84 // hide horizontal frame
85 myHorizontalFrameNewID->hide();
86 // create dataSet button
87 myCreateDataSetButton = GUIDesigns::buildFXButton(getCollapsableFrame(), TL("Create dataSet"), "", "", GUIIconSubSys::getIcon(GUIIcon::DATASET), this, MID_GNE_CREATE, GUIDesignButton);
88 myCreateDataSetButton->hide();
89 // refresh interval selector
90 refreshDataSetSelector(nullptr);
91 // DataSetSelector is always shown
92 show();
93}
94
95
97
98
99void
101 // clear items
102 myDataSetsComboBox->clearItems();
103 // declare item index
104 int currentItemIndex = -1;
105 // fill myDataSetsComboBox with all DataSets
106 for (const auto& dataSet : myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDataSets()) {
107 // check if we have to set currentItemIndex
108 if ((currentItemIndex == -1) && (dataSet.second == currentDataSet)) {
109 currentItemIndex = myDataSetsComboBox->getNumItems();
110 }
111 myDataSetsComboBox->appendIconItem(dataSet.second->getID().c_str(), dataSet.second->getACIcon());
112 }
113 // check if we have to set current element
114 if (currentItemIndex != -1) {
115 myDataSetsComboBox->setCurrentItem(currentItemIndex, FALSE);
116 if (myGenericDataFrameParent->getIntervalSelector()) {
117 myGenericDataFrameParent->getIntervalSelector()->enableContents();
118 }
119 } else if (myGenericDataFrameParent->getIntervalSelector()) {
120 myGenericDataFrameParent->getIntervalSelector()->disableContents();
121 }
122 // recalc frame
123 recalc();
124 // refresh interval selector
125 if (myGenericDataFrameParent->myIntervalSelector) {
126 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
127 }
128}
129
130
133 if ((myNewDataSetCheckButton->getCheck() == TRUE) || (myDataSetsComboBox->getNumItems() == 0)) {
134 return nullptr;
135 } else {
136 return myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(myDataSetsComboBox->getItemText(myDataSetsComboBox->getCurrentItem()), false);
137 }
138}
139
140
141long
143 // first disable interval selector
144 myGenericDataFrameParent->getIntervalSelector()->disableContents();
145 // get string
146 const std::string dataSetID = myNewDataSetIDTextField->getText().text();
147 // check conditions
148 if (myNewDataSetIDTextField->getTextColor() == FXRGB(255, 0, 0)) {
149 WRITE_WARNING(TL("Invalid dataSet ID"));
150 } else if (dataSetID.empty()) {
151 WRITE_WARNING(TL("Invalid empty dataSet ID"));
152 } else if (myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID, false) != nullptr) {
153 WRITE_WARNING(TL("Invalid duplicated dataSet ID"));
154 } else {
155 // build data set
156 GNEDataHandler dataHandler(myGenericDataFrameParent->getViewNet()->getNet(), "",
157 myGenericDataFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed(),
158 false);
159 dataHandler.buildDataSet(dataSetID);
160 // refresh tag selector
161 refreshDataSetSelector(myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDataSet(dataSetID));
162 // change check button
163 myNewDataSetCheckButton->setCheck(FALSE, TRUE);
164 }
165 return 1;
166}
167
168
169long
171 //
172 return 1;
173}
174
175
176long
178 // update interval modul
179 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
180 return 1;
181}
182
183
184long
186 if (myNewDataSetCheckButton->getCheck() == TRUE) {
187 // enable textfield and label
188 myHorizontalFrameNewID->show();
189 myCreateDataSetButton->show();
190 // disable comboBox
191 myDataSetsComboBox->hide();
192 } else {
193 // disable textfield and label
194 myHorizontalFrameNewID->hide();
195 myCreateDataSetButton->hide();
196 // enable comboBox
197 myDataSetsComboBox->show();
198 }
199 // update interval modul
200 myGenericDataFrameParent->myIntervalSelector->refreshIntervalSelector();
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 false);
330 // build data interval
331 dataHandler.buildDataInterval(nullptr, dataSet->getID(), begin, end);
332 }
333 // disable select interval check button
334 myNewIntervalCheckButton->setCheck(FALSE, TRUE);
335 }
336 return 1;
337}
338
339
340long
342 // refresh attribute selector
343 myGenericDataFrameParent->myAttributeSelector->refreshAttributeSelector();
344 return 1;
345}
346
347
348long
350 if (obj == myBeginTextField) {
351 // check if begin value can be parsed to double
352 if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
353 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
354 myBeginTextField->killFocus();
355 } else {
356 myBeginTextField->setTextColor(FXRGB(255, 0, 0));
357 }
358 } else if (obj == myEndTextField) {
359 // check if end value can be parsed to double
360 if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
361 myEndTextField->setTextColor(FXRGB(0, 0, 0));
362 myEndTextField->killFocus();
363 } else {
364 myEndTextField->setTextColor(FXRGB(255, 0, 0));
365 }
366 }
367 return 1;
368}
369
370
371long
373 if (myNewIntervalCheckButton->getCheck() == TRUE) {
374 // enable begin and end elements
375 myHorizontalFrameBegin->show();
376 myHorizontalFrameEnd->show();
377 myCreateIntervalButton->show();
378 // refresh begin and end text fields
379 const GNEDataSet* dataSet = myGenericDataFrameParent->myDataSetSelector->getDataSet();
380 if (dataSet) {
381 if (dataSet->getDataIntervalChildren().empty()) {
382 // set default interval (1 hour)
383 myBeginTextField->setText("0");
384 myEndTextField->setText("3600");
385 } else {
386 // obtain last data interval
387 const GNEDataInterval* lastDataInterval = dataSet->getDataIntervalChildren().rbegin()->second;
388 const double intervalDuration = lastDataInterval->getAttributeDouble(SUMO_ATTR_END) - lastDataInterval->getAttributeDouble(SUMO_ATTR_BEGIN);
389 // set new begin end
390 myBeginTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END)).c_str());
391 myEndTextField->setText(toString(lastDataInterval->getAttributeDouble(SUMO_ATTR_END) + intervalDuration).c_str());
392 }
393 }
394 } else {
395 // disable begin and end elements
396 myHorizontalFrameBegin->hide();
397 myHorizontalFrameEnd->hide();
398 myCreateIntervalButton->hide();
399 }
400 // refresh interval seletor
401 refreshIntervalSelector();
402 return 1;
403}
404
405
406FXTreeItem*
408 // insert item in Tree list
409 FXTreeItem* item = myIntervalsTreelist->insertItem(nullptr, itemParent,
410 dataInterval->getHierarchyName().c_str(),
413 // insert item in map
414 myTreeItemIntervalMap[item] = dataInterval;
415 // by default item is expanded
416 item->setExpanded(true);
417 // select first item
418 if (myTreeItemIntervalMap.size() == 1) {
419 item->setSelected(TRUE);
420 }
421 // return created FXTreeItem
422 return item;
423}
424
425// ---------------------------------------------------------------------------
426// GNEGenericDataFrame::AttributeSelector - methods
427// ---------------------------------------------------------------------------
428
430 MFXGroupBoxModule(genericDataFrameParent, TL("Data attributes")),
431 myGenericDataFrameParent(genericDataFrameParent),
432 myMinMaxLabel(nullptr),
433 myGenericDataTag(tag) {
434 // Create MFXComboBoxIcon
437 // build rainbow
439 // refresh interval selector
441 // AttributeSelector is always shown
442 show();
443}
444
445
447
448
449void
451 // save current attribute
452 const auto currentAttribute = myAttributesComboBox->getText();
453 // clear items
454 myAttributesComboBox->clearItems();
455 // restore myMinMaxLabel
456 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
457 // fill myAttributesComboBox depending of data sets
458 if (myGenericDataFrameParent->myDataSetSelector->getDataSet() == nullptr) {
459 myAttributesComboBox->appendIconItem("<no dataSet selected>");
460 myAttributesComboBox->disable();
461 } else {
462 // add all item
463 myAttributesComboBox->appendIconItem("<all>");
464 // add attributes depending of interval
465 if (myGenericDataFrameParent->myIntervalSelector->getDataInterval() == nullptr) {
466 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
467 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag), "", "");
468 // add all parameters
469 for (const auto& attribute : parameters) {
470 myAttributesComboBox->appendIconItem(attribute.c_str());
471 }
472 } else {
473 // retrieve all parameters within begin and end
474 const auto parameters = myGenericDataFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDataParameters(
475 myGenericDataFrameParent->myDataSetSelector->getDataSet()->getID(), toString(myGenericDataTag),
476 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_BEGIN),
477 myGenericDataFrameParent->myIntervalSelector->getDataInterval()->getAttribute(SUMO_ATTR_END));
478 // add all parameters
479 for (const auto& attribute : parameters) {
480 myAttributesComboBox->appendIconItem(attribute.c_str());
481 }
482 }
483 // enable combo Box
484 myAttributesComboBox->enable();
485 // set current item
486 for (int i = 0; i < myAttributesComboBox->getNumItems(); i++) {
487 if (myAttributesComboBox->getItemText(i) == currentAttribute.text()) {
488 myAttributesComboBox->setCurrentItem(i, TRUE);
489 }
490 }
491 }
492 // recalc frame
493 recalc();
494 // update view net
495 myGenericDataFrameParent->getViewNet()->updateViewNet();
496}
497
498
499std::string
501 if (myAttributesComboBox->getNumItems() == 0) {
502 return "";
503 } else if (myAttributesComboBox->getText() == TL("<all>")) {
504 return "";
505 } else {
506 return myAttributesComboBox->getText().text();
507 }
508}
509
510
511const RGBColor&
512GNEGenericDataFrame::AttributeSelector::getScaledColor(const double min, const double max, const double value) const {
513 // update myMinMaxLabel
514 myMinMaxLabel->setText(("Min: " + toString(min) + " -> Max: " + toString(max)).c_str());
515 // return scaled color
516 return GNEViewNetHelper::getRainbowScaledColor(min, max, value);
517}
518
519
520long
522 // empty attribute means <all>
523 if (myAttributesComboBox->getText().empty()) {
524 myAttributesComboBox->setCurrentItem(0);
525 }
526 if (myAttributesComboBox->getText() == TL("<all>")) {
527 myMinMaxLabel->setText(TL("Scale: Min -> Max"));
528 }
529 // update view
530 myGenericDataFrameParent->getViewNet()->updateViewNet();
531 return 1;
532}
533
534// ---------------------------------------------------------------------------
535// GNEGenericDataFrame - methods
536// ---------------------------------------------------------------------------
537
542
543
548
549
554
555
560
561
566
567
568void
570 // first refresh data set selector
572 // check if there is an edge path creator
573 if (myPathCreator) {
575 }
576 // show frame
578}
579
580
581void
583 if (myPathCreator) {
584 // reset candidate edges
585 for (const auto& edge : myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
586 edge.second->resetCandidateFlags();
587 }
588 }
589 // hide frame
591}
592
593
594void
596 // refresh data set selector
598 // check if there is an edge path creator
599 if (myPathCreator) {
601 }
602}
603
604
605GNEGenericDataFrame::GNEGenericDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, SumoXMLTag tag, const bool pathCreator) :
606 GNEFrame(viewParent, viewNet, toString(tag)),
607 myDataSetSelector(nullptr),
608 myIntervalSelector(nullptr),
609 myAttributeSelector(nullptr),
611 myPathCreator(nullptr),
612 myGenericDataTag(tag) {
613 // create DataSetSelector
615 // create IntervalSelector module
617 // create AttributeSelector module
618 myAttributeSelector = new AttributeSelector(this, tag);
619 // create parameter editor module
621 // create GNEPathCreator module
622 if (pathCreator) {
623 myPathCreator = new GNEPathCreator(this, viewNet->getNet()->getNetworkPathManager());
624 }
625}
626
627
629
630
631void
635
636
637bool
638GNEGenericDataFrame::createPath(const bool /*useLastRoute*/) {
639 // this function has to be reimplemented in all child frames that uses a GNEPathCreator
640 return false;
641}
642
643/****************************************************************************/
FXDEFMAP(GNEGenericDataFrame::DataSetSelector) DataSetSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:939
@ MID_GNE_DATASET_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition GUIAppEnum.h:967
@ MID_GNE_CREATE
create element
Definition GUIAppEnum.h:941
@ MID_GNE_DATAINTERVAL_SELECTED
GNEDataInterval selected in comboBox of IntervalBar.
Definition GUIAppEnum.h:969
@ MID_GNE_DATASET_NEW
create new data set
Definition GUIAppEnum.h:965
@ MID_GNE_SELECT
select element
Definition GUIAppEnum.h:957
#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)
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
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)
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
GNEFrameAttributeModules::GenericDataAttributes * myGenericDataAttributes
parameters editor creator
virtual bool createPath(const bool useLastRoute)
create path
void intervalSelected()
interval selected
IntervalSelector * myIntervalSelector
interval selector modul
DataSetSelector * myDataSetSelector
dataSet selector modul
const AttributeSelector * getAttributeSelector() const
getattribute selector modul
GNEGenericDataFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, SumoXMLTag tag, const bool pathCreator)
Constructor (protected due GNEGenericDataFrame is abtract)
GNEPathCreator * getPathCreator() const
get GNEPathCreator modul
AttributeSelector * myAttributeSelector
attribute selector modul
const DataSetSelector * getDataSetSelector() const
get dataSet selector modul
SumoXMLTag getTag() const
@bried get element type of this data frame
SumoXMLTag myGenericDataTag
generic data tag
GNEPathCreator * myPathCreator
edge path creator (used for Walks, rides and trips)
const IntervalSelector * getIntervalSelector() const
get interval selector modul
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:125
GNEPathManager * getNetworkPathManager()
get network path manager
Definition GNENet.cpp:137
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.
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
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