63 myCalibratorFlowValid(false),
66 std::string typeOfOperation = updatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
67 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getFirstAdditionalParent()->getTagStr() +
" '" + myEditedAdditional->getFirstAdditionalParent()->getID() +
"'");
85 myTextFieldVehsPerHour->setTextColor(FXRGB(255, 0, 0));
89 myTextFieldSpeed->setTextColor(FXRGB(255, 0, 0));
137 for (
auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(
SUMO_TAG_VTYPE)) {
138 myComboBoxVehicleType->appendItem(i.first.c_str());
140 myComboBoxVehicleType->setNumVisible((
int)myComboBoxVehicleType->getNumItems());
143 for (
auto i : myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(
SUMO_TAG_ROUTE)) {
144 myComboBoxRoute->appendItem(i.first.c_str());
146 myComboBoxRoute->setNumVisible((
int)myComboBoxRoute->getNumItems());
149 updateCalibratorFlowValues();
155 if (myUpdatingElement ==
false) {
156 myEditedAdditional->getViewNet()->getUndoList()->add(
new GNEChange_Additional(myEditedAdditional,
true),
true);
175 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
177 FXMessageBox::warning(getApp(), MBOX_OK,
178 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
179 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
181 " is invalid.").c_str());
183 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
187 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
189 FXMessageBox::warning(getApp(), MBOX_OK,
190 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
191 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
192 " because there is overlapping with another " + tagString +
".").c_str());
194 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
200 getApp()->stopModal(
this, TRUE);
211 getApp()->stopModal(
this, FALSE);
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
FXTextField * myTextFieldDepartPos
TextField for Depart Pos.
void resetChanges()
reset changes did in this dialog.
~GNECalibratorFlowDialog()
destructor
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
description of a vehicle type
FXCheckButton * myRerouteCheckButton
checkButton for Reroute
FXTextField * myTextFieldDepartLane
TextField for Depart Lane.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
Dialog to edit sequences, parameters, etc.. of Additionals.
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
weights: time range begin
FXTextField * myTextFieldBegin
TextField for Begin.
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
virtual std::string getAttribute(SumoXMLAttr key) const =0
begin/end of the description of a route
#define GUIDesignComboBox
FXTextField * myTextFieldColor
TextField for Color.
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
FXComboBox * myComboBoxRoute
TextField for Route.
#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
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldSpeed
TextField for Speed.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
FXTextField * myTextFieldEnd
TextField for End.
FXTextField * myTextFieldLine
TextField for Line.
FXComboBox * myComboBoxVehicleType
ComboBox for Type.
long onCmdAccept(FXObject *, FXSelector, void *)
GNEAdditional * myEditedAdditional
pointer to edited aditional
GNEAdditional * getFirstAdditionalParent() const
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
#define GUIDesignTextFieldNCol
Num of column of text field.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void acceptChanges()
Accept changes did in this dialog.
An Element which don't belongs to GNENet but has influency in the simulation.
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
const std::string & getTagStr() const
get tag assigned to this object in string format
void cancelChanges()
Cancel changes did in this dialog.
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left and height of 23 ...
#define GUIDesignTextFieldInt
text field extended over Frame with thick frame and limited to Integers
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/doubles
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
void updateCalibratorFlowValues()
update data fields
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
Dialog for edit rerouter intervals.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
bool checkAdditionalChildsOverlapping() const
check if childs are overlapped (Used by Rerouters)
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button