61 FXIMPLEMENT(
GNECalibratorDialog, FXDialogBox, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
69 myCalibratorParent(calibratorParent) {
83 myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
84 myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
85 myRouteList->setEditable(
false);
94 myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
95 myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
96 myVehicleTypeList->setEditable(
false);
105 myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
106 myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
107 myFlowList->setEditable(
false);
110 myCopyOfCalibratorRoutes = myCalibratorParent->getCalibratorRoutes();
111 myCopyOfCalibratorFlows = myCalibratorParent->getCalibratorFlows();
112 myCopyOfCalibratorVehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
117 updateVehicleTypeTable();
137 getApp()->stopModal(
this, TRUE);
149 getApp()->stopModal(
this, FALSE);
175 vehicleTypes.push_back(newRoute);
192 std::vector<GNECalibratorFlow> calibratorFlowsToErase;
194 if (j->getRoute() ==
myRouteList->getItem(i, 0)->getText().text()) {
195 calibratorFlowsToErase.push_back(*j);
199 if (calibratorFlowsToErase.size() > 0) {
207 "' will remove " +
toString(calibratorFlowsToErase.size()) +
" " +
toString(
SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? (
"s") : (
"")) +
208 ". Continue?").c_str());
212 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'No'");
214 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'ESC'");
221 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Yes'");
224 std::vector<GNECalibratorFlow> flowSubstraction;
226 if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
227 flowSubstraction.push_back(*j);
238 vehicleTypes.erase(vehicleTypes.begin() + i);
270 vehicleTypes.push_back(newFlow);
288 flows.erase(flows.begin() + i);
320 vehicleTypes.push_back(newVehicleType);
337 std::vector<GNECalibratorFlow> calibratorFlowsToErase;
340 calibratorFlowsToErase.push_back(*j);
344 if (calibratorFlowsToErase.size() > 0) {
347 "' will remove " +
toString(calibratorFlowsToErase.size()) +
" " +
toString(
SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? (
"s") : (
"")) +
348 ". Continue?").c_str());
352 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'No'");
354 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'ESC'");
361 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Yes'");
364 std::vector<GNECalibratorFlow> flowSubstraction;
366 if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
367 flowSubstraction.push_back(*j);
378 vehicleTypes.erase(vehicleTypes.begin() + i);
420 FXTableItem* item = 0;
424 item =
new FXTableItem(
toString(i->getRouteID()).c_str());
427 item =
new FXTableItem(
toString(i->getEdgesIDs()).c_str());
431 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
432 item->setEnabled(
false);
461 FXTableItem* item = 0;
465 item =
new FXTableItem(
toString(i->getFlowID()).c_str());
468 item =
new FXTableItem(
toString(i->getVehicleType()).c_str());
471 item =
new FXTableItem(
toString(i->getRoute()).c_str());
475 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
476 item->setEnabled(
false);
503 FXTableItem* item = 0;
507 item =
new FXTableItem(
toString(i->getVehicleTypeID()).c_str());
510 item =
new FXTableItem(
toString(i->getVClass()).c_str());
514 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
515 item->setEnabled(
false);
527 std::string errorMsg;
void updateFlowTable()
update data table with flows
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
const std::vector< GNECalibratorFlow > & getCalibratorFlows() const
get calibrator flows
description of a vehicle type
FXButton * myAddFlow
button for add new flow
a flow definition (used by router)
long onCmdAddVehicleType(FXObject *, FXSelector, void *)
add new vehicle type
Dialog to edit sequences, parameters, etc.. of Additionals.
long onCmdAddRoute(FXObject *, FXSelector, void *)
add new route
FXTable * myFlowList
list with flows
void updateRouteTable()
update data table with routes
const std::vector< GNECalibratorRoute > & getCalibratorRoutes() const
get calibrator routes
~GNECalibratorDialog()
destructor
GNECalibrator * myCalibratorParent
pointer to calibrator parent
FXLabel * myLabelFlow
label for flows
begin/end of the description of a route
#define WRITE_WARNING(msg)
void updateFlowAndLabelButton()
update flow and label button
bool isTestingModeEnabled() const
check if netedit is running in testing mode
GNECalibrator * getCalibratorParent() const
get calibrator parent
std::vector< GNECalibratorVehicleType > myCopyOfCalibratorVehicleTypes
vector with a copy of calibrator vehicle types (used by reset)
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTable * myRouteList
list with routes
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
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
long onCmdClickedRoute(FXObject *, FXSelector, void *)
remove or edit route
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
void setCalibratorVehicleTypes(const std::vector< GNECalibratorVehicleType > &calibratorVehicleType)
set calibrator vehicleTypes values
FXTable * myVehicleTypeList
list with vehicle types
Dialog for edit rerouter intervals.
long onCmdClickedFlow(FXObject *, FXSelector, void *)
remove or edit flow
void updateVehicleTypeTable()
update data table with vehicle types
long onCmdAddFlow(FXObject *, FXSelector, void *)
add new flow
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
void setCalibratorRoutes(const std::vector< GNECalibratorRoute > &calibratorRoutes)
set calibrator route values
#define GUIDesignButtonIcon
button only with icon (23x23)
std::vector< GNECalibratorRoute > myCopyOfCalibratorRoutes
vector with a copy of calibrator routes (used by reset)
Dialog for edit calibrators.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
Dialog for edit rerouter intervals.
std::vector< GNECalibratorFlow > myCopyOfCalibratorFlows
vector with a copy of calibrator flows (used by reset)
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
const std::vector< GNECalibratorVehicleType > & getCalibratorVehicleTypes() const
get calibrator vehicleTypes
void setCalibratorFlows(const std::vector< GNECalibratorFlow > &calibratorFlows)
set calibrator flow values
Dialog for edit rerouter intervals.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
long onCmdClickedVehicleType(FXObject *, FXSelector, void *)
remove or edit vehicle type
long onCmdAccept(FXObject *, FXSelector, void *)