78 myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
79 myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
80 myRouteList->setEditable(
false);
89 myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
90 myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
91 myVehicleTypeList->setEditable(
false);
100 myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
101 myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
102 myFlowList->setEditable(
false);
106 updateVehicleTypeTable();
125 getApp()->stopModal(
this, TRUE);
135 getApp()->stopModal(
this, FALSE);
170 std::vector<GNEAdditional*> calibratorFlowsToErase;
173 calibratorFlowsToErase.push_back(j);
177 if (calibratorFlowsToErase.size() > 0) {
179 WRITE_DEBUG(
"Opening FXMessageBox of type 'question'");
182 toString(calibratorFlowsToErase.size()) +
" " +
toString(
SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? (
"s") : (
"")) +
". Continue?");
183 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, (
"Remove " +
toString(
SUMO_TAG_FLOW) +
"s").c_str(),
"%s", message.c_str());
187 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'No'");
188 }
else if (answer == 4) {
189 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'ESC'");
195 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'Yes'");
197 for (
auto j : calibratorFlowsToErase) {
239 throw ProcessError(
"myEditedAdditional->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_ROUTE) cannot be empty");
285 FXMessageBox::warning(getApp(), MBOX_OK,
290 std::vector<GNEAdditional*> calibratorFlowsToErase;
293 calibratorFlowsToErase.push_back(j);
297 if (calibratorFlowsToErase.size() > 0) {
299 toString(calibratorFlowsToErase.size()) +
" " +
toString(
SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? (
"s") : (
"")) +
". Continue?");
300 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, (
"Remove " +
toString(
SUMO_TAG_FLOW) +
"s").c_str(),
"%s", message.c_str());
304 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'No'");
305 }
else if (answer == 4) {
306 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'ESC'");
312 WRITE_DEBUG(
"Closed FXMessageBox of type 'question' with 'Yes'");
314 for (
auto j : calibratorFlowsToErase) {
363 FXTableItem* item =
nullptr;
374 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
375 item->setEnabled(
false);
402 FXTableItem* item =
nullptr;
413 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
414 item->setEnabled(
false);
441 FXTableItem* item =
nullptr;
445 item =
new FXTableItem(i.second->getAttribute(
SUMO_ATTR_ID).c_str());
454 item =
new FXTableItem(
"");
456 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
457 item->setEnabled(
false);
void updateFlowTable()
update data table with flows
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
void resetChanges()
reset changes did in this dialog.
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
~GNECalibratorDialog()
destructor
FXLabel * myLabelFlow
label for flows
begin/end of the description of a route
void updateFlowAndLabelButton()
update flow and label button
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTable * myRouteList
list with routes
GNEUndoList * getUndoList() const
get the undoList object
#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 ...
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
#define GUIDesignButtonIcon
button only with icon (23x23)
GNEAdditional * myEditedAdditional
pointer to edited aditional
Dialog for edit calibrators.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void acceptChanges()
Accept changes did in this dialog.
An Element which don't belongs to GNENet but has influency in the simulation.
Dialog for edit Calibrator Routes.
void cancelChanges()
Cancel changes did in this dialog.
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left and height of 23 ...
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
GNENet * getNet() const
get the net object
const std::map< std::string, GNEAdditional * > & getAdditionalByType(SumoXMLTag type) const
get map with IDs and pointers to additionals
Dialog for edit rerouter intervals.
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
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 *)