![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEElementList.h>
Public Types | |
| enum class | Options : int { NONE = 1 << 0 , SORTELEMENTS = 1 << 1 , DIALOG_ELEMENT = 1 << 2 , DIALOG_VCLASS = 1 << 3 , FIXED_HEIGHT = 1 << 4 } |
| FOX-declaration. More... | |
Public Member Functions | |
| virtual long | addNewElement ()=0 |
| add element | |
| void | disableList (const std::string &reason) |
| disable list | |
| void | enableList () |
| enable list | |
| GNEElementList (FXVerticalFrame *contentFrame, const GNETagProperties *tagProperty, GNEElementList::Options options) | |
| constructor | |
| bool | isListValid () const |
| check if the current list is valid | |
| virtual long | openElementDialog (const size_t rowIndex)=0 |
| open element dialog | |
| virtual long | removeElement (const size_t rowIndex)=0 |
| remove element | |
| virtual long | sortRows ()=0 |
| open dialog | |
| virtual long | updateList ()=0 |
| update element list | |
| ~GNEElementList () | |
| destructor | |
FOX callbacks | |
| long | onCmdAddRow (FXObject *sender, FXSelector, void *) |
| called when user press add button | |
| long | onCmdSort (FXObject *sender, FXSelector, void *) |
| called when user press sort button | |
Protected Member Functions | |
| void | removeElementRecursively (GNEAdditional *additionalElement) const |
| delete additional element recursively | |
| void | removeElementRecursively (GNEDemandElement *demandElement) const |
| delete demand element recursively | |
Protected Attributes | |
| GNEElementTable * | myElementTable = nullptr |
| element table | |
| const GNETagProperties * | myTagProperty = nullptr |
| FOX needs this. | |
Private Member Functions | |
| GNEElementList (const GNEElementList &)=delete | |
| Invalidated copy constructor. | |
| GNEElementList & | operator= (const GNEElementList &)=delete |
| Invalidated assignment operator. | |
Private Attributes | |
| FXButton * | myAddButton = nullptr |
| add button | |
| FXLabel * | myLabel = nullptr |
| label | |
| FXButton * | mySortButton = nullptr |
| sort button | |
Definition at line 35 of file GNEElementList.h.
|
strong |
FOX-declaration.
enum class for element list options
| Enumerator | |
|---|---|
| NONE | |
| SORTELEMENTS | |
| DIALOG_ELEMENT | |
| DIALOG_VCLASS | |
| FIXED_HEIGHT | |
Definition at line 41 of file GNEElementList.h.
| GNEElementList::GNEElementList | ( | FXVerticalFrame * | contentFrame, |
| const GNETagProperties * | tagProperty, | ||
| GNEElementList::Options | options | ||
| ) |
constructor
Definition at line 50 of file GNEElementList.cpp.
References ADD, GUIDesigns::buildFXButton(), GUIIconSubSys::getIcon(), GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonIcon, GUIDesignLabelThick, MID_GNE_ELEMENTLIST_ADD, MID_GNE_ELEMENTLIST_SORT, RELOAD, SORTELEMENTS, and TLF.
| GNEElementList::~GNEElementList | ( | ) |
destructor
Definition at line 70 of file GNEElementList.cpp.
|
privatedelete |
Invalidated copy constructor.
|
pure virtual |
add element
Implemented in GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNECalibratorDialog::CalibratorFlowsList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, GNEVariableSpeedSignDialog::VariableSpeedSignStepsList, GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >, GNETemplateElementList< GNEAdditional, GNEAdditional, GNEChange_Additional >, and GNETemplateElementList< GNEAdditional, GNEDemandElement, GNEChange_DemandElement >.
Referenced by onCmdAddRow().
| void GNEElementList::disableList | ( | const std::string & | reason | ) |
disable list
Definition at line 86 of file GNEElementList.cpp.
References myAddButton, myElementTable, myLabel, and mySortButton.
Referenced by GNECalibratorDialog::CalibratorFlowsList::CalibratorFlowsList(), GNERerouterIntervalDialog::ClosingLaneReroutesList::ClosingLaneReroutesList(), GNERerouterIntervalDialog::ClosingReroutesList::ClosingReroutesList(), GNERerouterIntervalDialog::DestProbReroutesList::DestProbReroutesList(), GNERerouterIntervalDialog::ParkingAreaReroutesList::ParkingAreaReroutesList(), and GNERerouterIntervalDialog::RouteProbReroutesList::RouteProbReroutesList().
| void GNEElementList::enableList | ( | ) |
enable list
Definition at line 74 of file GNEElementList.cpp.
References GNETagProperties::getTagStr(), myAddButton, myElementTable, myLabel, mySortButton, myTagProperty, and TLF.
| bool GNEElementList::isListValid | ( | ) | const |
check if the current list is valid
Definition at line 98 of file GNEElementList.cpp.
References GNEElementTable::isValid(), and myElementTable.
Referenced by GNECalibratorDialog::onCmdAccept(), and GNERerouterIntervalDialog::onCmdAccept().
| long GNEElementList::onCmdAddRow | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | |||
| ) |
called when user press add button
Definition at line 104 of file GNEElementList.cpp.
References addNewElement().
Referenced by FXDEFMAP().
| long GNEElementList::onCmdSort | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | |||
| ) |
called when user press sort button
Definition at line 110 of file GNEElementList.cpp.
References sortRows().
Referenced by FXDEFMAP().
|
pure virtual |
open element dialog
Implemented in GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNECalibratorDialog::CalibratorFlowsList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, GNEVariableSpeedSignDialog::VariableSpeedSignStepsList, GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >, GNETemplateElementList< GNEAdditional, GNEAdditional, GNEChange_Additional >, and GNETemplateElementList< GNEAdditional, GNEDemandElement, GNEChange_DemandElement >.
|
privatedelete |
Invalidated assignment operator.
|
pure virtual |
|
protected |
delete additional element recursively
Definition at line 116 of file GNEElementList.cpp.
References GNEUndoList::add(), GNEHierarchicalElement::getChildAdditionals(), GNEHierarchicalElement::getChildDemandElements(), GNEAttributeCarrier::getNet(), GNEViewNet::getUndoList(), GNENet::getViewNet(), and removeElementRecursively().
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement(), removeElementRecursively(), and removeElementRecursively().
|
protected |
delete demand element recursively
Definition at line 132 of file GNEElementList.cpp.
References GNEUndoList::add(), GNEHierarchicalElement::getChildAdditionals(), GNEHierarchicalElement::getChildDemandElements(), GNEAttributeCarrier::getNet(), GNEViewNet::getUndoList(), GNENet::getViewNet(), and removeElementRecursively().
|
pure virtual |
open dialog
Implemented in GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >, GNETemplateElementList< GNEAdditional, GNEAdditional, GNEChange_Additional >, and GNETemplateElementList< GNEAdditional, GNEDemandElement, GNEChange_DemandElement >.
Referenced by onCmdSort().
|
pure virtual |
|
private |
add button
Definition at line 108 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
protected |
element table
Definition at line 98 of file GNEElementList.h.
Referenced by disableList(), enableList(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getSortTuples(), isListValid(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
private |
label
Definition at line 114 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
private |
sort button
Definition at line 111 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
protected |
FOX needs this.
pointer to tag property
Definition at line 95 of file GNEElementList.h.
Referenced by enableList(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().