49 myCalibratorRouteValid(true) {
51 std::string typeOfOperation = +
" for ";
52 changeDemandElementDialogHeader(myUpdatingElement ?
"Edit " + myEditedDemandElement->getTagStr() +
" of " :
"Create " + myEditedDemandElement->getTagStr());
72 updateCalibratorRouteValues();
78 if (myUpdatingElement ==
false) {
79 myEditedDemandElement->getNet()->getViewNet()->getUndoList()->add(
new GNEChange_DemandElement(myEditedDemandElement,
true),
true);
81 myCalibratorRouteValid =
false;
97 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
102 FXMessageBox::warning(getApp(), MBOX_OK,
103 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
104 (tagString +
" cannot be " + operation2 +
" because parameter " +
toString(
myInvalidAttr) +
" is invalid.").c_str());
106 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
112 getApp()->stopModal(
this, TRUE);
123 getApp()->stopModal(
this, FALSE);
FXDEFMAP(GNERouteDialog) GNERouteDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
#define GUIDesignTextField
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_NOTHING
invalid attribute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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 aditional
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.
An Element which don't belongs to GNENet but has influency in the simulation.
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
const std::string & getID() const
get ID
GNEViewNet * getViewNet() const
get view net
Dialog for edit 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