Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEAttributesEditorRow.h>
Public Member Functions | |
GNEAttributesEditorRow (GNEAttributesEditor *attributeTable) | |
FOX-declaration. | |
bool | hideAttributeRow () |
hide attribute row (always return false) | |
bool | isAttributeRowShown () const |
check if current attribute row is shown | |
bool | showAttributeRow (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 *, FXSelector, void *) |
called when user press "edit color" dialog | |
long | onCmdOpenAllowDialog (FXObject *, FXSelector, void *) |
called when user press "open allow" 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 | showAttributeColor (const GNEAttributeProperties &attrProperty, const bool enabled) |
show attribute color | |
void | showAttributeInspectParent (const GNEAttributeProperties &attrProperty, const bool enabled) |
show attribute parent | |
void | showAttributeLabel (const GNEAttributeProperties &attrProperty) |
show attribute label | |
void | showAttributeReparent (const bool enabled) |
show attribute reparent | |
void | showAttributeToggleEnable (const GNEAttributeProperties &attrProperty, const bool value) |
show attribute toogle enable | |
void | showAttributeVClass (const GNEAttributeProperties &attrProperty, const bool enabled) |
show attribute 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. | |
GNEAttributesEditorRow & | operator= (GNEAttributesEditorRow *)=delete |
Invalidated assignment operator. | |
Private Attributes | |
SumoXMLAttr | myAttribute = SUMO_ATTR_NOTHING |
edited attribute | |
MFXButtonTooltip * | myAttributeColorButton = nullptr |
pointer to attribute color button | |
MFXButtonTooltip * | myAttributeInspectParentButton = nullptr |
pointer to attribute inspect parent button | |
MFXLabelTooltip * | myAttributeLabel = nullptr |
pointer to attribute label | |
MFXButtonTooltip * | myAttributeReparentButton = nullptr |
pointer to attribute reparent button | |
GNEAttributesEditor * | myAttributeTable |
check junction merging bool mergeJunction(SumoXMLAttr attr, const std::string& newVal) const; | |
FXCheckButton * | myAttributeToggleEnableCheckButton = nullptr |
pointer to attribute menu check | |
MFXButtonTooltip * | myAttributeVClassButton = nullptr |
pointer to attribute vClass button | |
FXCheckButton * | myValueCheckButton = nullptr |
pointer to menu check | |
MFXComboBoxIcon * | myValueComboBox = nullptr |
pointer to combo box for select choices | |
MFXButtonTooltip * | myValueLaneDownButton = nullptr |
Button for move lane down. | |
MFXButtonTooltip * | myValueLaneUpButton = nullptr |
Button for move lane up. | |
MFXTextFieldTooltip * | myValueTextField = nullptr |
pointer to text field for modify values | |
Definition at line 38 of file GNEAttributesEditorRow.h.
GNEAttributesEditorRow::GNEAttributesEditorRow | ( | GNEAttributesEditor * | attributeTable | ) |
FOX-declaration.
constructor
Definition at line 65 of file GNEAttributesEditorRow.cpp.
References ARROW_DOWN, ARROW_UP, COLORWHEEL, GNEAttributesEditor::getFrameParent(), GNEViewParent::getGNEAppWindows(), GUIIconSubSys::getIcon(), GUIMainWindow::getStaticTooltipMenu(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), GUIDesignButtonAttribute, GUIDesignButtonIcon, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignComboBoxAttribute, GUIDesignComboBoxNCol, GUIDesignComboBoxVisibleItems, GUIDesignLabelThickedFixed, GUIDesignTextField, GUIDesignTextFieldNCol, MID_GNE_ATTRIBUTESEDITORROW_INSPECTPARENT, MID_GNE_ATTRIBUTESEDITORROW_MOVELANEDOWN, MID_GNE_ATTRIBUTESEDITORROW_MOVELANEUP, MID_GNE_ATTRIBUTESEDITORROW_OPENALLOWDIALLOG, MID_GNE_ATTRIBUTESEDITORROW_OPENCOLORDIALOG, MID_GNE_ATTRIBUTESEDITORROW_REPARENT, MID_GNE_ATTRIBUTESEDITORROW_SETATTRIBUTE, MID_GNE_ATTRIBUTESEDITORROW_TOGGLEENABLEATTRIBUTE, myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, myAttributeVClassButton, myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, and TL.
|
protected |
default constructor (needed for FOX)
Definition at line 397 of file GNEAttributesEditorRow.cpp.
|
privatedelete |
Invalidated copy constructor.
|
protected |
check if enable or disable all elements depending of current supermode or forceDisable
Definition at line 729 of file GNEAttributesEditorRow.cpp.
References MFXComboBoxIcon::disable(), enableElements(), GNEViewNet::getEditModes(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeReparentButton, myAttributeTable, myAttributeToggleEnableCheckButton, myAttributeVClassButton, GNEAttributesEditor::myFrameParent, myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, and myValueTextField.
Referenced by enableElements(), and showAttributeRow().
|
protected |
get value from edited ACs
Definition at line 403 of file GNEAttributesEditorRow.cpp.
References myAttribute, myAttributeTable, and GNEAttributesEditor::myEditedACs.
Referenced by showAttributeRow().
bool GNEAttributesEditorRow::hideAttributeRow | ( | ) |
hide attribute row (always return false)
Definition at line 223 of file GNEAttributesEditorRow.cpp.
Referenced by showAttributeRow().
bool GNEAttributesEditorRow::isAttributeRowShown | ( | ) | const |
check if current attribute row is shown
Definition at line 230 of file GNEAttributesEditorRow.cpp.
long GNEAttributesEditorRow::onCmdInspectParent | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press "inspect parent"
Definition at line 282 of file GNEAttributesEditorRow.cpp.
References GNEAttributesEditor::inspectParent(), and myAttributeTable.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdMoveLaneDown | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press "move lane down"
Definition at line 296 of file GNEAttributesEditorRow.cpp.
References GNEAttributesEditor::moveLaneDown(), and myAttributeTable.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdMoveLaneUp | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press "move lane up"
Definition at line 289 of file GNEAttributesEditorRow.cpp.
References GNEAttributesEditor::moveLaneUp(), and myAttributeTable.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdOpenAllowDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press "open allow" dialog
Definition at line 259 of file GNEAttributesEditorRow.cpp.
References GNEAttributesEditor::getFrameParent(), GNEFrame::getViewNet(), myAttribute, myAttributeTable, and myValueTextField.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdOpenColorDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press "edit color" dialog
Definition at line 236 of file GNEAttributesEditorRow.cpp.
References RGBColor::BLACK, COLORWHEEL, MFXUtils::getFXColor(), GUIIconSubSys::getIcon(), MFXUtils::getRGBColor(), myAttribute, myAttributeTable, GNEAttributesEditor::myEditedACs, myValueTextField, TL, and toString().
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdReparent | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press reparent button
Definition at line 275 of file GNEAttributesEditorRow.cpp.
References GNEAttributesEditor::enableReparent(), and myAttributeTable.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
set new string/bool attribute
Definition at line 303 of file GNEAttributesEditorRow.cpp.
References MFXComboBoxIcon::getText(), myAttribute, myAttributeTable, GNEAttributesEditor::myEditedACs, myValueCheckButton, myValueComboBox, myValueTextField, StringUtils::replace(), GNEAttributesEditor::setAttribute(), MFXComboBoxIcon::setBackColor(), MFXComboBoxIcon::setTextColor(), SUMO_ATTR_ANGLE, SUMO_ATTR_POSITION, SUMO_ATTR_SHAPE, TEXTCOLOR_BACKGROUND_RED, TEXTCOLOR_BACKGROUND_WHITE, TEXTCOLOR_BLACK, TEXTCOLOR_RED, TLF, toString(), and WRITE_DEBUG.
Referenced by FXDEFMAP().
long GNEAttributesEditorRow::onCmdToggleEnableAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the checkBox for toogle enable/disable attribute
Definition at line 391 of file GNEAttributesEditorRow.cpp.
References myAttribute, myAttributeTable, myAttributeToggleEnableCheckButton, and GNEAttributesEditor::toggleEnableAttribute().
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
|
protected |
show attribute color
Definition at line 502 of file GNEAttributesEditorRow.cpp.
References GNEAttributeProperties::getAttrStr(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
|
protected |
show attribute parent
Definition at line 462 of file GNEAttributesEditorRow.cpp.
References GNEAttributeProperties::getAttrStr(), GNETagProperties::getGUIIcon(), GUIIconSubSys::getIcon(), GNEAttributeProperties::getTagPropertyParent(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
|
protected |
show attribute label
Definition at line 521 of file GNEAttributesEditorRow.cpp.
References GNEAttributeProperties::getAttrStr(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
|
protected |
show attribute reparent
Definition at line 445 of file GNEAttributesEditorRow.cpp.
References myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
bool GNEAttributesEditorRow::showAttributeRow | ( | const GNEAttributeProperties & | attrProperty, |
const bool | forceDisable | ||
) |
return true if attribute row was successfully show
Definition at line 129 of file GNEAttributesEditorRow.cpp.
References enableElements(), GNEAttributeProperties::getAttr(), GNENet::getAttributeCarriers(), getAttributeValue(), GNEViewNet::getNet(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), GNE_ATTR_FRONTELEMENT, GNE_ATTR_PARENT, GNE_ATTR_SELECTED, GNE_ATTR_STOPOEXCEPTION, GNE_ATTR_STOPOFFSET, hideAttributeRow(), GNEAttributeProperties::isActivatable(), GNEAttributeProperties::isAlwaysEnabled(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), GNEAttributeProperties::isFlow(), GNEAttributeProperties::isUnique(), GNEAttributeProperties::isVClass(), GNEAttributeProperties::isVType(), myAttribute, myAttributeTable, GNEAttributesEditor::myEditedACs, GNEAttributesEditor::myFrameParent, myValueLaneDownButton, myValueLaneUpButton, showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), showAttributeVClass(), showMoveLaneButtons(), showValueCheckButton(), showValueComboBox(), showValueString(), SUMO_ATTR_COLOR, SUMO_ATTR_DISALLOW, SUMO_ATTR_EXPECTED, SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_JOIN, SUMO_ATTR_LANE, SUMO_ATTR_TYPE, SUMO_TAG_VTYPE, and SUMO_TAG_VTYPE_DISTRIBUTION.
|
protected |
show attribute toogle enable
Definition at line 430 of file GNEAttributesEditorRow.cpp.
References GNEAttributeProperties::getAttrStr(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
|
protected |
show attribute vClass
Definition at line 482 of file GNEAttributesEditorRow.cpp.
References GNEAttributeProperties::getAttrStr(), myAttributeColorButton, myAttributeInspectParentButton, myAttributeLabel, myAttributeReparentButton, myAttributeToggleEnableCheckButton, and myAttributeVClassButton.
Referenced by showAttributeRow().
|
protected |
show move lane buttons
Definition at line 703 of file GNEAttributesEditorRow.cpp.
References GNENet::getAttributeCarriers(), GNEViewNet::getNet(), GNEFrame::getViewNet(), myAttributeTable, GNEAttributesEditor::myFrameParent, myValueLaneDownButton, myValueLaneUpButton, and GNENetHelper::AttributeCarriers::retrieveLane().
Referenced by showAttributeRow().
|
protected |
show value for check button
Definition at line 534 of file GNEAttributesEditorRow.cpp.
References GNEAttributeCarrier::canParse(), myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, and showValueString().
Referenced by showAttributeRow().
|
protected |
show value for combo Box
Definition at line 580 of file GNEAttributesEditorRow.cpp.
References ALLWAYSTOP, MFXComboBoxIcon::appendIconItem(), GNEAttributeCarrier::canParse(), MFXComboBoxIcon::clearItems(), DEFAULT, MFXComboBoxIcon::disable(), EDGEPRIORITY, MFXComboBoxIcon::enable(), MFXComboBoxIcon::findItem(), GNEAttributeProperties::getAttr(), GNENet::getAttributeCarriers(), GNEAttributeProperties::getDiscreteValues(), GNEViewNet::getNet(), MFXComboBoxIcon::getNumItems(), POIIcons::getPOIIcon(), GNETagProperties::getTag(), GNEAttributeProperties::getTagPropertyParent(), StringBijection< T >::getValues(), VClassIcons::getVClassIcon(), getVehicleClassID(), GNEFrame::getViewNet(), GNEAttributeProperties::isVType(), MIXEDPRIORITY, myAttributeTable, GNEAttributesEditor::myEditedACs, GNEAttributesEditor::myFrameParent, myValueCheckButton, myValueComboBox, myValueLaneDownButton, myValueLaneUpButton, myValueTextField, SUMOXMLDefinitions::POIIcons, SUMOXMLDefinitions::RightOfWayValues, MFXComboBoxIcon::setBackColor(), MFXComboBoxIcon::setCurrentItem(), MFXComboBoxIcon::setTextColor(), showValueString(), SUMO_ATTR_ICON, SUMO_ATTR_RIGHT_OF_WAY, SUMO_ATTR_TYPE, SUMO_ATTR_VCLASS, SUMO_TAG_JUNCTION, SUMO_TAG_VTYPE, SUMO_TAG_VTYPE_DISTRIBUTION, SumoVehicleClassStrings, TEXTCOLOR_BACKGROUND_WHITE, and TEXTCOLOR_BLACK.
Referenced by showAttributeRow().
|
protected |
show value for strings
Definition at line 681 of file GNEAttributesEditorRow.cpp.
References myValueCheckButton, myValueComboBox, myValueTextField, TEXTCOLOR_BLACK, and TEXTCOLOR_BLUE.
Referenced by showAttributeRow(), showValueCheckButton(), and showValueComboBox().
|
private |
edited attribute
Definition at line 132 of file GNEAttributesEditorRow.h.
Referenced by getAttributeValue(), onCmdOpenAllowDialog(), onCmdOpenColorDialog(), onCmdSetAttribute(), onCmdToggleEnableAttribute(), and showAttributeRow().
|
private |
pointer to attribute color button
Definition at line 150 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
pointer to attribute inspect parent button
Definition at line 144 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
pointer to attribute label
Definition at line 135 of file GNEAttributesEditorRow.h.
Referenced by GNEAttributesEditorRow(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
pointer to attribute reparent button
Definition at line 141 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
check junction merging bool mergeJunction(SumoXMLAttr attr, const std::string& newVal) const;
pointer to attribute table parent
Definition at line 129 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), getAttributeValue(), onCmdInspectParent(), onCmdMoveLaneDown(), onCmdMoveLaneUp(), onCmdOpenAllowDialog(), onCmdOpenColorDialog(), onCmdReparent(), onCmdSetAttribute(), onCmdToggleEnableAttribute(), showAttributeRow(), showMoveLaneButtons(), and showValueComboBox().
|
private |
pointer to attribute menu check
Definition at line 138 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), onCmdToggleEnableAttribute(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
pointer to attribute vClass button
Definition at line 147 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeColor(), showAttributeInspectParent(), showAttributeLabel(), showAttributeReparent(), showAttributeToggleEnable(), and showAttributeVClass().
|
private |
pointer to menu check
Definition at line 159 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), onCmdSetAttribute(), showValueCheckButton(), showValueComboBox(), and showValueString().
|
private |
pointer to combo box for select choices
Definition at line 156 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), onCmdSetAttribute(), showValueCheckButton(), showValueComboBox(), and showValueString().
|
private |
Button for move lane down.
Definition at line 165 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeRow(), showMoveLaneButtons(), showValueCheckButton(), and showValueComboBox().
|
private |
Button for move lane up.
Definition at line 162 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), showAttributeRow(), showMoveLaneButtons(), showValueCheckButton(), and showValueComboBox().
|
private |
pointer to text field for modify values
Definition at line 153 of file GNEAttributesEditorRow.h.
Referenced by enableElements(), GNEAttributesEditorRow(), onCmdOpenAllowDialog(), onCmdOpenColorDialog(), onCmdSetAttribute(), showValueCheckButton(), showValueComboBox(), and showValueString().