Eclipse SUMO - Simulation of Urban MObility
DemandElementSelector Class Reference

#include <GNEDemandSelector.h>

Inheritance diagram for DemandElementSelector:
[legend]
Collaboration diagram for DemandElementSelector:
[legend]

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...
 
GNEEdgegetContainerPlanPreviousEdge () const
 get previous edge for the current container plan More...
 
GNEDemandElementgetCurrentDemandElement () const
 get current demand element More...
 
GNEEdgegetPersonPlanPreviousEdge () 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...
 
GNEDemandElementmyCurrentDemandElement
 current demand element More...
 
MFXIconComboBoxmyDemandElementsMatchBox
 comboBox with the list of elements type More...
 
std::vector< SumoXMLTagmyDemandElementTags
 demand element tags More...
 
FXButton * myExtendButton = nullptr
 button for extend elements More...
 
GNEFramemyFrameParent
 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...
 

Detailed Description

Definition at line 35 of file GNEDemandSelector.h.

Member Enumeration Documentation

◆ Options

GroupBoxModule options.

Enumerator
NOTHING 
COLLAPSIBLE 
EXTENSIBLE 
SAVE 
LOAD 

Definition at line 37 of file MFXGroupBoxModule.h.

Constructor & Destructor Documentation

◆ DemandElementSelector() [1/2]

DemandElementSelector::DemandElementSelector ( GNEFrame frameParent,
SumoXMLTag  demandElementTag,
GNEDemandElement defaultElement = nullptr 
)

FOX-declaration.

constructor with a single tag

Definition at line 47 of file GNEDemandSelector.cpp.

◆ DemandElementSelector() [2/2]

◆ ~DemandElementSelector()

DemandElementSelector::~DemandElementSelector ( )

destructor

Definition at line 87 of file GNEDemandSelector.cpp.

Member Function Documentation

◆ getAllowedTags()

const std::vector< SumoXMLTag > & DemandElementSelector::getAllowedTags ( ) const

Definition at line 97 of file GNEDemandSelector.cpp.

References myDemandElementTags.

Referenced by GNEStopFrame::show().

Here is the caller graph for this function:

◆ getCollapsableFrame()

FXVerticalFrame * MFXGroupBoxModule::getCollapsableFrame ( )
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().

◆ getContainerPlanPreviousEdge()

GNEEdge * DemandElementSelector::getContainerPlanPreviousEdge ( ) const

◆ getCurrentDemandElement()

◆ getPersonPlanPreviousEdge()

◆ hideDemandElementSelector()

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().

Here is the caller graph for this function:

◆ isDemandElementSelectorShown()

bool DemandElementSelector::isDemandElementSelectorShown ( ) const

check if demand element selector is shown

Definition at line 165 of file GNEDemandSelector.cpp.

◆ loadContents()

bool MFXGroupBoxModule::loadContents ( ) const
protectedvirtualinherited

load contents (can be reimplemented in children)

Definition at line 226 of file MFXGroupBoxModule.cpp.

Referenced by MFXGroupBoxModule::onCmdLoadButton().

Here is the caller graph for this function:

◆ onCmdCollapseButton()

long MFXGroupBoxModule::onCmdCollapseButton ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdExtendButton()

long MFXGroupBoxModule::onCmdExtendButton ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdLoadButton()

long MFXGroupBoxModule::onCmdLoadButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

load contents

Definition at line 207 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::loadContents().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdResetButton()

long MFXGroupBoxModule::onCmdResetButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

reset GroupBoxModule

Definition at line 179 of file MFXGroupBoxModule.cpp.

References GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSaveButton()

long MFXGroupBoxModule::onCmdSaveButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

save contents

Definition at line 201 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::saveContents().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSelectDemandElement()

long DemandElementSelector::onCmdSelectDemandElement ( FXObject *  ,
FXSelector  ,
void *   
)

◆ onPaint()

long MFXGroupBoxModule::onPaint ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

draw MFXGroupBoxModule

Definition at line 124 of file MFXGroupBoxModule.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdResetButton()

long MFXGroupBoxModule::onUpdResetButton ( FXObject *  sender,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ refreshDemandElementSelector()

◆ saveContents()

bool MFXGroupBoxModule::saveContents ( ) const
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().

Here is the caller graph for this function:

◆ setDemandElement()

◆ setDemandElements()

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().

Here is the caller graph for this function:

◆ setText()

void MFXGroupBoxModule::setText ( const std::string &  text)
inherited

set text

Definition at line 112 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::myLabel.

Referenced by GNETagSelector::setCurrentTagType(), and GNESelectorFrame::SelectionInformation::updateInformationLabel().

Here is the caller graph for this function:

◆ showDemandElementSelector()

◆ toggleSaveButton()

void MFXGroupBoxModule::toggleSaveButton ( const bool  value)
protectedinherited

enable or disable save buttons

Definition at line 233 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::mySaveButton.

Field Documentation

◆ myCollapsableFrame

FXVerticalFrame* MFXGroupBoxModule::myCollapsableFrame = nullptr
privateinherited

◆ myCollapseButton

FXButton* MFXGroupBoxModule::myCollapseButton = nullptr
privateinherited

button for collapse elements

Definition at line 108 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::onCmdCollapseButton().

◆ myCollapsed

bool MFXGroupBoxModule::myCollapsed
privateinherited

flag to check if this groupbox is collapsed

Definition at line 123 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::onCmdCollapseButton().

◆ myCurrentDemandElement

◆ myDemandElementsMatchBox

MFXIconComboBox* DemandElementSelector::myDemandElementsMatchBox
private

◆ myDemandElementTags

std::vector<SumoXMLTag> DemandElementSelector::myDemandElementTags
private

◆ myExtendButton

FXButton* MFXGroupBoxModule::myExtendButton = nullptr
privateinherited

button for extend elements

Definition at line 111 of file MFXGroupBoxModule.h.

◆ myFrameParent

GNEFrame* DemandElementSelector::myFrameParent
private

FOX need this.

pointer to frame Parent

Definition at line 91 of file GNEDemandSelector.h.

Referenced by onCmdSelectDemandElement(), refreshDemandElementSelector(), setDemandElement(), and showDemandElementSelector().

◆ myInfoLabel

FXLabel* DemandElementSelector::myInfoLabel
private

◆ myLabel

FXLabel* MFXGroupBoxModule::myLabel = nullptr
privateinherited

label used in non collapsable MFXGroupBoxModule

Definition at line 105 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::setText().

◆ myLoadButton

FXButton* MFXGroupBoxModule::myLoadButton = nullptr
privateinherited

button for load elements

Definition at line 120 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule().

◆ myOptions

const int MFXGroupBoxModule::myOptions
privateinherited

GroupBoxModule options.

Definition at line 96 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule().

◆ myResetWidthButton

FXButton* MFXGroupBoxModule::myResetWidthButton = nullptr
privateinherited

button for reset frame width

Definition at line 114 of file MFXGroupBoxModule.h.

◆ mySaveButton

FXButton* MFXGroupBoxModule::mySaveButton = nullptr
privateinherited

button for save elements

Definition at line 117 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::toggleSaveButton().

◆ mySelectingMultipleElements

bool DemandElementSelector::mySelectingMultipleElements
private

flag for enable/disable multiple element selection

Definition at line 106 of file GNEDemandSelector.h.

Referenced by setDemandElement(), and setDemandElements().


The documentation for this class was generated from the following files: