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
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
SumoXMLTag getTag() const
get tag
description of a vehicle type
const std::string & getArrivalLane() const
get arrival lane
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.
int getNumber() const
get number of flows
bool setVehicleType(std::string vehicleType)
set vehicleType of flow
const std::string & getArrivalSpeed() const
get arrival speed
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
const std::string & getDepartSpeed() const
get arrival speed
FXTextField * myTextFieldNumber
TextField for Number.
Dialog to edit sequences, parameters, etc.. of Additionals.
std::string getArrivalPosLat() const
const std::string & getArrivalPos() const
get arrival position
FXTextField * myTextFieldPeriod
TextField for Period.
weights: time range begin
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
bool setPeriod(double period)
set period of flows
FXTextField * myTextFieldBegin
TextField for Begin.
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
const std::string & getVehicleType() const
get vehicle type of flow
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
#define WRITE_WARNING(msg)
std::string getDepartPosLat() const
get departPosLat
FXRadioButton * myRadioButtonPeriod
RadioButton for Period.
bool setVehsPerHour(double vehsPerHour)
set flows per hour
const std::string & getRoute() const
get route in which this flow is used
#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.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
bool setBegin(double begin)
set begin step
TypeOfFlow getFlowType() const
get type of flow
bool setDepartPosLat(std::string departPosLat="center")
set departPosLat
GNECalibratorDialog * myCalibratorDialogParent
pointer to GNECalibratorDialog parent
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
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
double getPeriod() const
get period of flow
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
const std::string & getDepartPos() const
get depart position
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
bool setDepartPos(std::string departPos="base")
set depart position
bool setReroute(bool value)
set reroute
bool myUpdatingElement
flag to indicate if flow are being created or modified
FXTextField * myTextFieldEnd
TextField for End.
FXTextField * myTextFieldLine
TextField for Line.
const std::string & getFlowID() const
get ID of flow
FXComboBox * myComboBoxVehicleType
ComboBox for Type.
bool isTestingModeEnabled() const
check if netedit is running in testing mode
bool setArrivalSpeed(std::string arrivalSpeed="current")
set arrival speed
long onCmdAccept(FXObject *, FXSelector, void *)
bool setFlowID(std::string ID)
set ID of flow
const std::string & getDepartLane() const
get depart lane
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
#define GUIDesignTextFieldNCol
Num of column of text field.
Dialog for edit calibrators.
int getContainerNumber() const
get number of containers
double getVehsPerHour() const
get flows per hour
bool setProbability(double probability)
set probability of flow
GNECalibratorFlow * myCopyOfCalibratorFlow
pointer in which save modifications of CalibratorFlow
GNECalibratorFlow * myCalibratorFlow
pointer to rerouter interval
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
const std::string & getColor() const
get color of flow
GNECalibrator * getCalibratorParent() const
get calibrator parent
int getPersonNumber() const
get number of persons
bool setTypeOfFlow(TypeOfFlow type)
set type of flow
const std::string & getLine() const
get line of busStop/containerStop
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
double getProbability() const
get probability of flow
SumoXMLTag getTag() const
get XML Tag assigned to this object
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
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
bool getReroute() const
get reroute
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.
double getEnd() const
get end time step
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myTextFieldFlowID
TextField for flow ID.