70 myEditedCalibratorFlow(editedCalibratorFlow),
71 myUpdatingElement(updatingElement),
72 myCalibratorFlowValid(true) {
74 std::string typeOfOperation = myUpdatingElement ?
"Edit " +
toString(myEditedCalibratorFlow->getTag()) +
" of " :
"Create " +
toString(myEditedCalibratorFlow->getTag()) +
" for ";
75 changeAdditionalDialogHeader(typeOfOperation +
toString(myEditedCalibratorFlow->getCalibratorParent()->getTag()) +
" '" + myEditedCalibratorFlow->getCalibratorParent()->getID() +
"'");
152 for (
auto i : myEditedCalibratorFlow->getCalibratorParent()->getCalibratorVehicleTypes()) {
153 myComboBoxVehicleType->appendItem(i->getID().c_str());
155 myComboBoxVehicleType->setNumVisible((
int)myEditedCalibratorFlow->getCalibratorParent()->getCalibratorVehicleTypes().size());
158 for (
auto i : myEditedCalibratorFlow->getCalibratorParent()->getCalibratorRoutes()) {
159 myComboBoxRoute->appendItem(i->getID().c_str());
161 myComboBoxRoute->setNumVisible((
int)myEditedCalibratorFlow->getCalibratorParent()->getCalibratorRoutes().size());
164 updateCalibratorFlowValues();
170 if (myUpdatingElement ==
false) {
171 myEditedCalibratorFlow->getCalibratorParent()->getViewNet()->getUndoList()->add(
new GNEChange_CalibratorItem(myEditedCalibratorFlow,
true),
true);
194 FXMessageBox::warning(getApp(), MBOX_OK,
195 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
196 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
198 " is invalid.").c_str());
201 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
208 getApp()->stopModal(
this, TRUE);
219 getApp()->stopModal(
this, FALSE);
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.
bool isValid(SumoXMLAttr key, const std::string &value)
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldNumber
TextField for Number.
Dialog to edit sequences, parameters, etc.. of Additionals.
FXTextField * myTextFieldPeriod
TextField for Period.
weights: time range begin
void setFlowType(GNECalibratorFlow::TypeOfFlow type)
set type of flow
FXTextField * myTextFieldBegin
TextField for Begin.
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
#define WRITE_WARNING(msg)
FXRadioButton * myRadioButtonPeriod
RadioButton for Period.
static OptionsCont & getOptions()
Retrieves the options.
#define GUIDesignComboBox
long onCmdSetTypeOfFlow(FXObject *radioButton, FXSelector, void *)
event after change type of flow
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
FXTextField * myTextFieldColor
TextField for Color.
FXRadioButton * myRadioButtonVehsPerHour
RadioButton for VehsPerHour.
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
FXRadioButton * myRadioButtonProbability
RadioButton for Probability.
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
bool myUpdatingElement
flag to indicate if flow are being created or modified
FXTextField * myTextFieldEnd
TextField for End.
const std::string getID() const
function to support debugging
FXTextField * myTextFieldLine
TextField for Line.
FXComboBox * myComboBoxVehicleType
ComboBox for Type.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
long onCmdAccept(FXObject *, FXSelector, void *)
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.
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
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
GNECalibratorFlow::TypeOfFlow getFlowType() const
get type of flow
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
GNECalibratorFlow * myEditedCalibratorFlow
interator to edited calibrator flow
Dialog for edit rerouter intervals.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
#define GUIDesignRadioButtonAttribute
design for radio button with fixed height
FXTextField * myTextFieldProbability
TextField for Probability.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
SumoXMLTag getTag() const
get XML Tag assigned to this object
FXTextField * myTextFieldFlowID
TextField for flow ID.