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 | onCmdOpenColorDialog (FXObject *, FXSelector, void *) |
called when user press the color dialog button | |
long | onCmdOpenAllowDialog (FXObject *, FXSelector, void *) |
called when user press the allow dialog button | |
Protected Member Functions | |
std::string | generateID () const |
FOX needs this. | |
bool | isValidID () const |
check if current ID placed in myValueTextField is valid | |
Private Attributes | |
FXButton * | myAttributeAllowButton = nullptr |
Button for open allow editor. | |
FXButton * | myAttributeColorButton = nullptr |
Button for open color 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 | |
MFXComboBoxIcon * | 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 56 of file GNEAttributesCreatorRow.cpp.
References ALLOW, GUIDesigns::buildFXButton(), COLORWHEEL, GUIIconSubSys::getIcon(), GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignComboBoxAttribute, GUIDesignComboBoxNCol, GUIDesignComboBoxVisibleItemsMedium, GUIDesignLabelThickedFixed, GUIDesignTextField, GUIDesignTextFieldNCol, MID_GNE_SET_ATTRIBUTE, MID_GNE_SET_ATTRIBUTE_ALLOW, MID_GNE_SET_ATTRIBUTE_COLOR, SUMO_ATTR_ALLOW, SUMO_ATTR_COLOR, TL, and toString().
void GNEAttributesCreatorRow::destroy | ( | ) |
destroy GNEAttributesCreatorRow (but don't delete)
Definition at line 92 of file GNEAttributesCreatorRow.cpp.
void GNEAttributesCreatorRow::disableAttributesCreatorRow | ( | ) |
disable row
Definition at line 168 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::disable(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::disableRow | ( | ) |
disable Rows
Definition at line 308 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::disable(), myAttributeAllowButton, myAttributeColorButton, myAttributeLabel, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, and myValueTextField.
void GNEAttributesCreatorRow::enableAttributesCreatorRow | ( | ) |
enable row
Definition at line 156 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::enable(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
|
protected |
FOX needs this.
generate ID
Definition at line 473 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 119 of file GNEAttributesCreatorRow.cpp.
References myEnableAttributeCheckButton.
GNEAttributesCreator * GNEAttributesCreatorRow::getAttributesCreatorParent | ( | ) | const |
get GNEAttributesCreator parent
Definition at line 327 of file GNEAttributesCreatorRow.cpp.
References myAttributesCreatorParent.
const GNEAttributeProperties & GNEAttributesCreatorRow::getAttrProperties | ( | ) | const |
return Attr
Definition at line 101 of file GNEAttributesCreatorRow.cpp.
References myAttrProperties.
std::string GNEAttributesCreatorRow::getValue | ( | ) | const |
return value
Definition at line 107 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::getText(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myValueCheckButton, myValueComboBox, and myValueTextField.
bool GNEAttributesCreatorRow::isAttributesCreatorRowEnabled | ( | ) | const |
check if row is enabled
Definition at line 180 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 320 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::getTextColor(), myValueComboBox, and myValueTextField.
|
protected |
check if current ID placed in myValueTextField is valid
Definition at line 488 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::onCmdOpenAllowDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the allow dialog button
Definition at line 456 of file GNEAttributesCreatorRow.cpp.
References GNEAttributesCreator::getFrameParent(), GNEFrame::getViewNet(), myAttributesCreatorParent, and myValueTextField.
Referenced by FXDEFMAP().
long GNEAttributesCreatorRow::onCmdOpenColorDialog | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the color dialog button
Definition at line 436 of file GNEAttributesCreatorRow.cpp.
References COLORWHEEL, GNEAttributeProperties::getDefaultValue(), MFXUtils::getFXColor(), GUIIconSubSys::getIcon(), MFXUtils::getRGBColor(), myAttrProperties, myValueTextField, TL, and toString().
Referenced by FXDEFMAP().
long GNEAttributesCreatorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
Definition at line 333 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::disable(), MFXComboBoxIcon::enable(), GNEAttributeProperties::getAttr(), GNEAttributesCreator::getCurrentTemplateAC(), GNEAttributeProperties::getDefaultValue(), GNEAttributeCarrier::getTagProperty(), MFXComboBoxIcon::getText(), GNEAttributeProperties::hasDefaultValue(), GNEAttributeCarrier::isValid(), GNETagProperties::isVehicleStop(), myAttributesCreatorParent, myAttrProperties, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, myValueTextField, GNEAttributesCreator::refreshAttributesCreator(), GNEAttributeCarrier::setAttribute(), MFXComboBoxIcon::setTextColor(), SUMO_ATTR_TRIGGERED, and GNEAttributeCarrier::toggleAttribute().
Referenced by FXDEFMAP().
void GNEAttributesCreatorRow::refreshRow | ( | ) |
refresh row
Definition at line 194 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::appendIconItem(), MFXComboBoxIcon::clearItems(), MFXComboBoxIcon::disable(), MFXComboBoxIcon::enable(), MFXComboBoxIcon::findItem(), generateID(), GNEAttributeProperties::getAttr(), GNEAttributeCarrier::getAttribute(), GNEAttributeProperties::getAttrStr(), GNEAttributesCreator::getCurrentTemplateAC(), GNEAttributeProperties::getDefaultValue(), GNEAttributeProperties::getDefinition(), GNEAttributeProperties::getDiscreteValues(), POIIcons::getPOIIcon(), MFXComboBoxIcon::getText(), StringBijection< T >::getValues(), GNEAttributeProperties::hasAutomaticID(), GNEAttributeProperties::hasDefaultValue(), GNEAttributeProperties::isActivatable(), GNEAttributeCarrier::isAttributeEnabled(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isColor(), GNEAttributeProperties::isDiscrete(), GNEAttributeProperties::isSVCPermission(), myAttributeAllowButton, myAttributeColorButton, myAttributeLabel, myAttributesCreatorParent, myAttrProperties, myEnableAttributeCheckButton, myInvalidValue, myValueCheckButton, myValueComboBox, myValueTextField, SUMOXMLDefinitions::POIIcons, MFXComboBoxIcon::setCurrentItem(), MFXComboBoxIcon::setTextColor(), SUMO_ATTR_DISALLOW, SUMO_ATTR_ICON, and SUMO_ATTR_ID.
void GNEAttributesCreatorRow::setAttributeCheckButtonCheck | ( | bool | value | ) |
enable or disable label checkbox button for Terminatel attributes
Definition at line 129 of file GNEAttributesCreatorRow.cpp.
References MFXComboBoxIcon::disable(), MFXComboBoxIcon::enable(), GNEAttributeProperties::isBool(), GNEAttributeProperties::isDiscrete(), myAttrProperties, myEnableAttributeCheckButton, myValueCheckButton, myValueComboBox, and myValueTextField.
|
private |
Button for open allow editor.
Definition at line 123 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), and refreshRow().
|
private |
Button for open color editor.
Definition at line 120 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), and refreshRow().
|
private |
Label with the name of the attribute.
Definition at line 114 of file GNEAttributesCreatorRow.h.
Referenced by disableRow(), and refreshRow().
|
private |
pointer to GNEAttributesCreator
Definition at line 105 of file GNEAttributesCreatorRow.h.
Referenced by generateID(), getAttributesCreatorParent(), isValidID(), onCmdOpenAllowDialog(), onCmdSetAttribute(), and refreshRow().
|
private |
attribute properties
Definition at line 108 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), generateID(), getAttrProperties(), getValue(), isAttributesCreatorRowEnabled(), isValidID(), onCmdOpenColorDialog(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
check button to enable/disable Label attribute
Definition at line 117 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 111 of file GNEAttributesCreatorRow.h.
Referenced by refreshRow().
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 129 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), disableRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().
|
private |
comboBox for discrete vaues
Definition at line 132 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 126 of file GNEAttributesCreatorRow.h.
Referenced by disableAttributesCreatorRow(), disableRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), isAttributeValid(), isValidID(), onCmdOpenAllowDialog(), onCmdOpenColorDialog(), onCmdSetAttribute(), refreshRow(), and setAttributeCheckButtonCheck().