48 myCalibratorRouteValid(true) {
50 std::string typeOfOperation = +
" for ";
51 changeDemandElementDialogHeader(myUpdatingElement ?
"Edit " + myEditedDemandElement->getTagStr() +
" of " :
"Create " + myEditedDemandElement->getTagStr());
71 updateCalibratorRouteValues();
77 if (!myUpdatingElement) {
78 myEditedDemandElement->getNet()->getViewNet()->getUndoList()->add(
new GNEChange_DemandElement(myEditedDemandElement,
true),
true);
80 myCalibratorRouteValid =
false;
96 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
101 FXMessageBox::warning(getApp(), MBOX_OK,
102 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
103 (tagString +
" cannot be " + operation2 +
" because parameter " +
toString(
myInvalidAttr) +
" is invalid.").c_str());
105 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
111 getApp()->stopModal(
this, TRUE);
122 getApp()->stopModal(
this, FALSE);
FXDEFMAP(GNERouteDialog) GNERouteDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
#define GUIDesignTextField
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
Dialog to edit sequences, parameters, etc.. of DemandElements.
void acceptChanges()
Accept changes did in this dialog.
GNEDemandElement * myEditedDemandElement
pointer to edited additional
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void cancelChanges()
Cancel changes did in this dialog.
void resetChanges()
reset changes did in this dialog.
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
GNEViewNet * getViewNet() const
get view net
Dialog for editing Calibrator Routes.
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
FXTextField * myTextFieldRouteID
route ID
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
bool myCalibratorRouteValid
flag to check if current calibrator vehicleType is valid
FXTextField * myTextFieldEdges
list of edges (string)
long onCmdAccept(FXObject *, FXSelector, void *)
FXTextField * myTextFieldColor
color of route
void updateCalibratorRouteValues()
update data fields
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
~GNERouteDialog()
destructor
GNEUndoList * getUndoList() const
get the undoList object