![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEAttributesCreatorRow.h>
Public Member Functions | |
void | destroy () |
destroy GNEAttributesCreatorRow (but don't delete) | |
void | disableAttributesCreatorRow () |
disable row | |
void | disableRow () |
disable Rows | |
void | enableAttributesCreatorRow () |
enable row | |
bool | getAttributeCheckButtonCheck () const |
return status of label checkbox button | |
GNEAttributesCreator * | getAttributesCreatorParent () const |
get GNEAttributesCreator parent | |
const GNEAttributeProperties & | getAttrProperties () const |
return Attr | |
std::string | getValue () const |
return value | |
GNEAttributesCreatorRow (GNEAttributesCreator *AttributesCreatorParent, const GNEAttributeProperties &attrProperties) | |
FOX-declaration. | |
bool | isAttributesCreatorRowEnabled () const |
check if row is enabled | |
bool | isAttributeValid () const |
check if current attribute is valid | |
void | refreshRow () |
refresh row | |
void | setAttributeCheckButtonCheck (bool value) |
enable or disable label checkbox button for Terminatel attributes | |
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 | |
Protected Member Functions | |
std::string | generateID () const |
generate ID | |
bool | isValidID () const |
check if current ID placed in myValueTextField is valid | |
Private Attributes | |
FXButton * | myAttributeButton = nullptr |
Button for open color or allow/disallow editor. | |
MFXLabelTooltip * | myAttributeLabel = nullptr |
Label with the name of the attribute. | |
GNEAttributesCreator * | myAttributesCreatorParent = nullptr |
pointer to GNEAttributesCreator | |
const GNEAttributeProperties | myAttrProperties |
attribute properties | |
FXCheckButton * | myEnableAttributeCheckButton = nullptr |
check button to enable/disable Label attribute | |
std::string | myInvalidValue |
string which indicates the reason due current value is invalid | |
FXCheckButton * | myValueCheckButton = nullptr |
check button to enable/disable the value of boolean parameters | |
FXComboBox * | myValueComboBox = nullptr |
comboBox for discrete vaues | |
FXTextField * | myValueTextField = nullptr |
textField to modify the default value of string parameters | |
Definition at line 37 of file GNEAttributesCreatorRow.h.
GNEAttributesCreatorRow::GNEAttributesCreatorRow | ( | GNEAttributesCreator * | AttributesCreatorParent, |
const GNEAttributeProperties & | attrProperties | ||
) |
FOX-declaration.
constructor
Definition at line 54 of file GNEAttributesCreatorRow.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignComboBoxAttribute, GUIDesignComboBoxNCol, GUIDesignLabelThickedFixed, 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 87 of file GNEAttributesCreatorRow.cpp.
void GNEAttributesCreatorRow::disableAttributesCreatorRow | ( | ) |
disable row
Definition at line 163 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::disableRow | ( | ) |
disable Rows
Definition at line 293 of file GNEAttributesCreatorRow.cpp.
References myAttributeButton, myAttributeLabel, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::enableAttributesCreatorRow | ( | ) |
enable row
Definition at line 151 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
|
protected |
generate ID
Definition at line 454 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 114 of file GNEAttributesCreatorRow.cpp.
References myEnableAttributeCheckButton.
GNEAttributesCreator * GNEAttributesCreatorRow::getAttributesCreatorParent | ( | ) | const |
get GNEAttributesCreator parent
Definition at line 311 of file GNEAttributesCreatorRow.cpp.
References myAttributesCreatorParent.
const GNEAttributeProperties & GNEAttributesCreatorRow::getAttrProperties | ( | ) | const |
std::string GNEAttributesCreatorRow::getValue | ( | ) | const |
return value
Definition at line 102 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 175 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 304 of file GNEAttributesCreatorRow.cpp.
References myValueComboBox, and myValueTextField.
|
protected |
check if current ID placed in myValueTextField is valid
Definition at line 469 of file GNEAttributesCreatorRow.cpp.
References GNENet::getAttributeCarriers(), GNEAttributesCreator::getFrameParent(), GNEViewNet::getNet(), GNETagProperties::getTag(), GNEAttributeProperties::getTagPropertyParent(), GNEFrame::getViewNet(), GNETagProperties::isAdditionalElement(), GNETagProperties::isDemandElement(), myAttributesCreatorParent, myAttrProperties, myValueTextField, GNENetHelper::AttributeCarriers::retrieveAdditional(), and TL.
long GNEAttributesCreatorRow::onCmdOpenAttributeDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the open dialog button
Definition at line 420 of file GNEAttributesCreatorRow.cpp.
References GNEAttributeProperties::getAttr(), GNEAttributeProperties::getDefaultValue(), GNEAttributesCreator::getFrameParent(), MFXUtils::getFXColor(), MFXUtils::getRGBColor(), GNEFrame::getViewNet(), myAttributesCreatorParent, myAttrProperties, myValueTextField, SUMO_ATTR_ALLOW, SUMO_ATTR_COLOR, TL, and toString().
Referenced by FXDEFMAP().
long GNEAttributesCreatorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
Definition at line 317 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, and GNEAttributeCarrier::toggleAttribute().
Referenced by FXDEFMAP().
void GNEAttributesCreatorRow::refreshRow | ( | ) |
refresh row
Definition at line 189 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, GNEAttributeProperties::showAllDiscreteValues(), SUMO_ATTR_ALLOW, and SUMO_ATTR_ID.
void GNEAttributesCreatorRow::setAttributeCheckButtonCheck | ( | bool | value | ) |
enable or disable label checkbox button for Terminatel attributes
Definition at line 124 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().