38 #ifdef CHECK_MEMORY_LEAKS 55 FXIMPLEMENT(
GNECalibratorDialog, FXDialogBox, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
63 myCalibratorParent(calibratorParent) {
67 myDataList->setEditable(
false);
133 myFlowValues = myCalibratorParent->getFlowValues();
228 delete calibratorFlow;
241 for (
int i = 0; i <
myDataList->getNumRows(); i++) {
242 if (
myDataList->getItem(i, 19)->isSelected()) {
260 getApp()->stopModal(
this, TRUE);
268 getApp()->stopModal(
this, FALSE);
291 myDataList->setColumnWidth(0, getWidth() / 20);
292 myDataList->setColumnWidth(1, getWidth() / 20);
293 myDataList->setColumnWidth(2, getWidth() / 20);
294 myDataList->setColumnWidth(3, getWidth() / 20);
295 myDataList->setColumnWidth(4, getWidth() / 20);
296 myDataList->setColumnWidth(5, getWidth() / 20);
297 myDataList->setColumnWidth(6, getWidth() / 20);
298 myDataList->setColumnWidth(7, getWidth() / 20);
299 myDataList->setColumnWidth(8, getWidth() / 20);
300 myDataList->setColumnWidth(9, getWidth() / 20);
301 myDataList->setColumnWidth(10, getWidth() / 20);
302 myDataList->setColumnWidth(11, getWidth() / 20);
303 myDataList->setColumnWidth(12, getWidth() / 20);
304 myDataList->setColumnWidth(13, getWidth() / 20);
305 myDataList->setColumnWidth(14, getWidth() / 20);
306 myDataList->setColumnWidth(15, getWidth() / 20);
307 myDataList->setColumnWidth(16, getWidth() / 20);
308 myDataList->setColumnWidth(17, getWidth() / 20);
309 myDataList->setColumnWidth(18, getWidth() / 20);
310 myDataList->setColumnWidth(19, getWidth() / 20 - 10);
335 FXTableItem* item = 0;
338 for (std::vector<GNECalibrator::GNECalibratorFlow*>::iterator i =
myFlowValues.begin(); i !=
myFlowValues.end(); i++) {
340 item =
new FXTableItem(
toString((*i)->getBegin()).c_str());
344 item =
new FXTableItem(
toString((*i)->getEnd()).c_str());
348 item =
new FXTableItem(
toString((*i)->getType()).c_str());
352 item =
new FXTableItem(
toString((*i)->getRoute()).c_str());
356 item =
new FXTableItem(
toString((*i)->getColor()).c_str());
360 item =
new FXTableItem(
toString((*i)->getDepartLane()).c_str());
364 item =
new FXTableItem(
toString((*i)->getDepartPos()).c_str());
368 item =
new FXTableItem(
toString((*i)->getDepartSpeed()).c_str());
372 item =
new FXTableItem(
toString((*i)->getArrivalLane()).c_str());
376 item =
new FXTableItem(
toString((*i)->getArrivalPos()).c_str());
380 item =
new FXTableItem(
toString((*i)->getArrivalSpeed()).c_str());
384 item =
new FXTableItem(
toString((*i)->getLine()).c_str());
388 item =
new FXTableItem(
toString((*i)->getPersonNumber()).c_str());
392 item =
new FXTableItem(
toString((*i)->getContainerNumber()).c_str());
396 item =
new FXTableItem(
toString((*i)->getVehsPerHour()).c_str());
400 item =
new FXTableItem(
toString((*i)->getPeriod()).c_str());
404 item =
new FXTableItem(
toString((*i)->getProbability()).c_str());
408 item =
new FXTableItem(
toString((*i)->getNumber()).c_str());
413 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
FXTextField * myTextFieldContainerNumber
textField for insert a flow's ContainerNumber
bool setDepartSpeed(std::string departSpeed)
set depart speed
bool setPersonNumber(int personNumber)
set number of persons
static SUMOReal _str2SUMOReal(const std::string &sData)
converts a string into the SUMOReal value described by it by calling the char-type converter ...
void setFlowValues(std::vector< GNECalibrator::GNECalibratorFlow * > calibratorFlowValues)
set Calbratorflow values
FXTextField * myTextFieldRoute
textField for insert a flow's Route
FXTable * myDataList
Table with the data.
FXTextField * myTextFieldProbability
textField for insert a flow's probability
#define GUIDesignTableLimitedHeight
design for table extended over frame but with limited Height
FXTextField * myTextFieldArrivalLane
textField for insert a flow's ArrivalLane
Dialog to edit sequences, parameters, etc.. of Additionals.
bool setArrivalSpeed(std::string arrivalSpeed)
set arrival speed
std::vector< GNECalibrator::GNECalibratorFlow * > getFlowValues() const
get Calbratorflow values
void updateTable()
update data table
bool setVehsPerHour(SUMOReal vehsPerHour)
set vehicles per hour
bool setPeriod(SUMOReal period)
set period of vehicles
FXTextField * myTextFieldDepartLane
textField for insert a flow's DepartLane
~GNECalibratorDialog()
destructor
bool setNumber(int number)
set number of vehicles
FXTextField * myTextFieldLine
textField for insert a flow's Line
GNECalibrator * myCalibratorParent
pointer to calibrator parent
bool setBegin(SUMOReal begin)
set begin step
bool setArrivalLane(std::string arrivalLane)
set arrival lane
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
bool setEnd(SUMOReal end)
set end step
FXTextField * myTextFieldId
textField for insert a flow's Id
long onCmdRemoveRow(FXObject *, FXSelector, void *)
event called after press remove row
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
long onCmdAddRow(FXObject *, FXSelector, void *)
bool setRoute(std::string route)
set route in which this flow is used
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
FXTextField * myTextFieldType
textField for insert a flow's Type
static int _str2int(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
bool setContainerNumber(int containerNumber)
set number of container
FXTextField * myTextFieldDepartPos
textField for insert a flow's DepartPos
bool setDepartPos(std::string departPos)
set depart position
FXTextField * myTextFieldVehsPerHour
textField for insert a flow's vehsPerHour
FXTextField * myTextFieldPersonNumber
textField for insert a flow's PersonNumber
Dialog for edit calibrators.
bool setLine(std::string line)
set line of busStop/containerStop
FXTextField * myTextFieldArrivalPos
textField for insert a flow's ArrivalPos
FXTextField * myTextFieldBegin
textField for insert a flow's begin
bool setProbability(SUMOReal probability)
set probability of vehicle
bool setArrivalPos(std::string arrivalPos)
set arrival position
FXTextField * myTextFieldPeriod
textField for insert a flow's period
FXTextField * myTextFieldEnd
textField for insert a flow's end
FXTextField * myTextFieldDepartSpeed
textField for insert a flow's DepartSpeed
bool setColor(std::string color)
set color of flow
#define GUIDesignLabelThick
label extended over over frame with thick and with text justify to left
#define GUIDesignTextFieldInt
text field extended over Frame with thick frame and limited to Integers
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
std::vector< GNECalibrator::GNECalibratorFlow * > myFlowValues
Map with the temporal FlowValues.
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/SUMOReals
bool setDepartLane(std::string departLane)
set depart lane
static bool _str2SUMOReal(const std::string &data)
check if a String can be parsed into a SUMOReal check overflows
bool setType(std::string type)
set type of vehicle
FXTextField * myTextFieldColor
textField for insert a flow's color
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldNumber
textField for insert a flow's number
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FXTextField * myTextFieldArrivalSpeed
textField for insert a flow's ArrivalSpeed