Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAttributesEditorRow Class Reference

#include <GNEAttributesEditorRow.h>

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

Public Member Functions

void disable ()
 disable
SumoXMLAttr fillSumoBaseObject (CommonXMLStructure::SumoBaseObject *baseObject, const bool insertDefaultValues) const
 fill sumo Base object
const GNEAttributePropertiesgetAttrProperty () const
 get attribute property
std::string getCurrentValue () const
 get current value in string format
 GNEAttributesEditorRow (GNEAttributesEditorType *attributeTable)
 FOX-declaration.
bool hideAttributeRow ()
 hide attribute row (always return false)
bool isAttributeRowShown () const
 check if current attribute row is shown
bool isValueValid () const
 check if current attribute row is valid
bool showAttributeRow (GNEAttributesEditorType *attributeTable, const GNEAttributeProperties *attrProperty, const bool forceDisable)
 return true if attribute row was successfully show
FOX-callbacks
long onCmdSetAttribute (FXObject *obj, FXSelector, void *)
 set new string/bool attribute
long onCmdToggleEnableAttribute (FXObject *, FXSelector, void *)
 called when user press the checkBox for toogle enable/disable attribute
long onCmdOpenColorDialog (FXObject *sender, FXSelector, void *arg)
 called when user press "edit color" dialog
long onCmdOpenVClassDialog (FXObject *, FXSelector, void *)
 called when user press "open allow" dialog
long onCmdOpenFileDialog (FXObject *, FXSelector, void *)
 called when user press "open file" dialog
long onCmdReparent (FXObject *, FXSelector, void *)
 called when user press reparent button
long onCmdInspectParent (FXObject *, FXSelector, void *)
 called when user press "inspect parent"
long onCmdMoveLaneUp (FXObject *, FXSelector, void *)
 called when user press "move lane up"
long onCmdMoveLaneDown (FXObject *, FXSelector, void *)
 called when user press "move lane down"

Protected Member Functions

void enableElements (const GNEAttributeProperties *attrProperty, const bool forceDisable)
 check if enable or disable all elements depending of current supermode or forceDisable
const std::string getAttributeValue (const bool enabled) const
 get value from edited ACs
 GNEAttributesEditorRow ()
 default constructor (needed for FOX)
void hideAllAttributeElements ()
 hide all attribute elements
bool isAttributeEnabled (const GNEAttributeProperties *attrProperty) const
 check if the given attribute is enabled
void showAttributeColor (const GNEAttributeProperties *attrProperty, const bool enabled)
 show attribute button color
void showAttributeFile (const GNEAttributeProperties *attrProperty, const bool enabled)
 show attribute button file
void showAttributeInspectParent (const GNEAttributeProperties *attrProperty, const bool enabled)
 show attribute button inspect parent
void showAttributeLabel (const GNEAttributeProperties *attrProperty)
 show attribute label
void showAttributeReparent (const bool enabled)
 show attribute button reparent
void showAttributeToggleEnable (const GNEAttributeProperties *attrProperty, const bool value)
 show attribute toogle enable
void showAttributeVClass (const GNEAttributeProperties *attrProperty, const bool enabled)
 show attribute button vClass
void showMoveLaneButtons (const std::string &laneID)
 show move lane buttons
void showValueCheckButton (const std::string &value, const bool enabled, const bool computed)
 show value for check button
void showValueComboBox (const GNEAttributeProperties *attrProperty, const std::string &value, const bool enabled, const bool computed)
 show value for combo Box
void showValueString (const std::string &value, const bool enabled, const bool computed)
 show value for strings

Private Member Functions

 GNEAttributesEditorRow (GNEAttributesEditorRow *)=delete
 Invalidated copy constructor.
GNEAttributesEditorRowoperator= (GNEAttributesEditorRow *)=delete
 Invalidated assignment operator.

Private Attributes

MFXButtonTooltipmyAttributeButton = nullptr
 pointer to button that can be used for files, color, parent, vclass or inspect
MFXLabelTooltipmyAttributeLabel = nullptr
 pointer to attribute label
GNEAttributesEditorTypemyAttributeTable
 pointer to attribute table parent
FXCheckButton * myAttributeToggleEnableCheckButton = nullptr
 pointer to attribute menu check
const GNEAttributePropertiesmyAttrProperty = nullptr
 edited attribute property
FXCheckButton * myValueCheckButton = nullptr
 pointer to menu check
