55 myAttributesCreatorParent(AttributesCreatorParent),
56 myAttrProperties(attrProperties) {
59 AttributesCreatorParent->getFrameParent()->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
61 myAttributeLabel->hide();
63 myEnableAttributeCheckButton->hide();
65 myAttributeButton->hide();
68 myValueTextField->hide();
70 myValueCheckButton->hide();
72 myValueComboBox->hide();
74 if (getParent()->
id()) {
76 FXHorizontalFrame::create();
88 if (getParent()->
id()) {
89 FXHorizontalFrame::destroy();
364 if (useDefaultValue) {
394 if (useDefaultValue) {
416 bool acceptChanges =
false;
420 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
421 colordialog.setTarget(
this);
423 if (GNEAttributeCarrier::canParse<RGBColor>(
myValueTextField->getText().text())) {
429 if (colordialog.execute()) {
FXDEFMAP(GNEAttributesCreatorRow) RowCreatorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trough dialog
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
const std::string & getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
@ SUMO_ATTR_COLOR
A color information.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog for edit rerouters.
virtual void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_EnableAttribute)
virtual bool isAttributeEnabled(SumoXMLAttr key) const
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool isColor() const
return true if atribute is a color
bool isBool() const
return true if atribute is boolean
const std::string & getAttrStr() const
get XML Attribute
bool isDiscrete() const
return true if atribute is discrete
const std::string & getDefaultValue() const
get default value
const std::string & getDefinition() const
get default value
bool hasDefaultValue() const
return true if attribute owns a default value
bool isActivatable() const
return true if atribute is activatable
const std::vector< std::string > & getDiscreteValues() const
get discrete values
SumoXMLAttr getAttr() const
get XML Attribute
const GNETagProperties & getTagPropertyParent() const
get reference to tagProperty parent
bool hasAutomaticID() const
return true if attribute ID can generate an automatic ID
GNEAttributeCarrier * getCurrentTemplateAC() const
get current template AC
GNEFrame * getFrameParent() const
return frame parent
void refreshAttributesCreator()
refresh attribute creator
std::string generateID() const
generate ID
MFXLabelTooltip * myAttributeLabel
Label with the name of the attribute.
FXTextField * myValueTextField
textField to modify the default value of string parameters
FXCheckButton * myValueCheckButton
check button to enable/disable the value of boolean parameters
void enableAttributesCreatorRow()
enable row
bool getAttributeCheckButtonCheck() const
return status of label checkbox button
void refreshRow()
refresh row
void disableRow()
disable Rows
bool isValidID() const
check if current ID placed in myValueTextField is valid
bool isAttributesCreatorRowEnabled() const
check if row is enabled
long onCmdSetAttribute(FXObject *, FXSelector, void *)
FXComboBox * myValueComboBox
comboBox for discrete vaues
std::string getValue() const
return value
void destroy()
destroy GNEAttributesCreatorRow (but don't delete)
bool isAttributeValid() const
check if current attribute is valid
void disableAttributesCreatorRow()
disable row
long onCmdOpenAttributeDialog(FXObject *, FXSelector, void *)
called when user press the open dialog button
void setAttributeCheckButtonCheck(bool value)
enable or disable label checkbox button for Terminatel attributes
GNEAttributesCreator * myAttributesCreatorParent
pointer to GNEAttributesCreator
FXCheckButton * myEnableAttributeCheckButton
check button to enable/disable Label attribute
const GNEAttributeProperties & getAttrProperties() const
return Attr
std::string myInvalidValue
string which indicates the reason due current value is invalid
const GNEAttributeProperties myAttrProperties
attribute properties
FXButton * myAttributeButton
Button for open color or allow/disallow editor.
GNEAttributesCreator * getAttributesCreatorParent() const
get GNEAttributesCreator parent
GNEViewNet * getViewNet() const
get view net
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
bool isStop() const
return true if tag correspond to a stop element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
GNENet * getNet() const
get the net object
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor