52 myCalibratorFlowValid(false),
55 std::string typeOfOperation = updatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
56 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() +
" '" + myEditedAdditional->getParentAdditionals().at(0)->getID() +
"'");
126 for (
const auto& vType : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_VTYPE)) {
127 myComboBoxVehicleType->appendIconItem(vType.second->getID().c_str(), vType.second->getACIcon());
131 for (
const auto& route : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_ROUTE)) {
132 myComboBoxRoute->appendIconItem(route.second->getID().c_str(), route.second->getACIcon());
136 updateCalibratorFlowValues();
142 if (!myUpdatingElement) {
143 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(
new GNEChange_Additional(myEditedAdditional,
true),
true);
162 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
164 FXMessageBox::warning(getApp(), MBOX_OK,
165 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
166 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
168 " is invalid.").c_str());
170 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
174 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
176 FXMessageBox::warning(getApp(), MBOX_OK,
177 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
178 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
179 " because there is overlapping with another " + tagString +
".").c_str());
181 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
186 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
188 FXMessageBox::warning(getApp(), MBOX_OK,
189 (
"Error " + operation1 +
" " + parentTagString +
"'s " + tagString).c_str(),
"%s",
190 (parentTagString +
"'s " + tagString +
" cannot be " + operation2 +
192 " cannot be defined together.").c_str());
194 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
200 getApp()->stopModal(
this, TRUE);
211 getApp()->stopModal(
this, FALSE);
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_BUTTON_CANCEL
cancel button
@ MID_GNE_BUTTON_RESET
reset button
@ MID_GNE_BUTTON_ACCEPT
accept button
#define GUIDesignComboBox
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignTextField
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
#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 GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_ATTR_DEPARTPOS_LAT
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ARRIVALPOS_LAT
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog to edit sequences, parameters, etc.. of Additionals.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited additional
void resetChanges()
reset changes did in this dialog.
An Element which don't belong to GNENet but has influence 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 additional changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their correspondent attribute are valids
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
Dialog for editing calibrator flows.
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myTextFieldDepartPos
TextField for Depart Pos.
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
~GNECalibratorFlowDialog()
destructor
long onCmdAccept(FXObject *, FXSelector, void *)
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
FXTextField * myTextFieldEnd
TextField for End.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldColor
TextField for Color.
MFXComboBoxIcon * myComboBoxVehicleType
ComboBox for Type.
FXTextField * myTextFieldBegin
TextField for Begin.
MFXComboBoxIcon * myComboBoxRoute
TextField for Route.
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldLine
TextField for Line.
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
FXTextField * myTextFieldDepartLane
TextField for Depart Lane.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
FXTextField * myTextFieldSpeed
TextField for Speed.
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
FXCheckButton * myRerouteCheckButton
checkButton for Reroute
void updateCalibratorFlowValues()
update data fields
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
GNEViewNet * getViewNet() const
get view net
GNEUndoList * getUndoList() const
get the undoList object
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint findItem(const FXString &text) const
find item
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.