![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEFrameAttributesModuls.h>
Public Member Functions | |
AttributesEditorRow (AttributesEditor *attributeEditorParent, const GNEAttributeCarrier::AttributeProperties &ACAttr, const std::string &value, bool attributeEnabled) | |
FOX-declaration. More... | |
void | destroy () |
destroy AttributesCreatorRow (but don't delete) More... | |
bool | isAttributesEditorRowValid () const |
check if current attribute of TextField/ComboBox is valid More... | |
void | refreshAttributesEditorRow (const std::string &value, bool forceRefresh, bool disjointAttributeEnabled) |
refresh current row More... | |
FOX-callbacks | |
long | onCmdSetAttribute (FXObject *, FXSelector, void *) |
try to set new attribute value More... | |
long | onCmdSelectCheckButton (FXObject *, FXSelector, void *) |
called when user press a check button More... | |
long | onCmdSelectRadioButton (FXObject *, FXSelector, void *) |
set new disjoint attribute More... | |
long | onCmdOpenAttributeDialog (FXObject *, FXSelector, void *) |
open model dialog for more comfortable attribute editing More... | |
Protected Member Functions | |
AttributesEditorRow () | |
FOX needs this. More... | |
std::string | stripWhitespaceAfterComma (const std::string &stringValue) |
removed invalid spaces of Positions and shapes More... | |
Private Attributes | |
const GNEAttributeCarrier::AttributeProperties | myACAttr |
current AC Attribute More... | |
FXButton * | myAttributeButtonCombinableChoices |
pointer to buttonCombinableChoices More... | |
FXCheckButton * | myAttributeCheckButton |
pointer to attribute menu check More... | |
FXButton * | myAttributeColorButton |
Button for open color editor. More... | |
FXLabel * | myAttributeLabel |
pointer to attribute label More... | |
FXRadioButton * | myAttributeRadioButton |
Radio button for disjoint attributes. More... | |
AttributesEditor * | myAttributesEditorParent |
pointer to AttributesEditor parent More... | |
const bool | myMultiple |
flag to check if input element contains multiple values More... | |
FXCheckButton * | myValueCheckButton |
pointer to menu check More... | |
FXComboBox * | myValueComboBoxChoices |
pointer to combo box choices More... | |
FXTextField * | myValueTextFieldInt |
textField to modify the value of int attributes More... | |
FXTextField * | myValueTextFieldReal |
textField to modify the value of real/Time attributes More... | |
FXTextField * | myValueTextFieldStrings |
textField to modify the value of string attributes More... | |
Definition at line 220 of file GNEFrameAttributesModuls.h.
GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow | ( | GNEFrameAttributesModuls::AttributesEditor * | attributeEditorParent, |
const GNEAttributeCarrier::AttributeProperties & | ACAttr, | ||
const std::string & | value, | ||
bool | attributeEnabled | ||
) |
FOX-declaration.
constructor
Definition at line 839 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::canParse(), GNEViewNetHelper::EditModes::currentSupermode, DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getAttrStr(), GNEAttributeCarrier::AttributeProperties::getDiscreteValues(), GNEViewNet::getEditModes(), GNEFrameAttributesModuls::AttributesEditor::getFrameParent(), GNEAttributeCarrier::TagProperties::getTag(), GNEAttributeCarrier::AttributeProperties::getTagPropertyParent(), GNE_SUPERMODE_DEMAND, GNE_SUPERMODE_NETWORK, GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignComboBoxAttribute, GUIDesignComboBoxNCol, GUIDesignLabelAttribute, GUIDesignRadioButtonAttribute, GUIDesignTextField, GUIDesignTextFieldInt, GUIDesignTextFieldNCol, GUIDesignTextFieldReal, GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isColor(), GNEAttributeCarrier::AttributeProperties::isCombinable(), GNEAttributeCarrier::TagProperties::isDemandElement(), GNEAttributeCarrier::AttributeProperties::isDiscrete(), GNEAttributeCarrier::AttributeProperties::isEnablitable(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isNonEditable(), GNEAttributeCarrier::AttributeProperties::isOptional(), GNEAttributeCarrier::TagProperties::isPersonStop(), GNEAttributeCarrier::TagProperties::isStop(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), MID_GNE_SET_ATTRIBUTE, MID_GNE_SET_ATTRIBUTE_BOOL, MID_GNE_SET_ATTRIBUTE_DIALOG, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, myACAttr, myAttributeButtonCombinableChoices, myAttributeCheckButton, myAttributeColorButton, myAttributeLabel, myAttributeRadioButton, myAttributesEditorParent, myMultiple, myValueCheckButton, myValueComboBoxChoices, myValueTextFieldInt, myValueTextFieldReal, myValueTextFieldStrings, GNEFrame::myViewNet, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_ID, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_TLID, SUMO_ATTR_TLLINKINDEX, SUMO_TAG_CONNECTION, SUMO_TAG_JUNCTION, and SUMO_TAG_VTYPE.
|
protected |
FOX needs this.
Definition at line 1399 of file GNEFrameAttributesModuls.cpp.
void GNEFrameAttributesModuls::AttributesEditorRow::destroy | ( | ) |
destroy AttributesCreatorRow (but don't delete)
Definition at line 1051 of file GNEFrameAttributesModuls.cpp.
bool GNEFrameAttributesModuls::AttributesEditorRow::isAttributesEditorRowValid | ( | ) | const |
check if current attribute of TextField/ComboBox is valid
Definition at line 1169 of file GNEFrameAttributesModuls.cpp.
References myValueComboBoxChoices, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
long GNEFrameAttributesModuls::AttributesEditorRow::onCmdOpenAttributeDialog | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
open model dialog for more comfortable attribute editing
Definition at line 1176 of file GNEFrameAttributesModuls.cpp.
References GNEFrame::attributeUpdated(), RGBColor::BLACK, GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getDefaultValue(), GNEFrameAttributesModuls::AttributesEditor::getEditedACs(), GNEFrameAttributesModuls::AttributesEditor::getFrameParent(), MFXUtils::getFXColor(), MFXUtils::getRGBColor(), GNEViewNet::getUndoList(), myACAttr, myAttributeButtonCombinableChoices, myAttributeColorButton, myAttributesEditorParent, myValueTextFieldStrings, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), RGBColor::parseColor(), SUMO_ATTR_ALLOW, and toString().
long GNEFrameAttributesModuls::AttributesEditorRow::onCmdSelectCheckButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press a check button
Definition at line 1363 of file GNEFrameAttributesModuls.cpp.
References myAttributeCheckButton, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
long GNEFrameAttributesModuls::AttributesEditorRow::onCmdSelectRadioButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
set new disjoint attribute
Definition at line 1382 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getAttrStr(), GNEFrameAttributesModuls::AttributesEditor::getEditedACs(), GNEFrameAttributesModuls::AttributesEditor::getFrameParent(), GNEViewNet::getUndoList(), myACAttr, myAttributesEditorParent, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEFrameAttributesModuls::AttributesEditor::refreshAttributeEditor(), and WRITE_DEBUG.
long GNEFrameAttributesModuls::AttributesEditorRow::onCmdSetAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
try to set new attribute value
Definition at line 1234 of file GNEFrameAttributesModuls.cpp.
References GNEFrame::attributeUpdated(), GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getAttrStr(), GNEAttributeCarrier::AttributeProperties::getDefaultValue(), GNEAttributeCarrier::AttributeProperties::getDiscreteValues(), GNEFrameAttributesModuls::AttributesEditor::getEditedACs(), GNEFrameAttributesModuls::AttributesEditor::getFrameParent(), GNEAttributeCarrier::AttributeProperties::getTagPropertyParent(), GNEAttributeCarrier::TagProperties::getTagStr(), GNEViewNet::getUndoList(), GNEAttributeCarrier::AttributeProperties::hasStaticDefaultValue(), GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isCombinable(), GNEAttributeCarrier::AttributeProperties::isDiscrete(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myACAttr, myAttributesEditorParent, myMultiple, myValueCheckButton, myValueComboBoxChoices, myValueTextFieldInt, myValueTextFieldReal, myValueTextFieldStrings, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEFrameAttributesModuls::AttributesEditor::refreshAttributeEditor(), stripWhitespaceAfterComma(), SUMO_ATTR_ID, SUMO_ATTR_POSITION, SUMO_ATTR_SHAPE, and WRITE_DEBUG.
void GNEFrameAttributesModuls::AttributesEditorRow::refreshAttributesEditorRow | ( | const std::string & | value, |
bool | forceRefresh, | ||
bool | disjointAttributeEnabled | ||
) |
refresh current row
Definition at line 1060 of file GNEFrameAttributesModuls.cpp.
References GNEViewNetHelper::EditModes::currentSupermode, DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getDiscreteValues(), GNEViewNet::getEditModes(), GNEFrameAttributesModuls::AttributesEditor::getFrameParent(), GNEAttributeCarrier::TagProperties::getTag(), GNEAttributeCarrier::AttributeProperties::getTagPropertyParent(), GNE_SUPERMODE_DEMAND, GNE_SUPERMODE_NETWORK, GNEAttributeCarrier::TagProperties::isDemandElement(), GNEAttributeCarrier::AttributeProperties::isNonEditable(), GNEAttributeCarrier::TagProperties::isPersonStop(), GNEAttributeCarrier::TagProperties::isStop(), myACAttr, myAttributeButtonCombinableChoices, myAttributeCheckButton, myAttributeColorButton, myAttributeRadioButton, myAttributesEditorParent, myValueCheckButton, myValueComboBoxChoices, myValueTextFieldInt, myValueTextFieldReal, myValueTextFieldStrings, GNEFrame::myViewNet, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_ID, SUMO_ATTR_NOTHING, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_TLID, SUMO_TAG_JUNCTION, and SUMO_TAG_VTYPE.
|
protected |
removed invalid spaces of Positions and shapes
Definition at line 1405 of file GNEFrameAttributesModuls.cpp.
References StringUtils::replace().
Referenced by onCmdSetAttribute().
|
private |
current AC Attribute
Definition at line 265 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdOpenAttributeDialog(), onCmdSelectRadioButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
pointer to buttonCombinableChoices
Definition at line 280 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdOpenAttributeDialog(), and refreshAttributesEditorRow().
|
private |
pointer to attribute menu check
Definition at line 277 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdSelectCheckButton(), and refreshAttributesEditorRow().
|
private |
Button for open color editor.
Definition at line 283 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdOpenAttributeDialog(), and refreshAttributesEditorRow().
|
private |
pointer to attribute label
Definition at line 271 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow().
|
private |
Radio button for disjoint attributes.
Definition at line 274 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), and refreshAttributesEditorRow().
|
private |
pointer to AttributesEditor parent
Definition at line 262 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdOpenAttributeDialog(), onCmdSelectRadioButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
flag to check if input element contains multiple values
Definition at line 268 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), and onCmdSetAttribute().
|
private |
pointer to menu check
Definition at line 298 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), onCmdSelectCheckButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
pointer to combo box choices
Definition at line 295 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), isAttributesEditorRowValid(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
textField to modify the value of int attributes
Definition at line 286 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), isAttributesEditorRowValid(), onCmdSelectCheckButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
textField to modify the value of real/Time attributes
Definition at line 289 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), isAttributesEditorRowValid(), onCmdSelectCheckButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().
|
private |
textField to modify the value of string attributes
Definition at line 292 of file GNEFrameAttributesModuls.h.
Referenced by AttributesEditorRow(), isAttributesEditorRowValid(), onCmdOpenAttributeDialog(), onCmdSelectCheckButton(), onCmdSetAttribute(), and refreshAttributesEditorRow().