![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNETemplateElementList.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 new element (must be implemented in children) | |
| bool | checkSort () const |
| check if the elements are sorted | |
| void | disableList (const std::string &reason) |
| disable list | |
| void | enableList () |
| enable list | |
| const std::vector< elementType * > & | getEditedElements () const |
| get edited elements | |
| GNETemplateElementList (GNETemplateElementDialog< elementDialogType > *elementDialogParent, FXVerticalFrame *contentFrame, SumoXMLTag tag, GNEElementList::Options options) | |
| constructor | |
| long | insertElement (elementType *element) |
| insert element | |
| bool | isListValid () const |
| check if the current list is valid | |
| virtual long | openElementDialog (const size_t rowIndex)=0 |
| open element dialog (optional | |
| long | removeElement (const elementType *element) |
| remove element | |
| long | removeElement (const size_t rowIndex) |
| remove element (using index) | |
| long | sortRows () |
| open dialog | |
| long | updateList () |
| update element list | |
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 | |
| std::vector< elementType * > | myEditedElements |
| edited elements | |
| GNETemplateElementDialog< elementDialogType > * | myElementDialogParent = nullptr |
| element dialog parent | |
| GNEElementTable * | myElementTable = nullptr |
| element table | |
| const GNETagProperties * | myTagProperty = nullptr |
| FOX needs this. | |
Private Types | |
| typedef std::tuple< double, double, double, double, double, double, elementType * > | SortTuple |
| typedef used for sorting elements by attributes | |
Private Member Functions | |
| std::vector< SortTuple > | getSortTuples (const bool sort) const |
| get element sorted | |
| GNETemplateElementList (const GNETemplateElementList &)=delete | |
| Invalidated copy constructor. | |
| GNETemplateElementList & | operator= (const GNETemplateElementList &)=delete |
| Invalidated assignment operator. | |
Private Attributes | |
| FXButton * | myAddButton = nullptr |
| add button | |
| FXLabel * | myLabel = nullptr |
| label | |
| FXButton * | mySortButton = nullptr |
| sort button | |
Definition at line 33 of file GNETemplateElementList.h.
|
private |
typedef used for sorting elements by attributes
Definition at line 137 of file GNETemplateElementList.h.
|
stronginherited |
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.
|
inline |
constructor
Definition at line 37 of file GNETemplateElementList.h.
References GNEElementList::GNEElementList(), myElementDialogParent, and updateList().
Referenced by GNETemplateElementList(), and operator=().
|
privatedelete |
Invalidated copy constructor.
References GNETemplateElementList().
|
pure virtual |
add new element (must be implemented in children)
Implements GNEElementList.
Implemented in GNECalibratorDialog::CalibratorFlowsList, GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, and GNEVariableSpeedSignDialog::VariableSpeedSignStepsList.
|
inline |
check if the elements are sorted
Definition at line 77 of file GNETemplateElementList.h.
References getSortTuples().
|
inherited |
disable list
Definition at line 86 of file GNEElementList.cpp.
References myAddButton, myElementTable, myLabel, and mySortButton.
|
inherited |
enable list
Definition at line 74 of file GNEElementList.cpp.
References myAddButton, myElementTable, myLabel, mySortButton, myTagProperty, and TLF.
|
inline |
get edited elements
Definition at line 46 of file GNETemplateElementList.h.
References myEditedElements.
|
inlineprivate |
get element sorted
Definition at line 140 of file GNETemplateElementList.h.
References myEditedElements, GNEElementList::myElementTable, and GNEAttributeCarrier::parse().
Referenced by checkSort(), and sortRows().
|
inline |
|
inherited |
check if the current list is valid
Definition at line 98 of file GNEElementList.cpp.
References myElementTable.
|
inherited |
called when user press add button
Definition at line 104 of file GNEElementList.cpp.
References addNewElement().
Referenced by FXDEFMAP().
|
inherited |
called when user press sort button
Definition at line 110 of file GNEElementList.cpp.
References sortRows().
Referenced by FXDEFMAP().
|
pure virtual |
open element dialog (optional
Implements GNEElementList.
Implemented in GNECalibratorDialog::CalibratorFlowsList, GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, and GNEVariableSpeedSignDialog::VariableSpeedSignStepsList.
|
privatedelete |
Invalidated assignment operator.
References GNETemplateElementList().
|
inline |
remove element
Definition at line 111 of file GNETemplateElementList.h.
References myEditedElements, and removeElement().
|
inlinevirtual |
remove element (using index)
Implements GNEElementList.
Definition at line 103 of file GNETemplateElementList.h.
References myEditedElements, GNEElementList::removeElementRecursively(), and updateList().
Referenced by removeElement().
|
protectedinherited |
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().
|
protectedinherited |
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().
|
inlinevirtual |
open dialog
Implements GNEElementList.
Definition at line 90 of file GNETemplateElementList.h.
References getSortTuples(), myEditedElements, and updateList().
|
inlinevirtual |
update element list
Implements GNEElementList.
Definition at line 59 of file GNETemplateElementList.h.
References myEditedElements, myElementDialogParent, GNEElementList::myElementTable, and GNEElementList::myTagProperty.
Referenced by GNETemplateElementList(), insertElement(), removeElement(), and sortRows().
|
privateinherited |
add button
Definition at line 108 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
protected |
edited elements
Definition at line 133 of file GNETemplateElementList.h.
Referenced by getEditedElements(), getSortTuples(), removeElement(), removeElement(), sortRows(), and updateList().
|
protected |
element dialog parent
Definition at line 130 of file GNETemplateElementList.h.
Referenced by GNETemplateElementList(), and updateList().
|
protectedinherited |
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().
|
privateinherited |
label
Definition at line 114 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
privateinherited |
sort button
Definition at line 111 of file GNEElementList.h.
Referenced by disableList(), and enableList().
|
protectedinherited |
FOX needs this.
pointer to tag property
Definition at line 95 of file GNEElementList.h.
Referenced by enableList(), GNEElementList(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().