107 myAttributesCreatorParent(AttributesCreatorParent),
108 myAttrProperties(attrProperties) {
111 myAttributeLabel->hide();
113 myAttributeRadioButton->hide();
115 myAttributeCheckButton->hide();
117 myAttributeColorButton->hide();
120 myValueTextFieldInt->hide();
122 myValueTextFieldReal->hide();
124 myValueTextFieldStrings->hide();
126 myValueCheckButton->hide();
128 if ((attrProperties.getTagPropertyParent().isStop() || attrProperties.getTagPropertyParent().isPersonStop()) && (attrProperties.getAttr() ==
SUMO_ATTR_UNTIL)) {
129 myAttributeCheckButton->setCheck(FALSE);
131 myAttributeCheckButton->setCheck(TRUE);
134 if (getParent()->
id()) {
136 FXHorizontalFrame::create();
140 if (myAttrProperties.isColor()) {
141 myAttributeColorButton->setTextColor(FXRGB(0, 0, 0));
142 myAttributeColorButton->setText(myAttrProperties.getAttrStr().c_str());
143 myAttributeColorButton->show();
144 }
else if (myAttrProperties.isEnablitable()) {
145 myAttributeRadioButton->setTextColor(FXRGB(0, 0, 0));
146 myAttributeRadioButton->setText(myAttrProperties.getAttrStr().c_str());
147 myAttributeRadioButton->show();
148 }
else if (myAttrProperties.isOptional()) {
149 myAttributeCheckButton->setText(myAttrProperties.getAttrStr().c_str());
150 myAttributeCheckButton->show();
152 myAttributeLabel->setText(myAttrProperties.getAttrStr().c_str());
153 myAttributeLabel->show();
155 if (myAttrProperties.isInt()) {
156 myValueTextFieldInt->setTextColor(FXRGB(0, 0, 0));
157 myValueTextFieldInt->setText(attrProperties.getDefaultValue().c_str());
158 myValueTextFieldInt->show();
160 if (myAttributeRadioButton->shown() && (myAttributeRadioButton->getCheck() == FALSE)) {
161 myValueTextFieldInt->disable();
164 if (myAttributeCheckButton->shown() && (myAttributeCheckButton->getCheck() == FALSE)) {
165 myValueTextFieldInt->disable();
167 }
else if (myAttrProperties.isFloat() || myAttrProperties.isSUMOTime()) {
168 myValueTextFieldReal->setTextColor(FXRGB(0, 0, 0));
169 myValueTextFieldReal->setText(attrProperties.getDefaultValue().c_str());
170 myValueTextFieldReal->show();
172 if (myAttributeRadioButton->shown() && (myAttributeRadioButton->getCheck() == FALSE)) {
173 myValueTextFieldReal->disable();
176 if (myAttributeCheckButton->shown() && (myAttributeCheckButton->getCheck() == FALSE)) {
177 myValueTextFieldReal->disable();
179 }
else if (myAttrProperties.isBool()) {
180 if (GNEAttributeCarrier::parse<bool>(attrProperties.getDefaultValue())) {
181 myValueCheckButton->setCheck(
true);
182 myValueCheckButton->setText(
"true");
184 myValueCheckButton->setCheck(
false);
185 myValueCheckButton->setText(
"false");
187 myValueCheckButton->show();
189 if (myAttributeRadioButton->shown() && (myAttributeRadioButton->getCheck() == FALSE)) {
190 myValueCheckButton->disable();
193 if (myAttributeCheckButton->shown() && (myAttributeCheckButton->getCheck() == FALSE)) {
194 myValueCheckButton->disable();
197 myValueTextFieldStrings->setTextColor(FXRGB(0, 0, 0));
198 myValueTextFieldStrings->setText(attrProperties.getDefaultValue().c_str());
199 myValueTextFieldStrings->show();
201 if (myAttributeRadioButton->shown() && (myAttributeRadioButton->getCheck() == FALSE)) {
202 myValueTextFieldStrings->disable();
205 if (myAttributeCheckButton->shown() && (myAttributeCheckButton->getCheck() == FALSE)) {
206 myValueTextFieldStrings->disable();
218 if (getParent()->
id()) {
219 FXHorizontalFrame::destroy();
417 double doubleValue = GNEAttributeCarrier::parse<double>(
myValueTextFieldReal->getText().text());
441 myInvalidValue =
"input contains invalid characters for a filename";
465 if ((index !=
"fit") && (index !=
"end") && !GNEAttributeCarrier::canParse<int>(index)) {
466 myInvalidValue =
"index isn't either 'fit' or 'end' or a valid positive int";
467 }
else if (GNEAttributeCarrier::canParse<int>(index) && (GNEAttributeCarrier::parse<int>(index) < 0)) {
472 std::vector<std::string> vehicleIDs = GNEAttributeCarrier::parse<std::vector<std::string> >(
myValueTextFieldStrings->getText().text());
474 for (
const auto &i : vehicleIDs) {
530 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
531 colordialog.setTarget(
this);
539 if (colordialog.execute()) {
559 std::string errorMessage;
619 myFrameParent(frameParent) {
667 std::map<SumoXMLAttr, std::string>
669 std::map<SumoXMLAttr, std::string> values;
682 if (rowEnabled && (includeAll || hasDefaultStaticValue || isEnablitableAttribute || isOptionalAttribute)) {
699 std::string errorMessage;
705 if (attributeValue.size() != 0) {
706 errorMessage = attributeValue;
711 if (extra.size() == 0) {
712 errorMessage =
"Invalid input parameter of " + myTagProperties.getTagStr() +
": " + errorMessage;
714 errorMessage =
"Invalid input parameter of " + myTagProperties.getTagStr() +
": " + extra;
747 if (row ==
nullptr) {
841 myAttributesEditorParent(attributeEditorParent),
875 if (getParent()->
id()) {
877 FXHorizontalFrame::create();
919 if (attributeEnabled) {
932 bool allBooleanValuesEqual =
true;
934 std::vector<bool> booleanVector;
937 booleanVector = GNEAttributeCarrier::parse<std::vector<bool> >(value);
940 for (
const auto& i : booleanVector) {
941 if (i != booleanVector.front()) {
942 allBooleanValuesEqual =
false;
946 if (allBooleanValuesEqual) {
948 if ((booleanVector.size() > 0) && booleanVector.front()) {
1053 if (getParent()->
id()) {
1054 FXHorizontalFrame::destroy();
1125 if (GNEAttributeCarrier::canParse<bool>(value)) {
1179 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
1180 colordialog.setTarget(
this);
1190 if (colordialog.execute()) {
1228 throw ProcessError(
"Invalid call to onCmdOpenAttributeDialog");
1406 std::string result(stringValue);
1407 while (result.find(
", ") != std::string::npos) {
1419 myFrameParent(FrameParent),
1420 myIncludeExtended(true) {
1443 for (
const auto& i :
myEditedACs.front()->getTagProperty()) {
1449 if (i.isExtended() && !includeExtended) {
1453 std::set<std::string> occuringValues;
1455 occuringValues.insert(it_ac->getAttribute(i.getAttr()));
1458 std::ostringstream oss;
1459 for (
auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) {
1460 if (it_val != occuringValues.begin()) {
1465 std::string value = oss.str();
1471 for (
const auto& it_ac : myEditedACs) {
1481 bool attributeEnabled = i.isEnablitable() ? myEditedACs.front()->isAttributeEnabled(i.getAttr()) :
true;
1504 for (
const auto& i :
myEditedACs.front()->getTagProperty()) {
1510 std::set<std::string> occuringValues;
1512 occuringValues.insert(it_ac->getAttribute(i.getAttr()));
1515 std::ostringstream oss;
1516 for (
auto it_val = occuringValues.begin(); it_val != occuringValues.end(); it_val++) {
1517 if (it_val != occuringValues.begin()) {
1523 bool attributeEnabled = i.isEnablitable() ? myEditedACs.front()->isAttributeEnabled(i.getAttr()) :
true;
1526 myAttributesEditorRows[i.getPositionListed()]->refreshAttributesEditorRow(oss.str(),
true, attributeEnabled);
1529 myAttributesEditorRows[i.getPositionListed()]->refreshAttributesEditorRow(oss.str(),
true, attributeEnabled);
1532 myAttributesEditorRows[i.getPositionListed()]->refreshAttributesEditorRow(oss.str(),
false, attributeEnabled);
1545 const std::vector<GNEAttributeCarrier*>&
1622 myGenericParameters(nullptr) {
1638 if (AC !=
nullptr) {
1655 if (ACs.size() > 0) {
1659 bool differentsGenericParameters =
false;
1661 for (
auto i :
myACs) {
1663 differentsGenericParameters =
true;
1667 if (differentsGenericParameters) {
1703 }
else if (
myACs.size() > 0) {
1706 for (
auto i :
myACs) {
1708 genericParameter =
"different generic attributes";
1731 result += i->first +
"=" + i->second +
"|";
1734 if (!result.empty()) {
1752 }
else if (
myACs.size() > 0) {
1754 for (
auto i :
myACs) {
1774 std::vector<std::string> parsedValues;
1776 while (st.hasNext()) {
1777 parsedValues.push_back(st.next());
1780 for (
auto i : parsedValues) {
1782 WRITE_WARNING(
"Invalid format of Generic Parameter (" + i +
")");
1788 std::sort(parsedValues.begin(), parsedValues.end());
1789 for (
auto i = parsedValues.begin(); i != parsedValues.end(); i++) {
1790 if (((i + 1) != parsedValues.end())) {
1791 std::vector<std::string> firstKey, secondKey;
1796 firstKey.push_back(stKey1.
next());
1799 secondKey.push_back(stKey2.
next());
1802 if ((firstKey.size() != 2) || (secondKey.size() != 2) || (firstKey.front() == secondKey.front())) {
1803 WRITE_WARNING(
"Generic Parameters wit the same key aren't allowed (" + (*i) +
"," + * (i + 1) +
")");
1814 for (
auto i : parsedValues) {
1815 std::vector<std::string> parsedParameters;
1818 parsedParameters.push_back(stParam.
next());
1822 myGenericParameters->push_back(std::make_pair(parsedParameters.front(), parsedParameters.back()));
1828 }
else if (
myACs.size() > 0) {
1830 for (
auto i :
myACs) {
1847 myDeleteLastCreatedPoint(false) {
1854 std::ostringstream information;
1856 <<
"- 'Start drawing' or ENTER\n" 1857 <<
" draws shape boundary.\n" 1858 <<
"- 'Stop drawing' or ENTER\n" 1859 <<
" creates shape.\n" 1860 <<
"- 'Shift + Click'\n" 1861 <<
" removes last created point.\n" 1862 <<
"- 'Abort drawing' or ESC\n" 1863 <<
" removes drawed shape.";
1937 throw ProcessError(
"A new point cannot be added if drawing wasn't started");
1999 myCurrentLengthValid(true),
2000 myActualAdditionalReferencePoint(GNE_ADDITIONALREFERENCEPOINT_LEFT) {
2038 bool showFrame =
false;
2097 if (lane ==
nullptr) {
2104 std::string errorMessage =
"Current selected reference point isn't valid";
2111 double lenght = GNEAttributeCarrier::parse<double>(
myLengthTextField->getText().text());
2171 if (GNEAttributeCarrier::canParse<double>(
myLengthTextField->getText().text()) &&
2211 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(
this,
"Netedit Parameters Help",
GUIDesignDialogBox);
2214 std::ostringstream help;
2216 <<
"- Referece point: Mark the initial position of the additional element.\n" 2217 <<
" Example: If you want to create a busStop with a length of 30 in the point 100 of the lane:\n" 2218 <<
" - Reference Left will create it with startPos = 70 and endPos = 100.\n" 2219 <<
" - Reference Right will create it with startPos = 100 and endPos = 130.\n" 2220 <<
" - Reference Center will create it with startPos = 85 and endPos = 115.\n" 2222 <<
"- Block movement: if is enabled, the created additional element will be blocked. i.e. cannot be moved with\n" 2223 <<
" the mouse. This option can be modified inspecting element.";
2235 WRITE_DEBUG(
"Opening NeteditAttributes help dialog");
2237 additionalNeteditAttributesHelpDialog->create();
2239 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
2241 getApp()->refresh();
2243 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
2245 WRITE_DEBUG(
"Closing NeteditAttributes help dialog");
2266 return positionOfTheMouseOverLane;
2268 return positionOfTheMouseOverLane - lengthOfAdditional;
2270 return positionOfTheMouseOverLane - lengthOfAdditional / 2;
2281 return positionOfTheMouseOverLane + lengthOfAdditional;
2283 return positionOfTheMouseOverLane;
2285 return positionOfTheMouseOverLane + lengthOfAdditional / 2;
std::string getGenericParametersStr() const
get generic parameters as string
double setStartPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const
obtain the Start position values of StoppingPlaces and E2 detector over the lane
bool isPersonStop() const
return true if tag correspond to a person stop element
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
bool getDeleteLastCreatedPoint()
get flag delete last created point
void destroy()
destroy AttributesCreatorRow (but don't delete)
const bool myMultiple
flag to check if input element contains multiple values
const std::string & getAttrStr() const
get XML Attribute
#define GUIDesignComboBoxNCol
number of column of every combo box
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
static RGBColor parseColor(std::string coldef)
Parses a color information.
FXRadioButton * myAttributeRadioButton
Radio button for disjoint attributes.
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
description of a vehicle type
static bool parseArrivalPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosLatDefinition &apd, std::string &error)
Validates a given arrivalPosLat value.
attribute selected using a radio button
DrawingShape()
FOX needs this.
PositionVector shape
The shape of the netElement element.
void enableAttributesCreatorRow()
enable row
FXCheckButton * myBlockShapeCheckButton
checkBox for block shape
void destroy()
destroy AttributesCreatorRow (but don't delete)
long onCmdSelectCheckButton(FXObject *, FXSelector, void *)
called when user press a check button
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed) ...
void hideAttributesCreatorModul()
hide group box
AttributesCreator * myAttributesCreatorParent
pointer to AttributesCreator
begin/end of the description of a junction
PositionVector myTemporalShapeShape
current drawed shape
bool isStop() const
return true if tag correspond to a stop element
void update() const
Mark the entire GNEViewNet to be repainted later.
void showGenericParametersEditor(GNEAttributeCarrier *AC)
show netedit attributes editor (used for edit generic parameters of an existent AC) ...
a flow definitio nusing a from-to edges instead of a route (used by router)
block shape of a graphic element (Used mainly in GNEShapes)
const GNEAttributeCarrier::AttributeProperties myACAttr
current AC Attribute
FXCheckButton * myValueCheckButton
pointer to menu check
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
long onCmdSelectRadioButton(FXObject *, FXSelector, void *)
called when user press a radio button
FXLabel * myBlockShapeLabel
Label for block shape.
bool isDemandElement() const
return true if tag correspond to a demand element
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT) ...
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
bool isCombinable() const
return true if atribute is combinable with other Attribute
std::string checkComplexAttribute(const std::string &value)
check if given complex attribute is valid
void setAttributeRadioButtonCheck(bool value)
enable or disable radio button for disjoint attributes
connectio between two lanes
long onCmdSelectRadioButton(FXObject *, FXSelector, void *)
set new disjoint attribute
NeteditAttributes()
FOX needs this.
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show AttributesCreator modul
struct with the attribute Properties
bool isFilename() const
return true if atribute is a filename
bool isPositive() const
return true if atribute is positive
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
std::vector< AttributesCreatorRow * > myAttributesCreatorRows
vector with the AttributesCreatorRow
FXTextField * myValueTextFieldStrings
textField to modify the default value of string parameters
bool isComplex() const
return true if atribute is complex
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Close shape of a polygon (Used by GNEPolys)
weights: time range begin
link,node: the traffic light id responsible for this link
std::string getValue() const
return value
long onCmdSetAttribute(FXObject *, FXSelector, void *)
try to set new attribute value
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
GNEFrame * myFrameParent
pointer to frame parent
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void hideNeteditAttributesModul()
hide Netedit attributes modul
const std::string DEFAULT_BIKETYPE_ID
AttributesEditor * myAttributesEditorParent
pointer to AttributesEditor parent
static const RGBColor BLACK
FXCheckButton * myBlockMovementCheckButton
checkBox for block movement
FXButton * myEditGenericParameterButton
button for add generic parameter
long onCmdSelectColorButton(FXObject *, FXSelector, void *)
called when user press the "Color" button
bool hasNext()
returns the information whether further substrings exist
AdditionalReferencePoint myActualAdditionalReferencePoint
actual additional reference point selected in the match Box
AttributesEditorRow()
FOX needs this.
ArrivalPosLatDefinition
Possible ways to choose the departure position.
long onCmdOpenDialog(FXObject *, FXSelector, void *)
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
FXButton * myAbortDrawingButton
button for abort drawing
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
const std::string DEFAULT_VTYPE_ID
FXButton * myStartDrawingButton
button for start drawing
virtual std::string getAttribute(SumoXMLAttr key) const =0
FXDEFMAP(GNEFrameAttributesModuls::AttributesCreatorRow) RowCreatorMap[]
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
virtual std::vector< std::pair< std::string, std::string > > getGenericParameters() const =0
return generic parameters as vector of pairs format
bool hasStaticDefaultValue() const
return true if attribute owns a static default value
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
bool isProbability() const
return true if atribute is a probability
bool isNonEditable() const
return true if atribute isn't editable
FXButton * helpReferencePoint
Button for help about the reference point.
FXLabel * myClosePolygonLabel
Label for open/close polygon.
#define WRITE_WARNING(msg)
GNEFrame * myFrameParent
pointer to Frame Parent
bool areValuesValid() const
check if parameters of attributes are valid
bool isInt() const
return true if atribute is an integer
#define GUIDesignComboBox
GNEViewNet * myViewNet
View Net.
FXTextField * myValueTextFieldReal
textField to modify the value of real/Time attributes
bool isColor() const
return true if atribute is a color
Dialog for edit generic parameters.
const PositionVector & getTemporalShape() const
get Temporal shape
void showNeteditAttributesModul(const GNEAttributeCarrier::TagProperties &tagValue)
show Netedit attributes modul
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
const GNEAttributeCarrier::AttributeProperties myAttrProperties
attribute properties
GNEFrame * myFrameParent
pointer to GNEFrame parent
GNEUndoList * getUndoList() const
get the undoList object
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
static const int InvalidTlIndex
std::vector< std::pair< std::string, std::string > > * myGenericParameters
pointer to current vector of generic parameters
GNEAttributeCarrier::TagProperties getCurrentTagProperties() const
get current edited Tag Properties
long onCmdHelp(FXObject *, FXSelector, void *)
FXTextField * myValueTextFieldStrings
textField to modify the value of string attributes
std::string stripWhitespaceAfterComma(const std::string &stringValue)
removed invalid spaces of Positions and shapes
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
void hideDrawingShape()
hide Drawing mode
DepartLaneDefinition
Possible ways to choose a lane on depart.
#define GUIDesignHorizontalSeparator
GNEAttributeCarrier * myAC
edited Attribute Carrier
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double getMaximumRange() const
get maximum range
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
long onCmdSetGenericParameter(FXObject *, FXSelector, void *)
Called when user udpate the generic parameter text field.
FXLabel * myLengthLabel
Label for length.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition)
refresh attribute editor (only the valid values will be refresh)
FXTextField * myValueTextFieldInt
textField to modify the default value of int/float/string parameters
AttributesCreator()
FOX needs this.
const TagProperties & getTagPropertyParent() const
get reference to tagProperty parent
void hideAttributesEditorExtendedModul()
hide group box
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
bool isBool() const
return true if atribute is boolean
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
FXCheckButton * myCloseShapeCheckButton
checkbox to enable/disable closing polygon
double getMinimumRange() const
get minimum range
Supermode currentSupermode
the current supermode
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
bool isAttributesEditorRowValid() const
check if current attribute of TextField/ComboBox is valid
long onCmdAttributesEditorHelp(FXObject *, FXSelector, void *)
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
SumoXMLAttr getAttr() const
get XML Attribute
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
block movement of a graphic element
std::vector< GNEAttributeCarrier * > myEditedACs
the multi-selection currently being inspected
long onCmdEditGenericParameter(FXObject *, FXSelector, void *)
double getLengthGeometryFactor() const
get length geometry factor
double setEndPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const
obtain the End position values of StoppingPlaces and E2 detector over the lane
attribute edited trought dialog
bool myCurrentLengthValid
Flag to check if current length is valid.
bool myIncludeExtended
flag used to mark if current edited ACs are bein edited including extended attribute ...
edge: the shape in xml-definition
FXCheckButton * myAttributeCheckButton
check button to enable/disable Label attribute
bool isEnablitable() const
return true if atribute is enablitable
void showAttributeEditorModul(const std::vector< GNEAttributeCarrier *> &ACs, bool includeExtended)
show attributes of multiple ACs
static bool parseArrivalLane(const std::string &val, const std::string &element, const std::string &id, int &lane, ArrivalLaneDefinition &ald, std::string &error)
Validates a given arrivalLane value.
GNEAttributeCarrier::TagProperties myTagProperties
current edited Tag Properties
void disableAttributesCreatorRow()
disable row
void startDrawing()
start drawing
~GenericParametersEditor()
destructor
const NetElementGeometry & getGeometry() const
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children) ...
AttributesCreator * getAttributesCreatorParent() const
get AttributesCreator parent
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
AttributesEditor()
FOX needs this.
void hideGenericParametersEditor()
hide netedit attributes editor
FXButton * myAttributeButtonCombinableChoices
pointer to buttonCombinableChoices
Dialog for edit rerouters.
void abortDrawing()
abort drawing
FXLabel * myInformationLabel
Label with information.
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
FXRadioButton * myAttributeRadioButton
Radio button for disjoint attributes.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
FXLabel * myAttributeLabel
pointer to attribute label
DepartSpeedDefinition
Possible ways to choose the departure speed.
GenericParametersEditor()
FOX needs this.
const std::string & isAttributeValid() const
returns a empty string if current value is valid, a string with information about invalid value in ot...
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, const GNELane *lane) const
fill valuesMap with netedit attributes
long onCmdOpenAttributeDialog(FXObject *, FXSelector, void *)
open model dialog for more comfortable attribute editing
#define GUIDesignTextFieldNCol
Num of column of text field.
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
static std::string replace(std::string str, const char *what, const char *by)
FXCheckButton * myAttributeCheckButton
pointer to attribute menu check
bool isDiscrete() const
return true if atribute is discrete
void addNewPoint(const Position &P)
add new point to temporal shape
FXTextField * myTextFieldGenericParameter
text field for write generic parameter
long onCmdStartDrawing(FXObject *, FXSelector, void *)
FXCheckButton * myValueCheckButton
check button to enable/disable the value of boolean parameters
bool isFloat() const
return true if atribute is a float
#define GUIDesignDialogBox
FXTextField * myLengthTextField
textField for length
static bool parsePersonModes(const std::string &modes, const std::string &element, const std::string &id, SVCPermissions &modeSet, std::string &error)
Validates a given person modes value.
void removeEditedAC(GNEAttributeCarrier *AC)
remove edited ACs
std::vector< GNEAttributeCarrier * > myACs
list of edited ACs
GNEFrame * getFrameParent() const
pointer to GNEFrame parent
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
const std::string DEFAULT_PEDTYPE_ID
bool isDrawing() const
return true if currently a shape is drawed
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
struct with the attribute Properties
GNEFrame * myFrameParent
pointer to frame parent
const std::vector< std::string > & getDiscreteValues() const
get discrete values
FXTextField * myValueTextFieldReal
textField to modify the default value of real/times parameters
Demanding mode (Routes, Vehicles etc..)
static bool parseDepartPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosLatDefinition &dpd, std::string &error)
Validates a given departPosLat value.
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
GNEFrame * myFrameParent
pointer to Frame Parent
bool isAttributesCreatorRowEnabled() const
check if row is enabled
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
FXLabel * myBlockMovementLabel
Label for block movement.
void refreshGenericParametersEditor()
refresh netedit attributes
AttributesEditorExtended()
FOX needs this.
FXComboBox * myValueComboBoxChoices
pointer to combo box choices
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
#define GUIDesignTextFieldInt
text field extended over Frame with thick frame and limited to Integers
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
void refreshAttributesEditorRow(const std::string &value, bool forceRefresh, bool disjointAttributeEnabled)
refresh current row
long onCmdSelectCheckButton(FXObject *, FXSelector, void *)
called when user press a check button
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to doubles/floats
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
bool isSUMOTime() const
return true if atribute is a SUMOTime
const GNEAttributeCarrier::AttributeProperties & getAttrProperties() const
return Attr
FXButton * myStopDrawingButton
button for stop drawing
#define GUIDesignButtonOK
void setStatusBarText(const std::string &text)
set staturBar text
void hideAttributesEditorModul()
hide attribute editor
void removeLastPoint()
remove last added point
const std::string & getDefaultValue() const
get default value
FXComboBox * myReferencePointMatchBox
match box with the list of reference points
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
ArrivalPosDefinition
Possible ways to choose the arrival position.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
link: the index of the link within the traffic light
void updateDisjointAttributes(AttributesCreatorRow *row)
update disjoint attributes
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
void showDrawingShape()
show Drawing mode
FXButton * myHelpButton
button for help
FXButton * myHelpButton
help button
void stopDrawing()
stop drawing and check if shape can be created
void showAttributesEditorExtendedModul()
show AttributesEditorExtended modul
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
bool getAttributeRadioButtonCheck() const
return status of radio button
~DrawingShape()
destructor
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
bool myDeleteLastCreatedPoint
flag to enable/disable delete point mode
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
~AttributesEditorExtended()
destructor
~AttributesCreator()
destructor
DepartPosDefinition
Possible ways to choose the departure position.
#define GUIDesignRadioButtonAttribute
design for radio button with fixed height
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Network mode (Edges, junctions, etc..)
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
const std::vector< GNEAttributeCarrier * > & getEditedACs() const
get current edited ACs
void setAttributeCheckButtonCheck(bool value)
enable or disable label checkbox button for optional attributes
bool getAttributeCheckButtonCheck() const
return status of label checkbox button
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name) ...
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
~NeteditAttributes()
destructor
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
DepartDefinition
Possible ways to depart.
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error)
Validates a given depart value.
std::vector< AttributesEditorRow * > myAttributesEditorRows
list of Attribute editor rows
FXTextField * myValueTextFieldInt
textField to modify the value of int attributes
GNEFrame * myFrameParent
pointer to inspector frame parent
FXButton * myAttributeColorButton
Button for open color editor.
std::string myInvalidValue
string which indicates the reason due current value is invalid
static bool parseDepartLane(const std::string &val, const std::string &element, const std::string &id, int &lane, DepartLaneDefinition &dld, std::string &error)
Validates a given departLane value.
bool isOptional() const
return true if atribute is optional