![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEPolygonFrame.h>
Public Member Functions | |
SumoXMLAttr | getAttr () const |
return Attr More... | |
SumoXMLTag | getTag () const |
return tag 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... | |
ShapeAttributeSingle (FXComposite *parent) | |
FOX-declaration. More... | |
void | showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, std::string value) |
show name and value of attribute of type string More... | |
void | showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, int value) |
show name and value of parameters of type int More... | |
void | showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, double value) |
show name and value of parameters of type float/real/time More... | |
void | showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, bool value) |
show name and value of parameters of type bool More... | |
void | showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, RGBColor value) |
show name and value of parameters of type Color More... | |
~ShapeAttributeSingle () | |
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 | |
ShapeAttributeSingle () | |
FOX needs this. More... | |
Private Attributes | |
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... | |
SumoXMLAttr | myShapeAttr |
current XML attribute More... | |
SumoXMLTag | myShapeTag |
current XML attribute 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... | |
Definition at line 66 of file GNEPolygonFrame.h.
GNEPolygonFrame::ShapeAttributeSingle::ShapeAttributeSingle | ( | FXComposite * | parent | ) |
FOX-declaration.
constructor
Definition at line 394 of file GNEPolygonFrame.cpp.
References GUIDesignButtonAttribute, GUIDesignCheckButtonAttribute, GUIDesignLabelAttribute, GUIDesignTextField, GUIDesignTextFieldInt, GUIDesignTextFieldNCol, GUIDesignTextFieldReal, hideParameter(), MID_GNE_ADDITIONALFRAME_CHANGEPARAMETER_BOOL, MID_GNE_ADDITIONALFRAME_CHANGEPARAMETER_TEXT, MID_GNE_INSPECTORFRAME_ATTRIBUTEEDITOR, myBoolCheckButton, mycolorEditor, myLabel, myTextFieldInt, myTextFieldReal, and myTextFieldStrings.
GNEPolygonFrame::ShapeAttributeSingle::~ShapeAttributeSingle | ( | ) |
destructor
Definition at line 410 of file GNEPolygonFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 121 of file GNEPolygonFrame.h.
SumoXMLAttr GNEPolygonFrame::ShapeAttributeSingle::getAttr | ( | ) | const |
SumoXMLTag GNEPolygonFrame::ShapeAttributeSingle::getTag | ( | ) | const |
std::string GNEPolygonFrame::ShapeAttributeSingle::getValue | ( | ) | const |
return value
Definition at line 515 of file GNEPolygonFrame.cpp.
References GNEAttributeCarrier::isBool(), GNEAttributeCarrier::isFloat(), GNEAttributeCarrier::isInt(), GNEAttributeCarrier::isTime(), myBoolCheckButton, myShapeAttr, myShapeTag, myTextFieldInt, myTextFieldReal, and myTextFieldStrings.
void GNEPolygonFrame::ShapeAttributeSingle::hideParameter | ( | ) |
hide all parameters
Definition at line 489 of file GNEPolygonFrame.cpp.
References GNEFrame::hide(), myBoolCheckButton, mycolorEditor, myLabel, myShapeAttr, myShapeTag, myTextFieldInt, myTextFieldReal, myTextFieldStrings, SUMO_ATTR_NOTHING, and SUMO_TAG_NOTHING.
Referenced by ShapeAttributeSingle().
const std::string & GNEPolygonFrame::ShapeAttributeSingle::isAttributeValid | ( | ) | const |
returns a empty string if current value is valid, a string with information about invalid value in other case
Definition at line 529 of file GNEPolygonFrame.cpp.
References myInvalidValue.
long GNEPolygonFrame::ShapeAttributeSingle::onCmdSetAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 535 of file GNEPolygonFrame.cpp.
References GUITexturesHelper::getTextureID(), GNEAttributeCarrier::isColor(), GNEAttributeCarrier::isFilename(), GNEAttributeCarrier::isFloat(), GNEAttributeCarrier::isInt(), GNEAttributeCarrier::isPositive(), GNEAttributeCarrier::isProbability(), GNEAttributeCarrier::isTime(), GNEAttributeCarrier::isValidFilename(), myInvalidValue, myShapeAttr, myShapeTag, myTextFieldInt, myTextFieldReal, myTextFieldStrings, SUMO_ATTR_IMGFILE, and toString().
long GNEPolygonFrame::ShapeAttributeSingle::onCmdSetBooleanAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user change the value of myBoolCheckButton
Definition at line 616 of file GNEPolygonFrame.cpp.
References myBoolCheckButton.
long GNEPolygonFrame::ShapeAttributeSingle::onCmdSetColorAttribute | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press the "Color" button
Definition at line 626 of file GNEPolygonFrame.cpp.
References MFXUtils::getFXColor(), MFXUtils::getRGBColor(), myTextFieldStrings, RGBColor::parseColor(), and toString().
void GNEPolygonFrame::ShapeAttributeSingle::showParameter | ( | SumoXMLTag | shapeTag, |
SumoXMLAttr | shapeAttr, | ||
std::string | value | ||
) |
show name and value of attribute of type string
Definition at line 414 of file GNEPolygonFrame.cpp.
References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldStrings, GNEPolygonFrame::show(), and toString().
void GNEPolygonFrame::ShapeAttributeSingle::showParameter | ( | SumoXMLTag | shapeTag, |
SumoXMLAttr | shapeAttr, | ||
int | value | ||
) |
show name and value of parameters of type int
Definition at line 428 of file GNEPolygonFrame.cpp.
References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldInt, GNEPolygonFrame::show(), and toString().
void GNEPolygonFrame::ShapeAttributeSingle::showParameter | ( | SumoXMLTag | shapeTag, |
SumoXMLAttr | shapeAttr, | ||
double | value | ||
) |
show name and value of parameters of type float/real/time
Definition at line 442 of file GNEPolygonFrame.cpp.
References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldReal, GNEPolygonFrame::show(), and toString().
void GNEPolygonFrame::ShapeAttributeSingle::showParameter | ( | SumoXMLTag | shapeTag, |
SumoXMLAttr | shapeAttr, | ||
bool | value | ||
) |
show name and value of parameters of type bool
Definition at line 456 of file GNEPolygonFrame.cpp.
References myBoolCheckButton, myInvalidValue, myLabel, myShapeAttr, myShapeTag, GNEPolygonFrame::show(), and toString().
void GNEPolygonFrame::ShapeAttributeSingle::showParameter | ( | SumoXMLTag | shapeTag, |
SumoXMLAttr | shapeAttr, | ||
RGBColor | value | ||
) |
show name and value of parameters of type Color
Definition at line 475 of file GNEPolygonFrame.cpp.
References mycolorEditor, myInvalidValue, myShapeAttr, myShapeTag, myTextFieldStrings, GNEPolygonFrame::show(), and toString().
|
private |
check button to enable/disable the value of boolean parameters
Definition at line 143 of file GNEPolygonFrame.h.
Referenced by getValue(), hideParameter(), onCmdSetBooleanAttribute(), ShapeAttributeSingle(), and showParameter().
|
private |
Button for open color editor.
Definition at line 146 of file GNEPolygonFrame.h.
Referenced by hideParameter(), ShapeAttributeSingle(), and showParameter().
|
private |
string which indicates the reason due current value is invalid
Definition at line 149 of file GNEPolygonFrame.h.
Referenced by isAttributeValid(), onCmdSetAttribute(), and showParameter().
|
private |
lael with the name of the parameter
Definition at line 131 of file GNEPolygonFrame.h.
Referenced by hideParameter(), ShapeAttributeSingle(), and showParameter().
|
private |
current XML attribute
Definition at line 128 of file GNEPolygonFrame.h.
Referenced by getAttr(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().
|
private |
current XML attribute
Definition at line 125 of file GNEPolygonFrame.h.
Referenced by getTag(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().
|
private |
textField to modify the default value of int/float/string parameters
Definition at line 134 of file GNEPolygonFrame.h.
Referenced by getValue(), hideParameter(), onCmdSetAttribute(), ShapeAttributeSingle(), and showParameter().
|
private |
textField to modify the default value of real/times parameters
Definition at line 137 of file GNEPolygonFrame.h.
Referenced by getValue(), hideParameter(), onCmdSetAttribute(), ShapeAttributeSingle(), and showParameter().
|
private |
textField to modify the default value of string parameters
Definition at line 140 of file GNEPolygonFrame.h.
Referenced by getValue(), hideParameter(), onCmdSetAttribute(), onCmdSetColorAttribute(), ShapeAttributeSingle(), and showParameter().