50 myCalibratorRouteValid(true) {
52 std::string typeOfOperation = +
" for ";
53 changeDemandElementDialogHeader(myUpdatingElement ?
"Edit " + myEditedDemandElement->getTagStr() +
" of " :
"Create " + myEditedDemandElement->getTagStr());
73 updateCalibratorRouteValues();
79 if (myUpdatingElement ==
false) {
80 myEditedDemandElement->getViewNet()->getUndoList()->add(
new GNEChange_DemandElement(myEditedDemandElement,
true),
true);
82 myCalibratorRouteValid =
false;
98 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
103 FXMessageBox::warning(getApp(), MBOX_OK,
104 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
105 (tagString +
" cannot be " + operation2 +
" because parameter " +
toString(
myInvalidAttr) +
" is invalid.").c_str());
107 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
113 getApp()->stopModal(
this, TRUE);
124 getApp()->stopModal(
this, FALSE);
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
void acceptChanges()
Accept changes did in this dialog.
Dialog for edit Calibrator Routes.
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
void cancelChanges()
Cancel changes did in this dialog.
bool myCalibratorRouteValid
flag to check if current calibrator vehicleType is valid
FXTextField * myTextFieldColor
color of route
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
FXTextField * myTextFieldRouteID
route ID
FXDEFMAP(GNERouteDialog) GNERouteDialogMap[]
void resetChanges()
reset changes did in this dialog.
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
void updateCalibratorRouteValues()
update data fields
~GNERouteDialog()
destructor
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
const std::string getID() const
function to support debugging
long onCmdAccept(FXObject *, FXSelector, void *)
FXTextField * myTextFieldEdges
list of edges (string)
#define GUIDesignTextFieldNCol
Num of column of text field.
Dialog to edit sequences, parameters, etc.. of DemandElements.
const std::string & getTagStr() const
get tag assigned to this object in string format
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 ...
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
virtual std::string getAttribute(SumoXMLAttr key) const =0
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left and height of 23 ...
An Element which don't belongs to GNENet but has influency in the simulation.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button