![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEDemandSelector.h>
Public Types | |
enum | Options { NOTHING = 1 << 0 , COLLAPSIBLE = 1 << 1 , EXTENSIBLE = 1 << 2 , SAVE = 1 << 3 , LOAD = 1 << 4 } |
GroupBoxModule options. More... | |
Public Member Functions | |
DemandElementSelector (GNEFrame *frameParent, const std::vector< GNETagProperties::TagType > &tagTypes) | |
constructor with tag type More... | |
DemandElementSelector (GNEFrame *frameParent, SumoXMLTag demandElementTag, GNEDemandElement *defaultElement=nullptr) | |
FOX-declaration. More... | |
const std::vector< SumoXMLTag > & | getAllowedTags () const |
FXVerticalFrame * | getCollapsableFrame () |
get collapsable frame (used by all elements that will be collapsed if button is toggled) More... | |
GNEEdge * | getContainerPlanPreviousEdge () const |
get previous edge for the current container plan More... | |
GNEDemandElement * | getCurrentDemandElement () const |
get current demand element More... | |
GNEEdge * | getPersonPlanPreviousEdge () const |
get previous edge for the current person plan More... | |
void | hideDemandElementSelector () |
hide demand element selector More... | |
bool | isDemandElementSelectorShown () const |
check if demand element selector is shown More... | |
long | onCmdCollapseButton (FXObject *, FXSelector, void *) |
collapse GroupBoxModule More... | |
long | onCmdExtendButton (FXObject *, FXSelector, void *) |
extends GroupBoxModule More... | |
long | onCmdLoadButton (FXObject *, FXSelector, void *) |
load contents More... | |
long | onCmdResetButton (FXObject *, FXSelector, void *) |
reset GroupBoxModule More... | |
long | onCmdSaveButton (FXObject *, FXSelector, void *) |
save contents More... | |
long | onPaint (FXObject *, FXSelector, void *) |
draw MFXGroupBoxModule More... | |
long | onUpdResetButton (FXObject *, FXSelector, void *) |
update reset GroupBoxModule More... | |
void | refreshDemandElementSelector () |
refresh demand element selector More... | |
void | setDemandElement (GNEDemandElement *demandElement) |
set current demand element More... | |
void | setDemandElements (const std::vector< GNEDemandElement * > &demandElements) |
set multiple demand elements to filter More... | |
void | setText (const std::string &text) |
set text More... | |
void | showDemandElementSelector () |
show demand element selector More... | |
~DemandElementSelector () | |
destructor More... | |
FOX-callbacks | |
Called when the user select another demand elementelement in ComboBox | |
long | onCmdSelectDemandElement (FXObject *, FXSelector, void *) |
Protected Member Functions | |
virtual bool | loadContents () const |
load contents (can be reimplemented in children) More... | |
virtual bool | saveContents () const |
save contents (can be reimplemented in children) More... | |
void | toggleSaveButton (const bool value) |
enable or disable save buttons More... | |
Private Attributes | |
FXVerticalFrame * | myCollapsableFrame = nullptr |
vertical collapsable frame More... | |
FXButton * | myCollapseButton = nullptr |
button for collapse elements More... | |
bool | myCollapsed |
flag to check if this groupbox is collapsed More... | |
GNEDemandElement * | myCurrentDemandElement |
current demand element More... | |
MFXIconComboBox * | myDemandElementsMatchBox |
comboBox with the list of elements type More... | |
std::vector< SumoXMLTag > | myDemandElementTags |
demand element tags More... | |
FXButton * | myExtendButton = nullptr |
button for extend elements More... | |
GNEFrame * | myFrameParent |
FOX need this. More... | |
FXLabel * | myInfoLabel |
info label More... | |
FXLabel * | myLabel = nullptr |
label used in non collapsable MFXGroupBoxModule More... | |
FXButton * | myLoadButton = nullptr |
button for load elements More... | |
const int | myOptions |
GroupBoxModule options. More... | |
FXButton * | myResetWidthButton = nullptr |
button for reset frame width More... | |
FXButton * | mySaveButton = nullptr |
button for save elements More... | |
bool | mySelectingMultipleElements |
flag for enable/disable multiple element selection More... | |
Definition at line 35 of file GNEDemandSelector.h.
|
inherited |
GroupBoxModule options.
Enumerator | |
---|---|
NOTHING | |
COLLAPSIBLE | |
EXTENSIBLE | |
SAVE | |
LOAD |
Definition at line 37 of file MFXGroupBoxModule.h.
DemandElementSelector::DemandElementSelector | ( | GNEFrame * | frameParent, |
SumoXMLTag | demandElementTag, | ||
GNEDemandElement * | defaultElement = nullptr |
||
) |
DemandElementSelector::DemandElementSelector | ( | GNEFrame * | frameParent, |
const std::vector< GNETagProperties::TagType > & | tagTypes | ||
) |
constructor with tag type
Definition at line 64 of file GNEDemandSelector.cpp.
References MFXGroupBoxModule::getCollapsableFrame(), GNEAttributeCarrier::getTagPropertiesByType(), GUIDesignComboBox, GUIDesignComboBoxNCol, GUIDesignLabelFrameInformation, MID_GNE_SET_TYPE, myDemandElementsMatchBox, myDemandElementTags, myInfoLabel, and refreshDemandElementSelector().
DemandElementSelector::~DemandElementSelector | ( | ) |
destructor
Definition at line 87 of file GNEDemandSelector.cpp.
const std::vector< SumoXMLTag > & DemandElementSelector::getAllowedTags | ( | ) | const |
Definition at line 97 of file GNEDemandSelector.cpp.
References myDemandElementTags.
Referenced by GNEStopFrame::show().
|
inherited |
get collapsable frame (used by all elements that will be collapsed if button is toggled)
Definition at line 118 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::myCollapsableFrame.
Referenced by GNEInspectorFrame::AdditionalDialog::AdditionalDialog(), GNEFrameAttributeModules::AttributesEditor::AttributesEditor(), GNEFrameAttributeModules::AttributesEditorExtended::AttributesEditorExtended(), GNEGenericDataFrame::AttributeSelector::AttributeSelector(), GNEOverlappedInspection::buildFXElements(), GNEMoveFrame::ChangeZInSelection::ChangeZInSelection(), GNEConnectorFrame::ConnectionModifications::ConnectionModifications(), GNEConnectorFrame::ConnectionOperations::ConnectionOperations(), GNEConnectorFrame::ConnectionSelection::ConnectionSelection(), GNECrossingFrame::CreateCrossing::CreateCrossing(), GNECrossingFrame::CrossingParameters::CrossingParameters(), GNETAZFrame::CurrentTAZ::CurrentTAZ(), DemandElementSelector(), GNEMoveFrame::DemandModeOptions::DemandModeOptions(), GNECrossingFrame::EdgesSelector::EdgesSelector(), GNEFrameAttributeModules::GenericDataAttributes::GenericDataAttributes(), GNEInspectorFrame::GEOAttributesEditor::GEOAttributesEditor(), GNEM_PathLegend::GNEM_PathLegend(), GNEPathCreator::GNEPathCreator(), GNESelectorParent::GNESelectorParent(), GNEStopFrame::HelpCreation::HelpCreation(), GNEVehicleFrame::HelpCreation::HelpCreation(), GNECrossingFrame::Information::Information(), GNESelectorFrame::Information::Information(), GNEGenericDataFrame::IntervalSelector::IntervalSelector(), GNECreateEdgeFrame::LaneTypeSelector::LaneTypeSelector(), GNEConnectorFrame::Legend::Legend(), GNECreateEdgeFrame::Legend::Legend(), GNEProhibitionFrame::Legend::Legend(), GNETAZRelDataFrame::Legend::Legend(), GNESelectorFrame::ModificationMode::ModificationMode(), GNEMoveFrame::NetworkModeOptions::NetworkModeOptions(), GNEMatchAttribute::onCmdHelp(), GNEMatchGenericDataAttribute::onCmdHelp(), GNENeteditAttributes::onCmdHelp(), GNEOverlappedInspection::onCmdOverlappingHelp(), GNEInspectorFrame::ParametersEditor::ParametersEditor(), GNEDeleteFrame::ProtectElements::ProtectElements(), GNEAttributesCreator::refreshRows(), GNEProhibitionFrame::Selection::Selection(), GNESelectorFrame::SelectionHierarchy::SelectionHierarchy(), GNESelectorFrame::SelectionOperation::SelectionOperation(), GNEMoveFrame::ShiftEdgeSelectedGeometry::ShiftEdgeSelectedGeometry(), GNEMoveFrame::ShiftShapeGeometry::ShiftShapeGeometry(), GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters(), GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics(), GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic(), GNETAZFrame::TAZParameters::TAZParameters(), GNETAZFrame::TAZSaveChanges::TAZSaveChanges(), GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics(), GNEInspectorFrame::TemplateEditor::TemplateEditor(), GNETLSEditorFrame::TLSAttributes::TLSAttributes(), GNETLSEditorFrame::TLSDefinition::TLSDefinition(), GNETLSEditorFrame::TLSFile::TLSFile(), GNETLSEditorFrame::TLSJunction::TLSJunction(), GNETLSEditorFrame::TLSPhases::TLSPhases(), GNETypeFrame::TypeEditor::TypeEditor(), GNESelectorFrame::VisualScaling::VisualScaling(), and GNETypeFrame::VTypeDistributions::VTypeDistributions().
GNEEdge * DemandElementSelector::getContainerPlanPreviousEdge | ( | ) | const |
get previous edge for the current container plan
Definition at line 277 of file GNEDemandSelector.cpp.
References GNEHierarchicalElement::getChildDemandElements(), GNEHierarchicalElement::getParentAdditionals(), GNEHierarchicalElement::getParentEdges(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNE_TAG_STOPCONTAINER_CONTAINERSTOP, GNE_TAG_STOPCONTAINER_EDGE, GNE_TAG_TRANSHIP_CONTAINERSTOP, GNE_TAG_TRANSHIP_EDGE, GNE_TAG_TRANSHIP_EDGES, GNE_TAG_TRANSPORT_CONTAINERSTOP, GNE_TAG_TRANSPORT_EDGE, GNETagProperties::isContainer(), and myCurrentDemandElement.
Referenced by GNEContainerPlanFrame::tagSelected().
GNEDemandElement * DemandElementSelector::getCurrentDemandElement | ( | ) | const |
get current demand element
Definition at line 91 of file GNEDemandSelector.cpp.
References myCurrentDemandElement.
Referenced by GNEContainerFrame::addContainer(), GNEContainerPlanFrame::addContainerPlanElement(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEVehicleFrame::addVehicle(), GNEContainerFrame::buildContainer(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::buildVehicleOverRoute(), GNEContainerPlanFrame::createPath(), GNEPersonPlanFrame::createPath(), GNEVehicleFrame::createPath(), GNEContainerFrame::demandElementSelected(), GNEContainerPlanFrame::demandElementSelected(), GNEPersonFrame::demandElementSelected(), GNEPersonPlanFrame::demandElementSelected(), GNEStopFrame::demandElementSelected(), GNEVehicleFrame::demandElementSelected(), GNEStop::getColor(), GNEStopFrame::getStopParameter(), GNEContainerFrame::tagSelected(), GNEContainerPlanFrame::tagSelected(), GNEPersonFrame::tagSelected(), and GNEPersonPlanFrame::tagSelected().
GNEEdge * DemandElementSelector::getPersonPlanPreviousEdge | ( | ) | const |
get previous edge for the current person plan
Definition at line 234 of file GNEDemandSelector.cpp.
References GNEHierarchicalElement::getChildDemandElements(), GNEHierarchicalElement::getParentAdditionals(), GNEHierarchicalElement::getParentDemandElements(), GNEHierarchicalElement::getParentEdges(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNE_TAG_PERSONTRIP_BUSSTOP, GNE_TAG_PERSONTRIP_EDGE, GNE_TAG_RIDE_BUSSTOP, GNE_TAG_RIDE_EDGE, GNE_TAG_STOPPERSON_BUSSTOP, GNE_TAG_STOPPERSON_EDGE, GNE_TAG_WALK_BUSSTOP, GNE_TAG_WALK_EDGE, GNE_TAG_WALK_EDGES, GNE_TAG_WALK_ROUTE, GNETagProperties::isPerson(), and myCurrentDemandElement.
Referenced by GNEPersonPlanFrame::tagSelected().
void DemandElementSelector::hideDemandElementSelector | ( | ) |
hide demand element selector
Definition at line 159 of file GNEDemandSelector.cpp.
Referenced by GNEContainerPlanFrame::show(), GNEPersonPlanFrame::show(), GNEStopFrame::show(), GNEContainerFrame::tagSelected(), GNEPersonFrame::tagSelected(), and GNEVehicleFrame::tagSelected().
bool DemandElementSelector::isDemandElementSelectorShown | ( | ) | const |
check if demand element selector is shown
Definition at line 165 of file GNEDemandSelector.cpp.
|
protectedvirtualinherited |
load contents (can be reimplemented in children)
Definition at line 226 of file MFXGroupBoxModule.cpp.
Referenced by MFXGroupBoxModule::onCmdLoadButton().
|
inherited |
collapse GroupBoxModule
Definition at line 137 of file MFXGroupBoxModule.cpp.
References COLLAPSE, GUIIconSubSys::getIcon(), MFXGroupBoxModule::myCollapsableFrame, MFXGroupBoxModule::myCollapseButton, MFXGroupBoxModule::myCollapsed, and UNCOLLAPSE.
Referenced by FXDEFMAP().
|
inherited |
extends GroupBoxModule
Definition at line 153 of file MFXGroupBoxModule.cpp.
References GNEFrame::getScrollBarWidth(), GNETLSEditorFrame::TLSPhases::getTLSEditorParent(), GNETLSTable::getTLSPhasesParent(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myCollapsableFrame, MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().
Referenced by FXDEFMAP().
|
inherited |
load contents
Definition at line 207 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::loadContents().
Referenced by FXDEFMAP().
|
inherited |
reset GroupBoxModule
Definition at line 179 of file MFXGroupBoxModule.cpp.
References GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().
Referenced by FXDEFMAP().
|
inherited |
save contents
Definition at line 201 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::saveContents().
Referenced by FXDEFMAP().
long DemandElementSelector::onCmdSelectDemandElement | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 313 of file GNEDemandSelector.cpp.
References GNEFrame::demandElementSelected(), GNENet::getAttributeCarriers(), GNENetHelper::AttributeCarriers::getDemandElements(), GNEViewNet::getNet(), MFXIconComboBox::getText(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsMatchBox, myDemandElementTags, myFrameParent, myInfoLabel, MFXIconComboBox::setTextColor(), and WRITE_DEBUG.
Referenced by FXDEFMAP(), and showDemandElementSelector().
|
inherited |
draw MFXGroupBoxModule
Definition at line 124 of file MFXGroupBoxModule.cpp.
Referenced by FXDEFMAP().
|
inherited |
update reset GroupBoxModule
Definition at line 188 of file MFXGroupBoxModule.cpp.
References GNEViewParent::getFrameAreaWidth(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), and MFXGroupBoxModule::myFrameParent.
Referenced by FXDEFMAP().
void DemandElementSelector::refreshDemandElementSelector | ( | ) |
refresh demand element selector
Definition at line 171 of file GNEDemandSelector.cpp.
References MFXIconComboBox::appendIconItem(), MFXIconComboBox::clearItems(), DEFAULT_BIKETYPE_ID, DEFAULT_CONTAINERTYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_TAXITYPE_ID, DEFAULT_VTYPE_ID, DEFAULT_VTYPES, GNENet::getAttributeCarriers(), GNENetHelper::AttributeCarriers::getDefaultType(), GNENetHelper::AttributeCarriers::getDemandElements(), GUIIconSubSys::getIcon(), GNEAttributeCarrier::getID(), MFXIconComboBox::getItem(), GNEViewNet::getNet(), MFXIconComboBox::getNumItems(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsMatchBox, myDemandElementTags, myFrameParent, MFXIconComboBox::setCurrentItem(), MFXIconComboBox::setNumVisible(), SUMO_TAG_VTYPE, and VTYPE.
Referenced by DemandElementSelector(), GNEStopFrame::GNEStopFrame(), GNEContainerFrame::show(), GNEPersonFrame::show(), GNEStopFrame::show(), and showDemandElementSelector().
|
protectedvirtualinherited |
save contents (can be reimplemented in children)
Reimplemented in GNEFixDemandElements::FixOptions, and GNEFixNetworkElements::FixOptions.
Definition at line 219 of file MFXGroupBoxModule.cpp.
Referenced by MFXGroupBoxModule::onCmdSaveButton().
void DemandElementSelector::setDemandElement | ( | GNEDemandElement * | demandElement | ) |
set current demand element
Definition at line 103 of file GNEDemandSelector.cpp.
References GNEFrame::demandElementSelected(), GNEAttributeCarrier::getACIcon(), GNEAttributeCarrier::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), myCurrentDemandElement, myDemandElementsMatchBox, myDemandElementTags, myFrameParent, myInfoLabel, mySelectingMultipleElements, MFXIconComboBox::setCustomText(), and MFXIconComboBox::setItem().
Referenced by GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEPersonPlanFrame::resetSelectedPerson(), GNEContainerPlanFrame::show(), and GNEPersonPlanFrame::show().
void DemandElementSelector::setDemandElements | ( | const std::vector< GNEDemandElement * > & | demandElements | ) |
set multiple demand elements to filter
Definition at line 126 of file GNEDemandSelector.cpp.
References MFXIconComboBox::appendIconItem(), MFXIconComboBox::clearItems(), myCurrentDemandElement, myDemandElementsMatchBox, myInfoLabel, mySelectingMultipleElements, and MFXIconComboBox::setCustomText().
Referenced by GNEPersonPlanFrame::addPersonPlanElement().
|
inherited |
set text
Definition at line 112 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::myLabel.
Referenced by GNETagSelector::setCurrentTagType(), and GNESelectorFrame::SelectionInformation::updateInformationLabel().
void DemandElementSelector::showDemandElementSelector | ( | ) |
show demand element selector
Definition at line 141 of file GNEDemandSelector.cpp.
References DEFAULT_VTYPE_ID, GNEAttributeCarrier::getACIcon(), GNENet::getAttributeCarriers(), GNEAttributeCarrier::getID(), GNEViewNet::getNet(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsMatchBox, myDemandElementTags, myFrameParent, onCmdSelectDemandElement(), refreshDemandElementSelector(), GNENetHelper::AttributeCarriers::retrieveDemandElement(), MFXIconComboBox::setItem(), and SUMO_TAG_VTYPE.
Referenced by GNEContainerPlanFrame::show(), GNEPersonPlanFrame::show(), GNEStopFrame::show(), GNEContainerFrame::tagSelected(), GNEPersonFrame::tagSelected(), and GNEVehicleFrame::tagSelected().
|
protectedinherited |
enable or disable save buttons
Definition at line 233 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::mySaveButton.
|
privateinherited |
vertical collapsable frame
Definition at line 102 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::getCollapsableFrame(), MFXGroupBoxModule::MFXGroupBoxModule(), MFXGroupBoxModule::onCmdCollapseButton(), and MFXGroupBoxModule::onCmdExtendButton().
|
privateinherited |
button for collapse elements
Definition at line 108 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::onCmdCollapseButton().
|
privateinherited |
flag to check if this groupbox is collapsed
Definition at line 123 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::onCmdCollapseButton().
|
private |
current demand element
Definition at line 100 of file GNEDemandSelector.h.
Referenced by getContainerPlanPreviousEdge(), getCurrentDemandElement(), getPersonPlanPreviousEdge(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), setDemandElements(), and showDemandElementSelector().
|
private |
comboBox with the list of elements type
Definition at line 94 of file GNEDemandSelector.h.
Referenced by DemandElementSelector(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), setDemandElements(), and showDemandElementSelector().
|
private |
demand element tags
Definition at line 103 of file GNEDemandSelector.h.
Referenced by DemandElementSelector(), getAllowedTags(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), and showDemandElementSelector().
|
privateinherited |
button for extend elements
Definition at line 111 of file MFXGroupBoxModule.h.
|
private |
FOX need this.
pointer to frame Parent
Definition at line 91 of file GNEDemandSelector.h.
Referenced by onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), and showDemandElementSelector().
|
private |
info label
Definition at line 97 of file GNEDemandSelector.h.
Referenced by DemandElementSelector(), onCmdSelectDemandElement(), setDemandElement(), and setDemandElements().
|
privateinherited |
label used in non collapsable MFXGroupBoxModule
Definition at line 105 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::setText().
|
privateinherited |
button for load elements
Definition at line 120 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule().
|
privateinherited |
GroupBoxModule options.
Definition at line 96 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule().
|
privateinherited |
button for reset frame width
Definition at line 114 of file MFXGroupBoxModule.h.
|
privateinherited |
button for save elements
Definition at line 117 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::toggleSaveButton().
|
private |
flag for enable/disable multiple element selection
Definition at line 106 of file GNEDemandSelector.h.
Referenced by setDemandElement(), and setDemandElements().