![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEFrameAttributesModuls.h>
Public Member Functions | |
AttributesCreatorRow (AttributesCreator *AttributesCreatorParent, const GNEAttributeCarrier::AttributeProperties &attrProperties) | |
FOX-declaration. More... | |
void | destroy () |
destroy AttributesCreatorRow (but don't delete) More... | |
void | disableAttributesCreatorRow () |
disable row More... | |
void | enableAttributesCreatorRow () |
enable row More... | |
bool | getAttributeCheckButtonCheck () const |
return status of label checkbox button More... | |
bool | getAttributeRadioButtonCheck () const |
return status of radio button More... | |
AttributesCreator * | getAttributesCreatorParent () const |
get AttributesCreator parent More... | |
const GNEAttributeCarrier::AttributeProperties & | getAttrProperties () const |
return Attr More... | |
std::string | getValue () const |
return value More... | |
bool | isAttributesCreatorRowEnabled () const |
check if row is enabled More... | |
const std::string & | isAttributeValid () const |
returns a empty string if current value is valid, a string with information about invalid value in other case More... | |
void | setAttributeCheckButtonCheck (bool value) |
enable or disable label checkbox button for optional attributes More... | |
void | setAttributeRadioButtonCheck (bool value) |
enable or disable radio button for disjoint 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 | onCmdSelectCheckButton (FXObject *, FXSelector, void *) |
called when user press a check button More... | |
long | onCmdSelectColorButton (FXObject *, FXSelector, void *) |
called when user press the "Color" button More... | |
long | onCmdSelectRadioButton (FXObject *, FXSelector, void *) |
called when user press a radio button More... | |
Protected Member Functions | |
AttributesCreatorRow () | |
FOX needs this. More... | |
std::string | checkComplexAttribute (const std::string &value) |
check if given complex attribute is valid More... | |
Private Attributes | |
FXCheckButton * | myAttributeCheckButton |
check button to enable/disable Label attribute More... | |
FXButton * | myAttributeColorButton |
Button for open color editor. More... | |
FXLabel * | myAttributeLabel |
Label with the name of the attribute. More... | |
FXRadioButton * | myAttributeRadioButton |
Radio button for disjoint attributes. More... | |
AttributesCreator * | myAttributesCreatorParent |
pointer to AttributesCreator More... | |
const GNEAttributeCarrier::AttributeProperties | myAttrProperties |
attribute properties More... | |
std::string | myInvalidValue |
string which indicates the reason due current value is invalid More... | |
FXCheckButton * | myValueCheckButton |
check button to enable/disable the value of boolean parameters More... | |
FXTextField * | myValueTextFieldInt |
textField to modify the default value of int/float/string parameters More... | |
FXTextField * | myValueTextFieldReal |
textField to modify the default value of real/times parameters More... | |
FXTextField * | myValueTextFieldStrings |
textField to modify the default value of string parameters More... | |
Definition at line 52 of file GNEFrameAttributesModuls.h.
GNEFrameAttributesModuls::AttributesCreatorRow::AttributesCreatorRow | ( | AttributesCreator * | AttributesCreatorParent, |
const GNEAttributeCarrier::AttributeProperties & | attrProperties | ||
) |
FOX-declaration.
constructor
Definition at line 105 of file GNEFrameAttributesModuls.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignLabelAttribute, GUIDesignRadioButtonAttribute, GUIDesignTextField, GUIDesignTextFieldInt, GUIDesignTextFieldNCol, GUIDesignTextFieldReal, MID_GNE_SET_ATTRIBUTE, MID_GNE_SET_ATTRIBUTE_BOOL, MID_GNE_SET_ATTRIBUTE_DIALOG, MID_GNE_SET_ATTRIBUTE_RADIOBUTTON, and SUMO_ATTR_UNTIL.
|
inlineprotected |
FOX needs this.
Definition at line 113 of file GNEFrameAttributesModuls.h.
References checkComplexAttribute().
|
protected |
check if given complex attribute is valid
Definition at line 557 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getAttrStr(), myAttrProperties, SUMOVehicleParameter::parseArrivalLane(), SUMOVehicleParameter::parseArrivalPos(), SUMOVehicleParameter::parseArrivalPosLat(), SUMOVehicleParameter::parseArrivalSpeed(), SUMOVehicleParameter::parseDepart(), SUMOVehicleParameter::parseDepartLane(), SUMOVehicleParameter::parseDepartPos(), SUMOVehicleParameter::parseDepartPosLat(), SUMOVehicleParameter::parseDepartSpeed(), SUMOVehicleParameter::parsePersonModes(), SUMO_ATTR_ARRIVALLANE, SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_ARRIVALPOS_LAT, SUMO_ATTR_ARRIVALSPEED, SUMO_ATTR_BEGIN, SUMO_ATTR_DEPART, SUMO_ATTR_DEPARTLANE, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DEPARTPOS_LAT, SUMO_ATTR_DEPARTSPEED, and SUMO_ATTR_MODES.
Referenced by AttributesCreatorRow(), and onCmdSetAttribute().
void GNEFrameAttributesModuls::AttributesCreatorRow::destroy | ( | ) |
destroy AttributesCreatorRow (but don't delete)
Definition at line 216 of file GNEFrameAttributesModuls.cpp.
void GNEFrameAttributesModuls::AttributesCreatorRow::disableAttributesCreatorRow | ( | ) |
disable row
Definition at line 341 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
void GNEFrameAttributesModuls::AttributesCreatorRow::enableAttributesCreatorRow | ( | ) |
enable row
Definition at line 327 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
bool GNEFrameAttributesModuls::AttributesCreatorRow::getAttributeCheckButtonCheck | ( | ) | const |
return status of label checkbox button
Definition at line 286 of file GNEFrameAttributesModuls.cpp.
References myAttributeCheckButton.
bool GNEFrameAttributesModuls::AttributesCreatorRow::getAttributeRadioButtonCheck | ( | ) | const |
return status of radio button
Definition at line 245 of file GNEFrameAttributesModuls.cpp.
References myAttributeRadioButton.
Referenced by GNEFrameAttributesModuls::AttributesCreator::updateDisjointAttributes().
GNEFrameAttributesModuls::AttributesCreator * GNEFrameAttributesModuls::AttributesCreatorRow::getAttributesCreatorParent | ( | ) | const |
get AttributesCreator parent
Definition at line 377 of file GNEFrameAttributesModuls.cpp.
References myAttributesCreatorParent.
const GNEAttributeCarrier::AttributeProperties & GNEFrameAttributesModuls::AttributesCreatorRow::getAttrProperties | ( | ) | const |
return Attr
Definition at line 225 of file GNEFrameAttributesModuls.cpp.
References myAttrProperties.
Referenced by GNEFrameAttributesModuls::AttributesCreator::updateDisjointAttributes().
std::string GNEFrameAttributesModuls::AttributesCreatorRow::getValue | ( | ) | const |
return value
Definition at line 231 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
bool GNEFrameAttributesModuls::AttributesCreatorRow::isAttributesCreatorRowEnabled | ( | ) | const |
check if row is enabled
Definition at line 355 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
const std::string & GNEFrameAttributesModuls::AttributesCreatorRow::isAttributeValid | ( | ) | const |
returns a empty string if current value is valid, a string with information about invalid value in other case
Definition at line 371 of file GNEFrameAttributesModuls.cpp.
References myInvalidValue.
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSelectCheckButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press a check button
Definition at line 509 of file GNEFrameAttributesModuls.cpp.
References myAttributeCheckButton, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSelectColorButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the "Color" button
Definition at line 528 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::getDefaultValue(), MFXUtils::getFXColor(), MFXUtils::getRGBColor(), myAttrProperties, myValueTextFieldStrings, onCmdSetAttribute(), RGBColor::parseColor(), and toString().
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSelectRadioButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press a radio button
Definition at line 547 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::getAttrStr(), myAttributesCreatorParent, myAttrProperties, GNEFrameAttributesModuls::AttributesCreator::updateDisjointAttributes(), and WRITE_DEBUG.
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
Definition at line 383 of file GNEFrameAttributesModuls.cpp.
References checkComplexAttribute(), GNEAttributeCarrier::AttributeProperties::getAttr(), GNEAttributeCarrier::AttributeProperties::getAttrStr(), GNEFrameAttributesModuls::AttributesCreator::getCurrentTagProperties(), GNEAttributeCarrier::AttributeProperties::getMaximumRange(), GNEAttributeCarrier::AttributeProperties::getMinimumRange(), GNEAttributeCarrier::TagProperties::getTag(), GUITexturesHelper::getTextureID(), GNEAttributeCarrier::AttributeProperties::hasAttrRange(), GNEAttributeCarrier::AttributeProperties::isColor(), GNEAttributeCarrier::AttributeProperties::isComplex(), GNEAttributeCarrier::AttributeProperties::isFilename(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isPositive(), GNEAttributeCarrier::AttributeProperties::isProbability(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), SUMOXMLDefinitions::isValidAttribute(), SUMOXMLDefinitions::isValidFilename(), SUMOXMLDefinitions::isValidListOfTypeID(), SUMOXMLDefinitions::isValidVehicleID(), myAttributesCreatorParent, myAttrProperties, myInvalidValue, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, myValueTextFieldStrings, SUMO_ATTR_ACTTYPE, SUMO_ATTR_EXPECTED, SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_IMGFILE, SUMO_ATTR_INDEX, SUMO_ATTR_LENGTH, SUMO_ATTR_NAME, SUMO_ATTR_TRIP_ID, SUMO_ATTR_VTYPES, SUMO_TAG_E2DETECTOR, toString(), and GNEFrameAttributesModuls::AttributesCreator::updateDisjointAttributes().
Referenced by onCmdSelectColorButton().
void GNEFrameAttributesModuls::AttributesCreatorRow::setAttributeCheckButtonCheck | ( | bool | value | ) |
enable or disable label checkbox button for optional attributes
Definition at line 296 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttributeCheckButton, myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
void GNEFrameAttributesModuls::AttributesCreatorRow::setAttributeRadioButtonCheck | ( | bool | value | ) |
enable or disable radio button for disjoint attributes
Definition at line 255 of file GNEFrameAttributesModuls.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isSUMOTime(), myAttributeRadioButton, myAttrProperties, myValueCheckButton, myValueTextFieldInt, myValueTextFieldReal, and myValueTextFieldStrings.
Referenced by GNEFrameAttributesModuls::AttributesCreator::updateDisjointAttributes().
|
private |
check button to enable/disable Label attribute
Definition at line 135 of file GNEFrameAttributesModuls.h.
Referenced by getAttributeCheckButtonCheck(), onCmdSelectCheckButton(), and setAttributeCheckButtonCheck().
|
private |
Button for open color editor.
Definition at line 138 of file GNEFrameAttributesModuls.h.
|
private |
Label with the name of the attribute.
Definition at line 129 of file GNEFrameAttributesModuls.h.
|
private |
Radio button for disjoint attributes.
Definition at line 132 of file GNEFrameAttributesModuls.h.
Referenced by getAttributeRadioButtonCheck(), and setAttributeRadioButtonCheck().
|
private |
pointer to AttributesCreator
Definition at line 120 of file GNEFrameAttributesModuls.h.
Referenced by getAttributesCreatorParent(), onCmdSelectRadioButton(), and onCmdSetAttribute().
|
private |
attribute properties
Definition at line 123 of file GNEFrameAttributesModuls.h.
Referenced by checkComplexAttribute(), disableAttributesCreatorRow(), enableAttributesCreatorRow(), getAttrProperties(), getValue(), isAttributesCreatorRowEnabled(), onCmdSelectColorButton(), onCmdSelectRadioButton(), onCmdSetAttribute(), setAttributeCheckButtonCheck(), and setAttributeRadioButtonCheck().
|
private |
string which indicates the reason due current value is invalid
Definition at line 126 of file GNEFrameAttributesModuls.h.
Referenced by isAttributeValid(), and onCmdSetAttribute().
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 150 of file GNEFrameAttributesModuls.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSelectCheckButton(), onCmdSetAttribute(), setAttributeCheckButtonCheck(), and setAttributeRadioButtonCheck().
|
private |
textField to modify the default value of int/float/string parameters
Definition at line 141 of file GNEFrameAttributesModuls.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSelectCheckButton(), onCmdSetAttribute(), setAttributeCheckButtonCheck(), and setAttributeRadioButtonCheck().
|
private |
textField to modify the default value of real/times parameters
Definition at line 144 of file GNEFrameAttributesModuls.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSelectCheckButton(), onCmdSetAttribute(), setAttributeCheckButtonCheck(), and setAttributeRadioButtonCheck().
|
private |
textField to modify the default value of string parameters
Definition at line 147 of file GNEFrameAttributesModuls.h.
Referenced by disableAttributesCreatorRow(), enableAttributesCreatorRow(), getValue(), isAttributesCreatorRowEnabled(), onCmdSelectCheckButton(), onCmdSelectColorButton(), onCmdSetAttribute(), setAttributeCheckButtonCheck(), and setAttributeRadioButtonCheck().