![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEFrameAttributesModuls.h>
Public Member Functions | |
AttributesCreatorRow (AttributesCreator *AttributesCreatorParent, const GNEAttributeProperties &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... | |
AttributesCreator * | getAttributesCreatorParent () const |
get AttributesCreator parent More... | |
const GNEAttributeProperties & | 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 | refreshRow () const |
refresh row More... | |
void | setAttributeCheckButtonCheck (bool value) |
enable or disable label checkbox button for optional 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... | |
Protected Member Functions | |
std::string | checkComplexAttribute (const std::string &value) |
check if given complex attribute is valid More... | |
std::string | generateID () const |
generate ID More... | |
bool | isValidID () const |
check if current ID placed in myValueTextField is valid More... | |
Private Attributes | |
FXCheckButton * | myAttributeCheckButton = nullptr |
check button to enable/disable Label attribute More... | |
FXButton * | myAttributeColorButton = nullptr |
Button for open color editor. More... | |
FXLabel * | myAttributeLabel = nullptr |
Label with the name of the attribute. More... | |
AttributesCreator * | myAttributesCreatorParent = nullptr |
pointer to AttributesCreator More... | |
const GNEAttributeProperties | myAttrProperties |
attribute properties 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... | |
FXTextField * | myValueTextField = nullptr |
textField to modify the default value of string parameters More... | |
Definition at line 53 of file GNEFrameAttributesModuls.h.
GNEFrameAttributesModuls::AttributesCreatorRow::AttributesCreatorRow | ( | AttributesCreator * | AttributesCreatorParent, |
const GNEAttributeProperties & | attrProperties | ||
) |
FOX-declaration.
constructor
Definition at line 113 of file GNEFrameAttributesModuls.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButton, GUIDesignCheckButtonAttribute, GUIDesignLabelAttribute, GUIDesignTextField, GUIDesignTextFieldNCol, MID_GNE_SET_ATTRIBUTE, MID_GNE_SET_ATTRIBUTE_BOOL, MID_GNE_SET_ATTRIBUTE_DIALOG, SUMO_ATTR_EXTENSION, SUMO_ATTR_ID, SUMO_ATTR_PARKING, and SUMO_ATTR_UNTIL.
|
protected |
check if given complex attribute is valid
Definition at line 510 of file GNEFrameAttributesModuls.cpp.
References 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.
void GNEFrameAttributesModuls::AttributesCreatorRow::destroy | ( | ) |
destroy AttributesCreatorRow (but don't delete)
Definition at line 205 of file GNEFrameAttributesModuls.cpp.
void GNEFrameAttributesModuls::AttributesCreatorRow::disableAttributesCreatorRow | ( | ) |
disable row
Definition at line 273 of file GNEFrameAttributesModuls.cpp.
void GNEFrameAttributesModuls::AttributesCreatorRow::enableAttributesCreatorRow | ( | ) |
enable row
Definition at line 263 of file GNEFrameAttributesModuls.cpp.
|
protected |
generate ID
Definition at line 568 of file GNEFrameAttributesModuls.cpp.
bool GNEFrameAttributesModuls::AttributesCreatorRow::getAttributeCheckButtonCheck | ( | ) | const |
return status of label checkbox button
Definition at line 230 of file GNEFrameAttributesModuls.cpp.
GNEFrameAttributesModuls::AttributesCreator * GNEFrameAttributesModuls::AttributesCreatorRow::getAttributesCreatorParent | ( | ) | const |
get AttributesCreator parent
Definition at line 310 of file GNEFrameAttributesModuls.cpp.
const GNEAttributeProperties & GNEFrameAttributesModuls::AttributesCreatorRow::getAttrProperties | ( | ) | const |
return Attr
Definition at line 214 of file GNEFrameAttributesModuls.cpp.
std::string GNEFrameAttributesModuls::AttributesCreatorRow::getValue | ( | ) | const |
return value
Definition at line 220 of file GNEFrameAttributesModuls.cpp.
bool GNEFrameAttributesModuls::AttributesCreatorRow::isAttributesCreatorRowEnabled | ( | ) | const |
check if row is enabled
Definition at line 283 of file GNEFrameAttributesModuls.cpp.
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 304 of file GNEFrameAttributesModuls.cpp.
|
protected |
check if current ID placed in myValueTextField is valid
Definition at line 582 of file GNEFrameAttributesModuls.cpp.
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSelectCheckButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press a check button
Definition at line 473 of file GNEFrameAttributesModuls.cpp.
Referenced by FXDEFMAP().
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSelectColorButton | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the "Color" button
Definition at line 490 of file GNEFrameAttributesModuls.cpp.
References MFXUtils::getFXColor(), MFXUtils::getRGBColor(), RGBColor::parseColor(), and toString().
Referenced by FXDEFMAP().
long GNEFrameAttributesModuls::AttributesCreatorRow::onCmdSetAttribute | ( | FXObject * | obj, |
FXSelector | , | ||
void * | |||
) |
Definition at line 316 of file GNEFrameAttributesModuls.cpp.
References GUITexturesHelper::getTextureID(), SUMOXMLDefinitions::isValidAttribute(), SUMOXMLDefinitions::isValidDetectorID(), SUMOXMLDefinitions::isValidFilename(), SUMOXMLDefinitions::isValidListOfTypeID(), SUMOXMLDefinitions::isValidNetID(), SUMOXMLDefinitions::isValidTypeID(), SUMOXMLDefinitions::isValidVehicleID(), SUMO_ATTR_ANGLE, SUMO_ATTR_EXPECTED, SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_FREQUENCY, SUMO_ATTR_ID, SUMO_ATTR_IMGFILE, SUMO_ATTR_INDEX, SUMO_ATTR_LENGTH, SUMO_ATTR_NAME, SUMO_ATTR_TRIP_ID, SUMO_ATTR_VTYPES, SUMO_TAG_E2DETECTOR, and toString().
Referenced by FXDEFMAP().
void GNEFrameAttributesModuls::AttributesCreatorRow::refreshRow | ( | ) | const |
void GNEFrameAttributesModuls::AttributesCreatorRow::setAttributeCheckButtonCheck | ( | bool | value | ) |
enable or disable label checkbox button for optional attributes
Definition at line 240 of file GNEFrameAttributesModuls.cpp.
|
private |
check button to enable/disable Label attribute
Definition at line 132 of file GNEFrameAttributesModuls.h.
|
private |
Button for open color editor.
Definition at line 135 of file GNEFrameAttributesModuls.h.
|
private |
Label with the name of the attribute.
Definition at line 129 of file GNEFrameAttributesModuls.h.
|
private |
pointer to AttributesCreator
Definition at line 120 of file GNEFrameAttributesModuls.h.
|
private |
attribute properties
Definition at line 123 of file GNEFrameAttributesModuls.h.
|
private |
string which indicates the reason due current value is invalid
Definition at line 126 of file GNEFrameAttributesModuls.h.
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 141 of file GNEFrameAttributesModuls.h.
|
private |
textField to modify the default value of string parameters
Definition at line 138 of file GNEFrameAttributesModuls.h.