![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEAttributesCreatorRow.h>
Public Member Functions | |
void | destroy () |
destroy GNEAttributesCreatorRow (but don't delete) More... | |
void | disableAttributesCreatorRow () |
disable row More... | |
void | disableRow () |
disable Rows More... | |
void | enableAttributesCreatorRow () |
enable row More... | |
bool | getAttributeCheckButtonCheck () const |
return status of label checkbox button More... | |
GNEAttributesCreator * | getAttributesCreatorParent () const |
get GNEAttributesCreator parent More... | |
const GNEAttributeProperties & | getAttrProperties () const |
return Attr More... | |
std::string | getValue () const |
return value More... | |
GNEAttributesCreatorRow (GNEAttributesCreator *AttributesCreatorParent, const GNEAttributeProperties &attrProperties) | |
FOX-declaration. More... | |
bool | isAttributesCreatorRowEnabled () const |
check if row is enabled More... | |
bool | isAttributeValid () const |
check if current attribute is valid More... | |
void | refreshRow () |
refresh row More... | |
void | setAttributeCheckButtonCheck (bool value) |
enable or disable label checkbox button for Terminatel attributes More... | |
FOX-callbacks | |
called when user set the value of an attribute of type int/float/string/bool | |
long | onCmdSetAttribute (FXObject *, FXSelector, void *) |
long | onCmdOpenAttributeDialog (FXObject *, FXSelector, void *) |
called when user press the open dialog button More... | |
Protected Member Functions | |
std::string | generateID () const |
generate ID More... | |
bool | isValidID () const |
check if current ID placed in myValueTextField is valid More... | |
Private Attributes | |
FXButton * | myAttributeButton = nullptr |
Button for open color or allow/disallow editor. More... | |
MFXLabelTooltip * | myAttributeLabel = nullptr |
Label with the name of the attribute. More... | |
GNEAttributesCreator * | myAttributesCreatorParent = nullptr |
pointer to GNEAttributesCreator More... | |
const GNEAttributeProperties | myAttrProperties |
attribute properties More... | |
FXCheckButton * | myEnableAttributeCheckButton = nullptr |
check button to enable/disable Label attribute More... | |
std::string | myInvalidValue |
string which indicates the reason due current value is invalid More... | |
FXCheckButton * | myValueCheckButton = nullptr |
check button to enable/disable the value of boolean parameters More... | |
FXComboBox * | myValueComboBox = nullptr |
comboBox for discrete vaues More... | |
FXTextField * | myValueTextField = nullptr |
textField to modify the default value of string parameters More... | |
Definition at line 37 of file GNEAttributesCreatorRow.h.
GNEAttributesCreatorRow::GNEAttributesCreatorRow | ( | GNEAttributesCreator * | AttributesCreatorParent, |
const GNEAttributeProperties & | attrProperties | ||
) |
FOX-declaration.
constructor
Definition at line 53 of file GNEAttributesCreatorRow.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignComboBoxAttribute, GUIDesignComboBoxNCol, GUIDesignLabelAttribute, GUIDesignTextField, GUIDesignTextFieldNCol, MID_GNE_SET_ATTRIBUTE, MID_GNE_SET_ATTRIBUTE_DIALOG, and TL.
void GNEAttributesCreatorRow::destroy | ( | ) |
destroy GNEAttributesCreatorRow (but don't delete)
Definition at line 86 of file GNEAttributesCreatorRow.cpp.
void GNEAttributesCreatorRow::disableAttributesCreatorRow | ( | ) |
disable row
Definition at line 162 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::disableRow | ( | ) |
disable Rows
Definition at line 287 of file GNEAttributesCreatorRow.cpp.
References myAttributeButton, myAttributeLabel, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::enableAttributesCreatorRow | ( | ) |
enable row
Definition at line 150 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
|
protected |
generate ID
Definition at line 458 of file GNEAttributesCreatorRow.cpp.
References GNENetHelper::AttributeCarriers::generateAdditionalID(), GNENet::getAttributeCarriers(), GNEAttributesCreator::getFrameParent(), GNEViewNet::getNet(), GNETagProperties::getTag(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), GNETagProperties::isAdditionalElement(), GNETagProperties::isDemandElement(), myAttributesCreatorParent, and myAttrProperties.
Referenced by refreshRow().
bool GNEAttributesCreatorRow::getAttributeCheckButtonCheck | ( | ) | const |
return status of label checkbox button
Definition at line 113 of file GNEAttributesCreatorRow.cpp.
References myEnableAttributeCheckButton.
GNEAttributesCreator * GNEAttributesCreatorRow::getAttributesCreatorParent | ( | ) | const |
get GNEAttributesCreator parent
Definition at line 305 of file GNEAttributesCreatorRow.cpp.
References myAttributesCreatorParent.
const GNEAttributeProperties & GNEAttributesCreatorRow::getAttrProperties | ( | ) | const |
std::string GNEAttributesCreatorRow::getValue | ( | ) | const |
return value
Definition at line 101 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
bool GNEAttributesCreatorRow::isAttributesCreatorRowEnabled | ( | ) | const |
check if row is enabled
Definition at line 174 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
bool GNEAttributesCreatorRow::isAttributeValid | ( | ) | const |
check if current attribute is valid
Definition at line 298 of file GNEAttributesCreatorRow.cpp.
References myValueComboBox, and myValueTextField.
|
protected |
check if current ID placed in myValueTextField is valid
Definition at line 473 of file GNEAttributesCreatorRow.cpp.
References GNENet::getAttributeCarriers(), GNEAttributesCreator::getFrameParent(), GNEViewNet::getNet(), GNETagProperties::getTag(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), GNETagProperties::isAdditionalElement(), GNETagProperties::isDemandElement(), myAttributesCreatorParent, myAttrProperties, myValueTextField, and GNENetHelper::AttributeCarriers::retrieveAdditional().
long GNEAttributesCreatorRow::onCmdOpenAttributeDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the open dialog button
Definition at line 414 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::getAttr(), GNEAttributeProperties::getDefaultValue(), GNEAttributesCreator::getFrameParent(), MFXUtils::getFXColor(), MFXUtils::getRGBColor(), getVehicleClassNames(), GNEFrame::getViewNet(), myAttributesCreatorParent, myAttrProperties, myValueTextField, parseVehicleClasses(), SUMO_ATTR_ALLOW, SUMO_ATTR_COLOR, SUMO_ATTR_DISALLOW, and toString().
Referenced by FXDEFMAP().
long GNEAttributesCreatorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
Definition at line 311 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::getAttr(), GNEAttributesCreator::getCurrentTemplateAC(), GNEAttributeProperties::getDefaultValue(), GNEAttributeCarrier::getTagProperty(), GNEAttributeProperties::hasDefaultValue(), GNETagProperties::isStop(), GNEAttributeCarrier::isValid(), myAttributesCreatorParent, myAttrProperties, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, myValueTextField, GNEAttributesCreator::refreshAttributesCreator(), GNEAttributeCarrier::setAttribute(), SUMO_ATTR_TRIGGERED, TL, and GNEAttributeCarrier::toggleAttribute().
Referenced by FXDEFMAP().
void GNEAttributesCreatorRow::refreshRow | ( | ) |
refresh row
Definition at line 188 of file GNEAttributesCreatorRow.cpp.
References generateID(), GNEAttributeProperties::getAttr(), GNEAttributeCarrier::getAttribute(), GNEAttributeProperties::getAttrStr(), GNEAttributesCreator::getCurrentTemplateAC(), GNEAttributeProperties::getDefaultValue(), GNEAttributeProperties::getDefinition(), GNEAttributeProperties::getDiscreteValues(), GNEAttributeProperties::hasAutomaticID(), GNEAttributeProperties::hasDefaultValue(), GNEAttributeProperties::isActivatable(), GNEAttributeCarrier::isAttributeEnabled(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isColor(), GNEAttributeProperties::isDiscrete(), myAttributeButton, myAttributeLabel, myAttributesCreatorParent, myAttrProperties, myEnableAttributeCheckButton, myInvalidValue, myValueCheckButton, myValueComboBox, myValueTextField, SUMO_ATTR_ALLOW, SUMO_ATTR_DISALLOW, SUMO_ATTR_ID, and TL.
void GNEAttributesCreatorRow::setAttributeCheckButtonCheck | ( | bool | value | ) |
enable or disable label checkbox button for Terminatel attributes
Definition at line 123 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, and myValueTextField.
|
private |
Button for open color or allow/disallow editor.
Definition at line 116 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), and refreshRow().
|
private |
Label with the name of the attribute.
Definition at line 110 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), and refreshRow().
|
private |
pointer to GNEAttributesCreator
Definition at line 101 of file GNEAttributesCreatorRow.h.
Referenced by generateID(), getAttributesCreatorParent(), isValidID(), onCmdOpenAttributeDialog(), onCmdSetAttribute(), and refreshRow().
|
private |
attribute properties
Definition at line 104 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), generateID(), getAttrProperties(), getValue(), isAttributesCreatorRowEnabled(), isValidID(), onCmdOpenAttributeDialog(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
check button to enable/disable Label attribute
Definition at line 113 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), getAttributeCheckButtonCheck(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
string which indicates the reason due current value is invalid
Definition at line 107 of file GNEAttributesCreatorRow.h.
Referenced by refreshRow().
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 122 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), disableRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
comboBox for discrete vaues
Definition at line 125 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), disableRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), isAttributeValid(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
textField to modify the default value of string parameters
Definition at line 119 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), disableRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), isAttributeValid(), isValidID(), onCmdOpenAttributeDialog(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().