![]() |
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 GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
privatedelete |
Invalidated copy constructor.
|
pure virtual |
add new element (must be implemented in children)
Implements GNEElementList.
Implemented in GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNECalibratorDialog::CalibratorFlowsList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, and GNEVariableSpeedSignDialog::VariableSpeedSignStepsList.
|
inline |
check if the elements are sorted
Definition at line 77 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getSortTuples().
|
inherited |
disable list
Definition at line 86 of file GNEElementList.cpp.
References GNEElementList::myAddButton, GNEElementList::myElementTable, GNEElementList::myLabel, and GNEElementList::mySortButton.
Referenced by GNECalibratorDialog::CalibratorFlowsList::CalibratorFlowsList(), GNERerouterIntervalDialog::ClosingLaneReroutesList::ClosingLaneReroutesList(), GNERerouterIntervalDialog::ClosingReroutesList::ClosingReroutesList(), GNERerouterIntervalDialog::DestProbReroutesList::DestProbReroutesList(), GNERerouterIntervalDialog::ParkingAreaReroutesList::ParkingAreaReroutesList(), and GNERerouterIntervalDialog::RouteProbReroutesList::RouteProbReroutesList().
|
inherited |
enable list
Definition at line 74 of file GNEElementList.cpp.
References GNETagProperties::getTagStr(), GNEElementList::myAddButton, GNEElementList::myElementTable, GNEElementList::myLabel, GNEElementList::mySortButton, GNEElementList::myTagProperty, and TLF.
|
inline |
get edited elements
Definition at line 46 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements.
Referenced by GNERerouterIntervalDialog::onCmdAccept().
|
inlineprivate |
get element sorted
Definition at line 140 of file GNETemplateElementList.h.
References GNEElementTable::getColumnHeader(), GNEElementTable::ColumnHeader::getSortableAttributes(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements, and GNEElementList::myElementTable.
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::checkSort(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::sortRows().
|
inline |
insert element
Definition at line 51 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
inherited |
check if the current list is valid
Definition at line 98 of file GNEElementList.cpp.
References GNEElementTable::isValid(), and GNEElementList::myElementTable.
Referenced by GNECalibratorDialog::onCmdAccept(), and GNERerouterIntervalDialog::onCmdAccept().
|
inherited |
called when user press add button
Definition at line 104 of file GNEElementList.cpp.
References GNEElementList::addNewElement().
Referenced by FXDEFMAP().
|
inherited |
called when user press sort button
Definition at line 110 of file GNEElementList.cpp.
References GNEElementList::sortRows().
Referenced by FXDEFMAP().
|
pure virtual |
open element dialog (optional
Implements GNEElementList.
Implemented in GNECalibratorDialog::RoutesList, GNECalibratorDialog::VTypesList, GNECalibratorDialog::CalibratorFlowsList, GNERerouterDialog::RerouterIntervalsList, GNERerouterIntervalDialog::ClosingReroutesList, GNERerouterIntervalDialog::ClosingLaneReroutesList, GNERerouterIntervalDialog::DestProbReroutesList, GNERerouterIntervalDialog::RouteProbReroutesList, GNERerouterIntervalDialog::ParkingAreaReroutesList, and GNEVariableSpeedSignDialog::VariableSpeedSignStepsList.
|
privatedelete |
Invalidated assignment operator.
|
inline |
remove element
Definition at line 111 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements, and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement().
|
inlinevirtual |
remove element (using index)
Implements GNEElementList.
Definition at line 103 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements, GNEElementList::removeElementRecursively(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::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 GNEElementList::removeElementRecursively().
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement(), GNEElementList::removeElementRecursively(), and GNEElementList::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 GNEElementList::removeElementRecursively().
|
inlinevirtual |
open dialog
Implements GNEElementList.
Definition at line 90 of file GNETemplateElementList.h.
References GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getSortTuples(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements, and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
inlinevirtual |
update element list
Implements GNEElementList.
Definition at line 59 of file GNETemplateElementList.h.
References GNETemplateElementDialog< T >::getElement(), GNETagProperties::getTag(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myEditedElements, GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::myElementDialogParent, GNEElementList::myElementTable, GNEElementList::myTagProperty, GNEElementTable::resizeTable(), and GNEElementTable::updateRow().
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::GNETemplateElementList(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::insertElement(), GNECalibratorDialog::onCmdReset(), GNERerouterDialog::onCmdReset(), GNERerouterIntervalDialog::onCmdReset(), GNEVariableSpeedSignDialog::onCmdReset(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::sortRows().
|
privateinherited |
add button
Definition at line 108 of file GNEElementList.h.
Referenced by GNEElementList::disableList(), and GNEElementList::enableList().
|
protected |
edited elements
Definition at line 133 of file GNETemplateElementList.h.
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getEditedElements(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getSortTuples(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::removeElement(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::sortRows(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
protected |
element dialog parent
Definition at line 130 of file GNETemplateElementList.h.
Referenced by GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
protectedinherited |
element table
Definition at line 98 of file GNEElementList.h.
Referenced by GNEElementList::disableList(), GNEElementList::enableList(), GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::getSortTuples(), GNEElementList::isListValid(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().
|
privateinherited |
label
Definition at line 114 of file GNEElementList.h.
Referenced by GNEElementList::disableList(), and GNEElementList::enableList().
|
privateinherited |
sort button
Definition at line 111 of file GNEElementList.h.
Referenced by GNEElementList::disableList(), and GNEElementList::enableList().
|
protectedinherited |
FOX needs this.
pointer to tag property
Definition at line 95 of file GNEElementList.h.
Referenced by GNEElementList::enableList(), and GNETemplateElementList< elementDialogType, elementType, GNEChange_Type >::updateList().