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 | |
const std::vector< SumoXMLTag > & | getAllowedTags () const |
FXVerticalFrame * | getCollapsableFrame () |
get collapsable frame (used by all elements that will be collapsed if button is toggled) | |
GNEDemandElement * | getCurrentDemandElement () const |
get current demand element | |
GNEDemandElement * | getPreviousPlanElement () const |
get previous plan element | |
GNEDemandElementSelector (GNEFrame *frameParent, const std::vector< GNETagProperties::TagType > &tagTypes) | |
constructor with tag type | |
GNEDemandElementSelector (GNEFrame *frameParent, SumoXMLTag demandElementTag, int tagType) | |
FOX-declaration. | |
void | hideDemandElementSelector () |
hide demand element selector | |
bool | isDemandElementSelectorShown () const |
check if demand element selector is shown | |
long | onCmdCollapseButton (FXObject *, FXSelector, void *) |
collapse GroupBoxModule | |
long | onCmdExtendButton (FXObject *, FXSelector, void *) |
extends GroupBoxModule | |
long | onCmdLoadButton (FXObject *, FXSelector, void *) |
load contents | |
long | onCmdResetButton (FXObject *, FXSelector, void *) |
reset GroupBoxModule | |
long | onCmdSaveButton (FXObject *, FXSelector, void *) |
save contents | |
long | onPaint (FXObject *, FXSelector, void *) |
draw MFXGroupBoxModule | |
long | onUpdResetButton (FXObject *, FXSelector, void *) |
update reset GroupBoxModule | |
void | refreshDemandElementSelector () |
refresh demand element selector | |
void | setDemandElement (GNEDemandElement *demandElement) |
set current demand element | |
void | setDemandElements (const std::vector< GNEDemandElement * > &demandElements) |
set multiple demand elements to filter | |
void | setText (const std::string &text) |
set text | |
void | showDemandElementSelector () |
show demand element selector | |
~GNEDemandElementSelector () | |
destructor | |
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) | |
virtual bool | saveContents () const |
save contents (can be reimplemented in children) | |
void | toggleSaveButton (const bool value) |
enable or disable save buttons | |
Private Attributes | |
FXVerticalFrame * | myCollapsableFrame = nullptr |
vertical collapsable frame | |
FXButton * | myCollapseButton = nullptr |
button for collapse elements | |
bool | myCollapsed |
flag to check if this groupbox is collapsed | |
GNEDemandElement * | myCurrentDemandElement |
current demand element | |
MFXComboBoxIcon * | myDemandElementsComboBox |
comboBox with the list of elements type | |
std::vector< SumoXMLTag > | myDemandElementTags |
demand element tags | |
MFXButtonTooltip * | myExtendButton = nullptr |
button for extend elements | |
GNEFrame * | myFrameParent |
FOX need this. | |
FXLabel * | myLabel = nullptr |
label used in non collapsable MFXGroupBoxModule | |
FXButton * | myLoadButton = nullptr |
button for load elements | |
const int | myOptions |
GroupBoxModule options. | |
FXButton * | myResetWidthButton = nullptr |
button for reset frame width | |
FXButton * | mySaveButton = nullptr |
button for save elements | |
bool | mySelectingMultipleElements |
flag for enable/disable multiple element selection | |
int | myTagType |
tag type (person, container or vehicle) | |
Definition at line 35 of file GNEDemandSelector.h.
|
inherited |
GroupBoxModule options.
Enumerator | |
---|---|
NOTHING | |
COLLAPSIBLE | |
EXTENSIBLE | |
SAVE | |
LOAD |
Definition at line 38 of file MFXGroupBoxModule.h.
GNEDemandElementSelector::GNEDemandElementSelector | ( | GNEFrame * | frameParent, |
SumoXMLTag | demandElementTag, | ||
int | tagType | ||
) |
GNEDemandElementSelector::GNEDemandElementSelector | ( | 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, GUIDesignComboBoxVisibleItemsMedium, MID_GNE_SET_TYPE, myDemandElementsComboBox, myDemandElementTags, and refreshDemandElementSelector().
GNEDemandElementSelector::~GNEDemandElementSelector | ( | ) |
destructor
Definition at line 86 of file GNEDemandSelector.cpp.
const std::vector< SumoXMLTag > & GNEDemandElementSelector::getAllowedTags | ( | ) | const |
Definition at line 96 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 123 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(), GNEMoveFrame::DemandModeOptions::DemandModeOptions(), GNEDistributionFrame::DistributionSelector::DistributionSelector(), GNEDistributionFrame::DistributionValuesEditor::DistributionValuesEditor(), GNEAdditionalFrame::E2MultilaneLegendModule::E2MultilaneLegendModule(), GNECrossingFrame::EdgesSelector::EdgesSelector(), GNEFrameAttributeModules::GenericDataAttributes::GenericDataAttributes(), GNEInspectorFrame::GEOAttributesEditor::GEOAttributesEditor(), GNEDemandElementSelector(), GNEOptionsDialog::GNEOptionsDialog(), GNEPathCreator::GNEPathCreator(), GNEPathLegendModule::GNEPathLegendModule(), GNEPlanCreator::GNEPlanCreator(), GNEPlanCreatorLegend::GNEPlanCreatorLegend(), GNESelectorParent::GNESelectorParent(), GNEStopFrame::HelpCreation::HelpCreation(), GNEVehicleFrame::HelpCreation::HelpCreation(), GNEAdditionalFrame::HelpCreationModule::HelpCreationModule(), GNECrossingFrame::Information::Information(), GNEMoveFrame::Information::Information(), GNESelectorFrame::Information::Information(), GNEGenericDataFrame::IntervalSelector::IntervalSelector(), GNECreateEdgeFrame::LaneTypeSelector::LaneTypeSelector(), GNEConnectorFrame::Legend::Legend(), GNECreateEdgeFrame::Legend::Legend(), GNEProhibitionFrame::Legend::Legend(), GNETAZRelDataFrame::Legend::Legend(), GNEMeanDataFrame::MeanDataEditor::MeanDataEditor(), GNEMeanDataFrame::MeanDataSelector::MeanDataSelector(), GNESelectorFrame::ModificationMode::ModificationMode(), GNEMoveFrame::NetworkModeOptions::NetworkModeOptions(), GNEMatchAttribute::onCmdHelp(), GNEMatchGenericDataAttribute::onCmdHelp(), GNENeteditAttributes::onCmdHelp(), GNEOverlappedInspection::onCmdOverlappingHelp(), GNEFrameAttributeModules::ParametersEditor::ParametersEditor(), GNEFrameAttributeModules::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(), and GNESelectorFrame::VisualScaling::VisualScaling().
GNEDemandElement * GNEDemandElementSelector::getCurrentDemandElement | ( | ) | const |
get current demand element
Definition at line 90 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().
GNEDemandElement * GNEDemandElementSelector::getPreviousPlanElement | ( | ) | const |
get previous plan element
Definition at line 240 of file GNEDemandSelector.cpp.
References GNEHierarchicalElement::getChildDemandElements(), GNEAttributeCarrier::getTagProperty(), GNETagProperties::isContainer(), GNETagProperties::isPerson(), and myCurrentDemandElement.
Referenced by GNEContainerPlanFrame::tagSelected(), and GNEPersonPlanFrame::tagSelected().
void GNEDemandElementSelector::hideDemandElementSelector | ( | ) |
hide demand element selector
Definition at line 148 of file GNEDemandSelector.cpp.
Referenced by GNEContainerPlanFrame::show(), GNEPersonPlanFrame::show(), GNEStopFrame::show(), GNEContainerFrame::tagSelected(), GNEPersonFrame::tagSelected(), and GNEVehicleFrame::tagSelected().
bool GNEDemandElementSelector::isDemandElementSelectorShown | ( | ) | const |
check if demand element selector is shown
Definition at line 154 of file GNEDemandSelector.cpp.
|
protectedvirtualinherited |
load contents (can be reimplemented in children)
Definition at line 231 of file MFXGroupBoxModule.cpp.
Referenced by MFXGroupBoxModule::onCmdLoadButton().
|
inherited |
collapse GroupBoxModule
Definition at line 142 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 158 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 212 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::loadContents().
Referenced by FXDEFMAP().
|
inherited |
reset GroupBoxModule
Definition at line 184 of file MFXGroupBoxModule.cpp.
References GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().
Referenced by FXDEFMAP().
|
inherited |
save contents
Definition at line 206 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::saveContents().
Referenced by FXDEFMAP().
long GNEDemandElementSelector::onCmdSelectDemandElement | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 256 of file GNEDemandSelector.cpp.
References GNEFrame::demandElementSelected(), GNENet::getAttributeCarriers(), GNENetHelper::AttributeCarriers::getDemandElements(), GNEViewNet::getNet(), MFXComboBoxIcon::getText(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsComboBox, myDemandElementTags, myFrameParent, MFXComboBoxIcon::setTextColor(), TL, and WRITE_DEBUG.
Referenced by FXDEFMAP(), and showDemandElementSelector().
|
inherited |
draw MFXGroupBoxModule
Definition at line 129 of file MFXGroupBoxModule.cpp.
Referenced by FXDEFMAP().
|
inherited |
update reset GroupBoxModule
Definition at line 193 of file MFXGroupBoxModule.cpp.
References GNEViewParent::getFrameAreaWidth(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), and MFXGroupBoxModule::myFrameParent.
Referenced by FXDEFMAP().
void GNEDemandElementSelector::refreshDemandElementSelector | ( | ) |
refresh demand element selector
Definition at line 160 of file GNEDemandSelector.cpp.
References MFXComboBoxIcon::appendIconItem(), MFXComboBoxIcon::clearItems(), GNETagProperties::CONTAINER, DEFAULT_BIKETYPE_ID, DEFAULT_CONTAINERTYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_RAILTYPE_ID, DEFAULT_TAXITYPE_ID, DEFAULT_VTYPE_ID, DEFAULT_VTYPES, GNENet::getAttributeCarriers(), GUIIconSubSys::getIcon(), GNEAttributeCarrier::getID(), MFXComboBoxIcon::getItemText(), GNEViewNet::getNet(), MFXComboBoxIcon::getNumItems(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsComboBox, myDemandElementTags, myFrameParent, myTagType, GNETagProperties::PERSON, MFXComboBoxIcon::setCurrentItem(), SUMO_TAG_VTYPE, VTYPE_BIKE, VTYPE_CONTAINER, VTYPE_DEFAULT, VTYPE_PEDESTRIAN, VTYPE_RAIL, and VTYPE_TAXI.
Referenced by GNEDemandElementSelector(), 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 224 of file MFXGroupBoxModule.cpp.
Referenced by MFXGroupBoxModule::onCmdSaveButton().
void GNEDemandElementSelector::setDemandElement | ( | GNEDemandElement * | demandElement | ) |
set current demand element
Definition at line 102 of file GNEDemandSelector.cpp.
References GNEFrame::demandElementSelected(), GNEAttributeCarrier::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), myCurrentDemandElement, myDemandElementsComboBox, myDemandElementTags, myFrameParent, mySelectingMultipleElements, and MFXComboBoxIcon::setCurrentItem().
Referenced by GNEContainerPlanFrame::addContainerPlanElement(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEContainerPlanFrame::resetSelectedContainer(), and GNEPersonPlanFrame::resetSelectedPerson().
void GNEDemandElementSelector::setDemandElements | ( | const std::vector< GNEDemandElement * > & | demandElements | ) |
set multiple demand elements to filter
Definition at line 119 of file GNEDemandSelector.cpp.
References MFXComboBoxIcon::appendIconItem(), MFXComboBoxIcon::clearItems(), myCurrentDemandElement, myDemandElementsComboBox, and mySelectingMultipleElements.
Referenced by GNEContainerPlanFrame::addContainerPlanElement(), and GNEPersonPlanFrame::addPersonPlanElement().
|
inherited |
set text
Definition at line 117 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::myLabel.
Referenced by GNETagSelector::setCurrentTagType(), and GNESelectorFrame::SelectionInformation::updateInformationLabel().
void GNEDemandElementSelector::showDemandElementSelector | ( | ) |
show demand element selector
Definition at line 130 of file GNEDemandSelector.cpp.
References DEFAULT_VTYPE_ID, GNENet::getAttributeCarriers(), GNEAttributeCarrier::getID(), GNEViewNet::getNet(), GNEFrame::getViewNet(), myCurrentDemandElement, myDemandElementsComboBox, myDemandElementTags, myFrameParent, onCmdSelectDemandElement(), refreshDemandElementSelector(), GNENetHelper::AttributeCarriers::retrieveDemandElement(), MFXComboBoxIcon::setCurrentItem(), 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 238 of file MFXGroupBoxModule.cpp.
References MFXGroupBoxModule::mySaveButton.
|
privateinherited |
vertical collapsable frame
Definition at line 103 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::getCollapsableFrame(), MFXGroupBoxModule::MFXGroupBoxModule(), MFXGroupBoxModule::onCmdCollapseButton(), and MFXGroupBoxModule::onCmdExtendButton().
|
privateinherited |
button for collapse elements
Definition at line 109 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::onCmdCollapseButton().
|
privateinherited |
flag to check if this groupbox is collapsed
Definition at line 124 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::onCmdCollapseButton().
|
private |
current demand element
Definition at line 94 of file GNEDemandSelector.h.
Referenced by getCurrentDemandElement(), getPreviousPlanElement(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), setDemandElements(), and showDemandElementSelector().
|
private |
comboBox with the list of elements type
Definition at line 91 of file GNEDemandSelector.h.
Referenced by GNEDemandElementSelector(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), setDemandElements(), and showDemandElementSelector().
|
private |
demand element tags
Definition at line 97 of file GNEDemandSelector.h.
Referenced by getAllowedTags(), GNEDemandElementSelector(), onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), and showDemandElementSelector().
|
privateinherited |
button for extend elements
Definition at line 112 of file MFXGroupBoxModule.h.
|
private |
FOX need this.
pointer to frame Parent
Definition at line 88 of file GNEDemandSelector.h.
Referenced by onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), and showDemandElementSelector().
|
privateinherited |
label used in non collapsable MFXGroupBoxModule
Definition at line 106 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::setText().
|
privateinherited |
button for load elements
Definition at line 121 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule().
|
privateinherited |
GroupBoxModule options.
Definition at line 97 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule().
|
privateinherited |
button for reset frame width
Definition at line 115 of file MFXGroupBoxModule.h.
|
privateinherited |
button for save elements
Definition at line 118 of file MFXGroupBoxModule.h.
Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::toggleSaveButton().
|
private |
flag for enable/disable multiple element selection
Definition at line 103 of file GNEDemandSelector.h.
Referenced by setDemandElement(), and setDemandElements().
|
private |
tag type (person, container or vehicle)
Definition at line 100 of file GNEDemandSelector.h.
Referenced by refreshDemandElementSelector().