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.

◆ GNEAttributesEditorRow() [3/3]

GNEAttributesEditorRow::GNEAttributesEditorRow ( GNEAttributesEditorRow )
privatedelete

Invalidated copy constructor.

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 MFXComboBoxIcon::disable(), MFXTextFieldIcon::disable(), enableElements(), GNEViewNet::getEditModes(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), myAttributeButton, myAttributeTable, myAttributeToggleEnableCheckButton, GNEAttributesEditorType::myFrameParent, 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()

SumoXMLAttr GNEAttributesEditorRow::fillSumoBaseObject ( CommonXMLStructure::SumoBaseObject baseObject,
const bool  insertDefaultValues 
) const

fill sumo Base object

Definition at line 271 of file GNEAttributesEditorRow.cpp.

References CommonXMLStructure::SumoBaseObject::addBoolAttribute(), CommonXMLStructure::SumoBaseObject::addColorAttribute(), CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addDoubleListAttribute(), CommonXMLStructure::SumoBaseObject::addIntAttribute(), CommonXMLStructure::SumoBaseObject::addParameters(), CommonXMLStructure::SumoBaseObject::addPositionAttribute(), CommonXMLStructure::SumoBaseObject::addPositionVectorAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), GNEAttributeCarrier::canParse(), GNEAttributeProperties::getAttr(), getCurrentValue(), GNEAttributeProperties::getDefaultColorValue(), GNEAttributeProperties::getDefaultDoubleValue(), GNEAttributeProperties::getDefaultIntValue(), GNEAttributeProperties::getDefaultPositionValue(), GNEAttributeProperties::getDefaultStringValue(), GNEAttributeProperties::getDefaultTimeValue(), MFXComboBoxIcon::getText(), MFXTextFieldIcon::getText(), MFXComboBoxIcon::getTextColor(), MFXTextFieldIcon::getTextColor(), GNE_ATTR_PARAMETERS, GUIDesignBackgroundColorRed, GUIDesignTextColorRed, GNEAttributeProperties::hasDefaultValue(), GNEAttributeProperties::isActivatable(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isColor(), GNEAttributeProperties::isDiscrete(), GNEAttributeProperties::isFloat(), GNEAttributeProperties::isInt(), GNEAttributeProperties::isList(), GNEAttributeProperties::isPosition(), GNEAttributeProperties::isPositive(), GNEAttributeProperties::isProbability(), GNEAttributeProperties::isSUMOTime(), isValueValid(), myAttributeToggleEnableCheckButton, myAttrProperty, myValueCheckButton, myValueComboBox, myValueTextField, GNEAttributeCarrier::parse(), and SUMO_ATTR_NOTHING.

◆ getAttributeValue()

◆ 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 MFXComboBoxIcon::getText(), MFXTextFieldIcon::getText(), 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(), myAttributeTable, and GNEAttributesEditorType::myEditedACs.

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 MFXComboBoxIcon::getTextColor(), MFXTextFieldIcon::getTextColor(), 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 GNEAttributesEditorType::inspectParent(), and 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 GNEAttributesEditorType::moveLaneDown(), and 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 GNEAttributesEditorType::moveLaneUp(), and 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, GNEAttributeProperties::getDefaultColorValue(), GNEAttributesEditorType::getFrameParent(), GNEViewParent::getGNEAppWindows(), MFXTextFieldIcon::getText(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), GNEAttributeProperties::hasDefaultValue(), myAttributeTable, myAttrProperty, myValueTextField, MFXTextFieldIcon::setText(), and toString().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdOpenFileDialog()

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

◆ 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, GNEAttributeProperties::getAttr(), GNEAttributesEditorType::getFrameParent(), GNEViewParent::getGNEAppWindows(), MFXTextFieldIcon::getText(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), myAttributeTable, myAttrProperty, myValueTextField, and MFXTextFieldIcon::setText().

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 GNEAttributesEditorType::enableReparent(), and myAttributeTable.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSetAttribute()

◆ 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 GNEAttributeProperties::getAttr(), myAttributeTable, myAttributeToggleEnableCheckButton, myAttrProperty, and GNEAttributesEditorType::toggleEnableAttribute().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

GNEAttributesEditorRow & GNEAttributesEditorRow::operator= ( GNEAttributesEditorRow )
privatedelete

Invalidated assignment operator.

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

bool GNEAttributesEditorRow::showAttributeRow ( GNEAttributesEditorType attributeTable,
const GNEAttributeProperties attrProperty,
const bool  forceDisable 
)

◆ 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(), 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 GNENet::getAttributeCarriers(), GNEViewNet::getNet(), GNEFrame::getViewNet(), myAttributeTable, GNEAttributesEditorType::myFrameParent, myValueLaneDownButton, myValueLaneUpButton, and GNENetHelper::AttributeCarriers::retrieveLane().

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(), myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, and showValueString().

Referenced by showAttributeRow().

Here is the caller graph for this function:

◆ showValueComboBox()

void GNEAttributesEditorRow::showValueComboBox ( const GNEAttributeProperties attrProperty,
const std::string &  value,
const bool  enabled,
const bool  computed 
)
protected

◆ 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 MFXTextFieldIcon::disable(), MFXTextFieldIcon::enable(), GUIDesignTextColorBlack, GUIDesignTextColorBlue, myValueCheckButton, myValueComboBox, myValueTextField, MFXTextFieldIcon::setText(), and MFXTextFieldIcon::setTextColor().

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

Here is the caller graph for this function:

Field Documentation

◆ myAttributeButton

MFXButtonTooltip* GNEAttributesEditorRow::myAttributeButton = nullptr
private

◆ myAttributeLabel

MFXLabelTooltip* GNEAttributesEditorRow::myAttributeLabel = nullptr
private

◆ myAttributeTable

◆ myAttributeToggleEnableCheckButton

FXCheckButton* GNEAttributesEditorRow::myAttributeToggleEnableCheckButton = nullptr
private

◆ 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

Button for move lane down.

Definition at line 179 of file GNEAttributesEditorRow.h.

Referenced by disable(), enableElements(), showAttributeRow(), showMoveLaneButtons(), showValueCheckButton(), and showValueComboBox().

◆ myValueLaneUpButton

MFXButtonTooltip* GNEAttributesEditorRow::myValueLaneUpButton = nullptr
private

◆ myValueTextField


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