58 FXIMPLEMENT(
GNECalibratorFlowDialog, FXDialogBox, GNECalibratorFlowDialogMap, ARRAYNUMBER(GNECalibratorFlowDialogMap))
66 myCalibratorDialogParent(calibratorDialog),
67 myCalibratorFlow(&calibratorFlow),
68 myUpdatingElement(updatingElement),
69 myCalibratorFlowValid(true) {
71 changeAdditionalDialogHeader(
"Edit " +
toString(calibratorFlow.getTag()) +
" of " +
toString(calibratorFlow.getCalibratorParent()->getTag()) +
72 " '" + calibratorFlow.getCalibratorParent()->getID() +
"'");
148 const std::vector<GNECalibratorVehicleType>& vtypes = myCalibratorFlow->getCalibratorParent()->getCalibratorVehicleTypes();
149 for (std::vector<GNECalibratorVehicleType>::const_iterator i = vtypes.begin(); i != vtypes.end(); i++) {
150 myComboBoxVehicleType->appendItem(i->getVehicleTypeID().c_str());
152 myComboBoxVehicleType->setNumVisible(10);
155 const std::vector<GNECalibratorRoute>& routes = myCalibratorFlow->getCalibratorParent()->getCalibratorRoutes();
156 for (std::vector<GNECalibratorRoute>::const_iterator i = routes.begin(); i != routes.end(); i++) {
157 myComboBoxRoute->appendItem(i->getRouteID().c_str());
159 myComboBoxRoute->setNumVisible(10);
162 myCopyOfCalibratorFlow =
new GNECalibratorFlow(myCalibratorFlow->getCalibratorParent());
165 (*myCopyOfCalibratorFlow) = (*myCalibratorFlow);
168 updateCalibratorFlowValues();
186 FXMessageBox::warning(getApp(), MBOX_OK,
191 " is invalid.").c_str());
194 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
199 (*myCalibratorFlow) = (*myCopyOfCalibratorFlow);
200 getApp()->stopModal(
this, TRUE);
209 getApp()->stopModal(
this, FALSE);
217 (*myCopyOfCalibratorFlow) = (*myCalibratorFlow);
bool setLine(std::string line="")
set line of busStop/containerStop
bool setDepartSpeed(std::string departSpeed="0")
set depart speed
std::string getArrivalPosLat() const
FXTextField * myTextFieldDepartPos
TextField for Depart Pos.
~GNECalibratorFlowDialog()
destructor
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
double getEnd() const
get end time step
description of a vehicle type
double getPeriod() const
get period of flow
bool setColor(std::string color="")
set color of flow
bool setContainerNumber(int containerNumber=0)
set number of container
FXCheckButton * myRerouteCheckButton
checkButton for Reroute
FXTextField * myTextFieldDepartLane
TextField for Depart Lane.
const std::string & getArrivalSpeed() const
get arrival speed
bool setVehicleType(std::string vehicleType)
set vehicleType of flow
const std::string & getLine() const
get line of busStop/containerStop
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldNumber
TextField for Number.
const std::string & getArrivalLane() const
get arrival lane
Dialog to edit sequences, parameters, etc.. of Additionals.
std::string getDepartPosLat() const
get departPosLat
FXTextField * myTextFieldPeriod
TextField for Period.
weights: time range begin
bool getReroute() const
get reroute
const std::string & getDepartSpeed() const
get arrival speed
bool setPeriod(double period)
set period of flows
FXTextField * myTextFieldBegin
TextField for Begin.
const std::string & getArrivalPos() const
get arrival position
bool setArrivalLane(std::string arrivalLane="current")
set arrival lane
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
bool setArrivalPos(std::string arrivalPos="max")
set arrival position
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
#define WRITE_WARNING(msg)
FXRadioButton * myRadioButtonPeriod
RadioButton for Period.
bool setVehsPerHour(double vehsPerHour)
set flows per hour
bool isTestingModeEnabled() const
check if netedit is running in testing mode
GNECalibrator * getCalibratorParent() const
get calibrator parent
#define GUIDesignComboBox
long onCmdSetTypeOfFlow(FXObject *radioButton, FXSelector, void *)
event after change type of flow
bool setPersonNumber(int personNumber=0)
set number of persons
FXTextField * myTextFieldColor
TextField for Color.
FXRadioButton * myRadioButtonVehsPerHour
RadioButton for VehsPerHour.
int getContainerNumber() const
get number of containers
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
bool setBegin(double begin)
set begin step
bool setDepartPosLat(std::string departPosLat="center")
set departPosLat
GNECalibratorDialog * myCalibratorDialogParent
pointer to GNECalibratorDialog parent
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.
bool setRoute(std::string route)
set route in which this flow is used
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
bool setDepartPos(std::string departPos="base")
set depart position
int getNumber() const
get number of flows
bool setReroute(bool value)
set reroute
bool myUpdatingElement
flag to indicate if flow are being created or modified
FXTextField * myTextFieldEnd
TextField for End.
const std::string & getColor() const
get color of flow
FXTextField * myTextFieldLine
TextField for Line.
FXComboBox * myComboBoxVehicleType
ComboBox for Type.
const std::string & getDepartLane() const
get depart lane
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
bool setArrivalSpeed(std::string arrivalSpeed="current")
set arrival speed
long onCmdAccept(FXObject *, FXSelector, void *)
bool setFlowID(std::string ID)
set ID of flow
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
#define GUIDesignTextFieldNCol
Num of column of text field.
Dialog for edit calibrators.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
bool setProbability(double probability)
set probability of flow
const std::string & getVehicleType() const
get vehicle type of flow
GNECalibratorFlow * myCopyOfCalibratorFlow
pointer in which save modifications of CalibratorFlow
GNECalibratorFlow * myCalibratorFlow
pointer to rerouter interval
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
double getVehsPerHour() const
get flows per hour
double getProbability() const
get probability of flow
int getPersonNumber() const
get number of persons
bool setTypeOfFlow(TypeOfFlow type)
set type of flow
const std::string & getDepartPos() const
get depart position
bool setDepartLane(std::string departLane="first")
set depart lane
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
bool setNumber(int number)
set number of flows
#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
SumoXMLTag getTag() const
get tag
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
bool setArrivalPosLat(std::string arrivalPosLat="")
set arrivalPosLat
void updateCalibratorFlowValues()
update data fields
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
TypeOfFlow getFlowType() const
get type of flow
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
const std::string & getFlowID() const
get ID of flow
Dialog for edit rerouter intervals.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
bool setEnd(double end)
set end step
#define GUIDesignRadioButtonAttribute
design for radio button with fixed height
FXTextField * myTextFieldProbability
TextField for Probability.
const std::string & getRoute() const
get route in which this flow is used
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.