MFXComboBoxIconmyValueComboBox = nullptr
 pointer to combo box for select choices
MFXButtonTooltipmyValueLaneDownButton = nullptr
 Button for move lane down.
MFXButtonTooltipmyValueLaneUpButton = nullptr
 Button for move lane up.
MFXTextFieldIconmyValueTextField = nullptr
 pointer to text field for modify values

Detailed Description

Definition at line 37 of file GNEAttributesEditorRow.h.

Constructor & Destructor Documentation

◆ GNEAttributesEditorRow() [1/3]

◆ GNEAttributesEditorRow() [2/3]

GNEAttributesEditorRow::GNEAttributesEditorRow ( )
protected

default constructor (needed for FOX)

Definition at line 565 of file GNEAttributesEditorRow.cpp.

References myAttributeTable.

◆ GNEAttributesEditorRow() [3/3]

GNEAttributesEditorRow::GNEAttributesEditorRow ( GNEAttributesEditorRow * )
privatedelete

Invalidated copy constructor.

References GNEAttributesEditorRow().

Member Function Documentation

◆ disable()

◆ enableElements()

void GNEAttributesEditorRow::enableElements ( const GNEAttributeProperties * attrProperty,
const bool forceDisable )
protected

check if enable or disable all elements depending of current supermode or forceDisable

Definition at line 943 of file GNEAttributesEditorRow.cpp.

References enableElements(), GNEAttributeProperties::getTagPropertyParent(), myAttributeButton, myAttributeTable, myAttributeToggleEnableCheckButton, myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, SUMO_TAG_TAZSINK, and SUMO_TAG_TAZSOURCE.

Referenced by enableElements(), and showAttributeRow().

Here is the caller graph for this function:

◆ fillSumoBaseObject()

◆ getAttributeValue()

const std::string GNEAttributesEditorRow::getAttributeValue ( const bool enabled) const
protected

get value from edited ACs

Definition at line 571 of file GNEAttributesEditorRow.cpp.

References GNEAttributesEditorType::CREATOR, myAttributeTable, myAttrProperty, SUMO_ATTR_ID, SUMO_TAG_DATASET, SUMO_TAG_EDGE, and SUMO_TAG_TYPE.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ getAttrProperty()

const GNEAttributeProperties * GNEAttributesEditorRow::getAttrProperty ( ) const

get attribute property

Definition at line 229 of file GNEAttributesEditorRow.cpp.

References myAttrProperty.

◆ getCurrentValue()

std::string GNEAttributesEditorRow::getCurrentValue ( ) const

get current value in string format

Definition at line 235 of file GNEAttributesEditorRow.cpp.

References myValueCheckButton, myValueComboBox, and myValueTextField.

Referenced by fillSumoBaseObject().

Here is the caller graph for this function:

◆ hideAllAttributeElements()

void GNEAttributesEditorRow::hideAllAttributeElements ( )
protected

hide all attribute elements

Definition at line 744 of file GNEAttributesEditorRow.cpp.

References myAttributeButton, myAttributeLabel, and myAttributeToggleEnableCheckButton.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ hideAttributeRow()

bool GNEAttributesEditorRow::hideAttributeRow ( )

hide attribute row (always return false)

Definition at line 209 of file GNEAttributesEditorRow.cpp.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ isAttributeEnabled()

bool GNEAttributesEditorRow::isAttributeEnabled ( const GNEAttributeProperties * attrProperty) const
protected

check if the given attribute is enabled

Definition at line 974 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttr(), GNEAttributeProperties::isAlwaysEnabled(), and myAttributeTable.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ isAttributeRowShown()

bool GNEAttributesEditorRow::isAttributeRowShown ( ) const

check if current attribute row is shown

Definition at line 265 of file GNEAttributesEditorRow.cpp.

◆ isValueValid()

bool GNEAttributesEditorRow::isValueValid ( ) const

check if current attribute row is valid

Definition at line 249 of file GNEAttributesEditorRow.cpp.

References GUIDesignBackgroundColorRed, GUIDesignTextColorRed, myValueCheckButton, myValueComboBox, and myValueTextField.

Referenced by fillSumoBaseObject().

Here is the caller graph for this function:

◆ onCmdInspectParent()

long GNEAttributesEditorRow::onCmdInspectParent ( FXObject * ,
FXSelector ,
void *  )

called when user press "inspect parent"

Definition at line 458 of file GNEAttributesEditorRow.cpp.

