![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEFrame.h>
Public Member Functions | |
ACAttributeRow (ACAttributes *ACAttributesParent) | |
FOX-declaration. More... | |
ACAttributes * | getACAttributesParent () const |
get ACAttributes parent More... | |
SumoXMLAttr | getAttr () const |
return Attr More... | |
std::string | getValue () const |
return value More... | |
void | hideParameter () |
hide all parameters 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 | showParameter (SumoXMLAttr const attr, const GNEAttributeCarrier::AttributeProperties &attrProperties, const std::string &value) |
show name and value of attribute of type string More... | |
~ACAttributeRow () | |
destructor More... | |
FOX-callbacks | |
called when user set the value of an attribute of type int/float/string | |
long | onCmdSetAttribute (FXObject *, FXSelector, void *) |
long | onCmdSetBooleanAttribute (FXObject *, FXSelector, void *) |
called when user change the value of myBoolCheckButton More... | |
long | onCmdSetColorAttribute (FXObject *, FXSelector, void *) |
called when user press the "Color" button More... | |
Protected Member Functions | |
ACAttributeRow () | |
FOX needs this. More... | |
Private Attributes | |
ACAttributes * | myACAttributesParent |
pointer to ACAttributes More... | |
GNEAttributeCarrier::AttributeProperties | myAttrProperties |
attribute properties More... | |
FXCheckButton * | myBoolCheckButton |
check button to enable/disable the value of boolean parameters More... | |
FXButton * | myColorEditor |
Button for open color editor. More... | |
std::string | myInvalidValue |
string which indicates the reason due current value is invalid More... | |
FXLabel * | myLabel |
lael with the name of the parameter More... | |
FXTextField * | myTextFieldInt |
textField to modify the default value of int/float/string parameters More... | |
FXTextField * | myTextFieldReal |
textField to modify the default value of real/times parameters More... | |
FXTextField * | myTextFieldStrings |
textField to modify the default value of string parameters More... | |
SumoXMLAttr | myXMLAttr |
current XML attribute More... | |
Definition at line 100 of file GNEFrame.h.
GNEFrame::ACAttributeRow::ACAttributeRow | ( | ACAttributes * | ACAttributesParent | ) |
FOX-declaration.
constructor
Definition at line 213 of file GNEFrame.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButtonAttribute, GUIDesignLabelAttribute, GUIDesignTextField, GUIDesignTextFieldInt, GUIDesignTextFieldNCol, GUIDesignTextFieldReal, hideParameter(), MID_GNE_SET_ATTRIBUTE_BOOL, MID_GNE_SET_ATTRIBUTE_DIALOG, MID_GNE_SET_ATTRIBUTE_TEXT, myBoolCheckButton, myColorEditor, myLabel, myTextFieldInt, myTextFieldReal, and myTextFieldStrings.
GNEFrame::ACAttributeRow::~ACAttributeRow | ( | ) |
destructor
Definition at line 229 of file GNEFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 143 of file GNEFrame.h.
GNEFrame::ACAttributes * GNEFrame::ACAttributeRow::getACAttributesParent | ( | ) | const |
get ACAttributes parent
Definition at line 312 of file GNEFrame.cpp.
References myACAttributesParent.
SumoXMLAttr GNEFrame::ACAttributeRow::getAttr | ( | ) | const |
std::string GNEFrame::ACAttributeRow::getValue | ( | ) | const |
return value
Definition at line 292 of file GNEFrame.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isTime(), myAttrProperties, myBoolCheckButton, myTextFieldInt, myTextFieldReal, and myTextFieldStrings.
void GNEFrame::ACAttributeRow::hideParameter | ( | ) |
hide all parameters
Definition at line 273 of file GNEFrame.cpp.
References GNEFrame::hide(), myBoolCheckButton, myColorEditor, myLabel, myTextFieldInt, myTextFieldReal, myTextFieldStrings, myXMLAttr, and SUMO_ATTR_NOTHING.
Referenced by ACAttributeRow().
const std::string & GNEFrame::ACAttributeRow::isAttributeValid | ( | ) | const |
returns a empty string if current value is valid, a string with information about invalid value in other case
Definition at line 306 of file GNEFrame.cpp.
References myInvalidValue.
long GNEFrame::ACAttributeRow::onCmdSetAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 318 of file GNEFrame.cpp.
References GNEAttributeCarrier::AttributeProperties::getMaximumRange(), GNEAttributeCarrier::AttributeProperties::getMinimumRange(), GNEAttributeCarrier::TagProperties::getTag(), GUITexturesHelper::getTextureID(), GNEAttributeCarrier::AttributeProperties::hasAttrRange(), GNEAttributeCarrier::AttributeProperties::isColor(), GNEAttributeCarrier::AttributeProperties::isFilename(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), GNEAttributeCarrier::AttributeProperties::isPositive(), GNEAttributeCarrier::AttributeProperties::isProbability(), GNEAttributeCarrier::AttributeProperties::isTime(), SUMOXMLDefinitions::isValidAttribute(), SUMOXMLDefinitions::isValidFilename(), SUMOXMLDefinitions::isValidListOfTypeID(), myACAttributesParent, myAttrProperties, myInvalidValue, GNEFrame::ACAttributes::myTagProperties, myTextFieldInt, myTextFieldReal, myTextFieldStrings, myXMLAttr, SUMO_ATTR_IMGFILE, SUMO_ATTR_LENGTH, SUMO_ATTR_NAME, SUMO_ATTR_VTYPES, SUMO_TAG_E2DETECTOR, and toString().
Referenced by onCmdSetColorAttribute().
long GNEFrame::ACAttributeRow::onCmdSetBooleanAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user change the value of myBoolCheckButton
Definition at line 415 of file GNEFrame.cpp.
References myBoolCheckButton.
long GNEFrame::ACAttributeRow::onCmdSetColorAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the "Color" button
Definition at line 425 of file GNEFrame.cpp.
References GNEAttributeCarrier::AttributeProperties::getDefaultValue(), MFXUtils::getFXColor(), MFXUtils::getRGBColor(), myAttrProperties, myTextFieldStrings, onCmdSetAttribute(), RGBColor::parseColor(), and toString().
void GNEFrame::ACAttributeRow::showParameter | ( | SumoXMLAttr const | attr, |
const GNEAttributeCarrier::AttributeProperties & | attrProperties, | ||
const std::string & | value | ||
) |
show name and value of attribute of type string
Definition at line 233 of file GNEFrame.cpp.
References GNEAttributeCarrier::AttributeProperties::isBool(), GNEAttributeCarrier::AttributeProperties::isColor(), GNEAttributeCarrier::AttributeProperties::isFloat(), GNEAttributeCarrier::AttributeProperties::isInt(), myAttrProperties, myBoolCheckButton, myColorEditor, myInvalidValue, myLabel, myTextFieldInt, myTextFieldReal, myTextFieldStrings, myXMLAttr, GNEFrame::show(), and toString().
|
private |
pointer to ACAttributes
Definition at line 147 of file GNEFrame.h.
Referenced by getACAttributesParent(), and onCmdSetAttribute().
|
private |
attribute properties
Definition at line 150 of file GNEFrame.h.
Referenced by getValue(), onCmdSetAttribute(), onCmdSetColorAttribute(), and showParameter().
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 168 of file GNEFrame.h.
Referenced by ACAttributeRow(), getValue(), hideParameter(), onCmdSetBooleanAttribute(), and showParameter().
|
private |
Button for open color editor.
Definition at line 171 of file GNEFrame.h.
Referenced by ACAttributeRow(), hideParameter(), and showParameter().
|
private |
string which indicates the reason due current value is invalid
Definition at line 174 of file GNEFrame.h.
Referenced by isAttributeValid(), onCmdSetAttribute(), and showParameter().
|
private |
lael with the name of the parameter
Definition at line 156 of file GNEFrame.h.
Referenced by ACAttributeRow(), hideParameter(), and showParameter().
|
private |
textField to modify the default value of int/float/string parameters
Definition at line 159 of file GNEFrame.h.
Referenced by ACAttributeRow(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().
|
private |
textField to modify the default value of real/times parameters
Definition at line 162 of file GNEFrame.h.
Referenced by ACAttributeRow(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().
|
private |
textField to modify the default value of string parameters
Definition at line 165 of file GNEFrame.h.
Referenced by ACAttributeRow(), getValue(), hideParameter(), onCmdSetAttribute(), onCmdSetColorAttribute(), and showParameter().
|
private |
current XML attribute
Definition at line 153 of file GNEFrame.h.
Referenced by getAttr(), hideParameter(), onCmdSetAttribute(), and showParameter().