References myAttributeTable.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdMoveLaneDown()

long GNEAttributesEditorRow::onCmdMoveLaneDown ( FXObject * ,
FXSelector ,
void *  )

called when user press "move lane down"

Definition at line 472 of file GNEAttributesEditorRow.cpp.

References myAttributeTable.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdMoveLaneUp()

long GNEAttributesEditorRow::onCmdMoveLaneUp ( FXObject * ,
FXSelector ,
void *  )

called when user press "move lane up"

Definition at line 465 of file GNEAttributesEditorRow.cpp.

References myAttributeTable.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdOpenColorDialog()

long GNEAttributesEditorRow::onCmdOpenColorDialog ( FXObject * sender,
FXSelector ,
void * arg )

called when user press "edit color" dialog

Definition at line 403 of file GNEAttributesEditorRow.cpp.

References GNEDialog::ACCEPT, RGBColor::BLACK, GNEAttributeCarrier::canParse(), myAttributeTable, myAttrProperty, myValueTextField, GNEAttributeCarrier::parse(), and toString().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdOpenFileDialog()

long GNEAttributesEditorRow::onCmdOpenFileDialog ( FXObject * ,
FXSelector ,
void *  )

called when user press "open file" dialog

Definition at line 435 of file GNEAttributesEditorRow.cpp.

References GNEDialog::ACCEPT, GNEFileDialog::LOAD_SINGLE, myAttributeTable, myAttrProperty, myValueTextField, GNEFileDialog::NETEDIT, and GNEFileDialog::SAVE.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdOpenVClassDialog()

long GNEAttributesEditorRow::onCmdOpenVClassDialog ( FXObject * ,
FXSelector ,
void *  )

called when user press "open allow" dialog

Definition at line 422 of file GNEAttributesEditorRow.cpp.

References GNEDialog::ACCEPT, myAttributeTable, myAttrProperty, and myValueTextField.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdReparent()

long GNEAttributesEditorRow::onCmdReparent ( FXObject * ,
FXSelector ,
void *  )

called when user press reparent button

Definition at line 451 of file GNEAttributesEditorRow.cpp.

References myAttributeTable.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSetAttribute()

long GNEAttributesEditorRow::onCmdSetAttribute ( FXObject * obj,
FXSelector ,
void *  )

set new string/bool attribute

Definition at line 479 of file GNEAttributesEditorRow.cpp.

References GNEAttributeCarrier::canParse(), GUIDesignBackgroundColorRed, GUIDesignBackgroundColorWhite, GUIDesignTextColorBlack, GUIDesignTextColorRed, myAttributeTable, myAttrProperty, myValueCheckButton, myValueComboBox, myValueTextField, GNEAttributeCarrier::parse(), StringUtils::replace(), SUMO_ATTR_ANGLE, SUMO_ATTR_ID, SUMO_ATTR_POSITION, SUMO_ATTR_SHAPE, and toString().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdToggleEnableAttribute()

long GNEAttributesEditorRow::onCmdToggleEnableAttribute ( FXObject * ,
FXSelector ,
void *  )

called when user press the checkBox for toogle enable/disable attribute

Definition at line 559 of file GNEAttributesEditorRow.cpp.

References myAttributeTable, myAttributeToggleEnableCheckButton, and myAttrProperty.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

GNEAttributesEditorRow & GNEAttributesEditorRow::operator= ( GNEAttributesEditorRow * )
privatedelete

Invalidated assignment operator.

References GNEAttributesEditorRow().

◆ showAttributeColor()

void GNEAttributesEditorRow::showAttributeColor ( const GNEAttributeProperties * attrProperty,
const bool enabled )
protected

show attribute button color

Definition at line 689 of file GNEAttributesEditorRow.cpp.

References COLORWHEEL, GNEAttributeProperties::getAttrStr(), GUIIconSubSys::getIcon(), MID_GNE_ATTRIBUTESEDITORROW_OPENDIALOG_COLOR, myAttributeButton, myAttributeLabel, myAttributeToggleEnableCheckButton, and TL.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeFile()

void GNEAttributesEditorRow::showAttributeFile ( const GNEAttributeProperties * attrProperty,
const bool enabled )
protected

show attribute button file

Definition at line 709 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttrStr(), GUIIconSubSys::getIcon(), GNEAttributeProperties::isFileOpen(), MID_GNE_ATTRIBUTESEDITORROW_OPENDIALOG_FILE, myAttributeButton, myAttributeLabel, myAttributeToggleEnableCheckButton, OPEN, and TL.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeInspectParent()

void GNEAttributesEditorRow::showAttributeInspectParent ( const GNEAttributeProperties * attrProperty,
const bool enabled )
protected

show attribute button inspect parent

Definition at line 649 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttrStr(), GNETagProperties::getGUIIcon(), GUIIconSubSys::getIcon(), GNEAttributeProperties::getTagPropertyParent(), MID_GNE_ATTRIBUTESEDITORROW_INSPECTPARENT, myAttributeButton, myAttributeLabel, myAttributeToggleEnableCheckButton, and TLF.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeLabel()

void GNEAttributesEditorRow::showAttributeLabel ( const GNEAttributeProperties * attrProperty)
protected

show attribute label

Definition at line 733 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttrStr(), GNEAttributeProperties::getDefinition(), myAttributeButton, myAttributeLabel, and myAttributeToggleEnableCheckButton.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeReparent()

void GNEAttributesEditorRow::showAttributeReparent ( const bool enabled)
protected

show attribute button reparent

Definition at line 629 of file GNEAttributesEditorRow.cpp.

References MID_GNE_ATTRIBUTESEDITORROW_REPARENT, myAttributeButton, myAttributeLabel, myAttributeToggleEnableCheckButton, and TL.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeRow()

◆ showAttributeToggleEnable()

void GNEAttributesEditorRow::showAttributeToggleEnable ( const GNEAttributeProperties * attrProperty,
const bool value )
protected

show attribute toogle enable

Definition at line 617 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttrStr(), invalid_return< std::string >::value, myAttributeButton, myAttributeLabel, and myAttributeToggleEnableCheckButton.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showAttributeVClass()

void GNEAttributesEditorRow::showAttributeVClass ( const GNEAttributeProperties * attrProperty,
const bool enabled )
protected

show attribute button vClass

Definition at line 669 of file GNEAttributesEditorRow.cpp.

References GNEAttributeProperties::getAttrStr(), MID_GNE_ATTRIBUTESEDITORROW_OPENDIALOG_ALLOW, myAttributeButton, myAttributeLabel, myAttributeToggleEnableCheckButton, and TL.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showMoveLaneButtons()

void GNEAttributesEditorRow::showMoveLaneButtons ( const std::string & laneID)
protected

show move lane buttons

Definition at line 917 of file GNEAttributesEditorRow.cpp.

References myAttributeTable, myValueLaneDownButton, and myValueLaneUpButton.

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showValueCheckButton()

void GNEAttributesEditorRow::showValueCheckButton ( const std::string & value,
const bool enabled,
const bool computed )
protected

show value for check button

Definition at line 752 of file GNEAttributesEditorRow.cpp.

References GNEAttributeCarrier::canParse(), invalid_return< std::string >::value, myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, GNEAttributeCarrier::parse(), and showValueString().

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showValueComboBox()

◆ showValueString()

void GNEAttributesEditorRow::showValueString ( const std::string & value,
const bool enabled,
const bool computed )
protected

show value for strings

Definition at line 895 of file GNEAttributesEditorRow.cpp.

References GUIDesignTextColorBlack, GUIDesignTextColorBlue, invalid_return< std::string >::value, myValueCheckButton, myValueComboBox, and myValueTextField.

Referenced by showAttributeRow(), showValueCheckButton(), and showValueComboBox().

Here is the caller graph for this function:

Field Documentation

◆ myAttributeButton

MFXButtonTooltip* GNEAttributesEditorRow::myAttributeButton = nullptr
private

◆ myAttributeLabel

◆ myAttributeTable

◆ myAttributeToggleEnableCheckButton

◆ myAttrProperty

const GNEAttributeProperties* GNEAttributesEditorRow::myAttrProperty = nullptr
private

◆ myValueCheckButton

FXCheckButton* GNEAttributesEditorRow::myValueCheckButton = nullptr
private

◆ myValueComboBox

MFXComboBoxIcon* GNEAttributesEditorRow::myValueComboBox = nullptr
private

◆ myValueLaneDownButton

MFXButtonTooltip* GNEAttributesEditorRow::myValueLaneDownButton = nullptr
private

◆ myValueLaneUpButton

MFXButtonTooltip* GNEAttributesEditorRow::myValueLaneUpButton = nullptr
private

◆ myValueTextField


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