58 myDemandList =
new DemandList(
this, invalidDemandElements);
66 if (myDemandList->myInvalidRoutes.empty()) {
67 myFixRouteOptions->disableFixRouteOptions();
70 if (myDemandList->myInvalidVehicles.empty()) {
71 myFixVehicleOptions->disableFixVehicleOptions();
74 if (myDemandList->myInvalidVehicles.empty()) {
75 myFixStopOptions->disableFixStopOptions();
84 myAcceptButton->setFocus();
103 bool continueSaving =
true;
125 continueSaving =
false;
149 continueSaving =
false;
166 i->fixDemandElementProblem();
178 continueSaving =
false;
181 if (continueSaving) {
183 getApp()->stopModal(
this, TRUE);
186 getApp()->stopModal(
this, FALSE);
195 getApp()->stopModal(
this, FALSE);
207 myTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
208 myTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
211 for (
const auto& i : invalidDemandElements) {
212 if (i->getTagProperty().isVehicle()) {
214 }
else if (i->getTagProperty().isStop()) {
227 myTable->setColumnWidth(1, 160);
228 myTable->setColumnWidth(2, 280);
231 myTable->setColumnText(2,
"Conflict");
232 myTable->getRowHeader()->setWidth(0);
235 FXTableItem* item =
nullptr;
239 item =
new FXTableItem(
"", i->getIcon());
240 item->setIconPosition(FXTableItem::CENTER_X);
241 myTable->setItem(indexRow, 0, item);
243 item =
new FXTableItem(i->getID().c_str());
244 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
245 myTable->setItem(indexRow, 1, item);
247 item =
new FXTableItem(i->getDemandElementProblem().c_str());
248 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
249 myTable->setItem(indexRow, 2, item);
256 item =
new FXTableItem(
"", i->getIcon());
257 item->setIconPosition(FXTableItem::CENTER_X);
258 myTable->setItem(indexRow, 0, item);
260 item =
new FXTableItem(i->getID().c_str());
261 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
262 myTable->setItem(indexRow, 1, item);
264 item =
new FXTableItem(i->getDemandElementProblem().c_str());
265 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
266 myTable->setItem(indexRow, 2, item);
273 item =
new FXTableItem(
"", i->getIcon());
274 item->setIconPosition(FXTableItem::CENTER_X);
275 myTable->setItem(indexRow, 0, item);
277 item =
new FXTableItem(i->getID().c_str());
278 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
279 myTable->setItem(indexRow, 1, item);
281 item =
new FXTableItem(i->getDemandElementProblem().c_str());
282 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
283 myTable->setItem(indexRow, 2, item);
412 saveInvalid =
new FXRadioButton(RadioButtonsLeft,
"Save invalid positions",
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
FixStopOptions(GNEDialog_FixDemandElements *fixDemandElementsDialogParents)
build Position Options
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
#define GUIDesignHorizontalFrame
groupbox for all radio buttons related with fix stop options
void disableFixStopOptions()
disable position options
FXRadioButton * removeInvalidVehicles
Option "remove invalid elements".
FXRadioButton * selectInvalidRoutesAndCancel
Option "Select invalid routes and cancel".
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
FXRadioButton * selectInvalidVehiclesAndCancel
Option "Select invalid vehicles and cancel".
void selectOption(FXObject *option)
select option
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
std::vector< GNEDemandElement * > myInvalidRoutes
vector with the invalid routes
FXDEFMAP(GNEDialog_FixDemandElements) GNEDialog_FixDemandElementsMap[]
groupbox for all radio buttons related with fix vehicle options
#define GUIDesignButtonCancel
Cancel Button.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void selectOption(FXObject *option)
select option
std::vector< GNEDemandElement * > myInvalidVehicles
vector with the invalid vehicles
FXRadioButton * saveInvalidRoutes
Option "Save invalid routes".
FixStoppingPlaces dialog.
FixRouteOptions(GNEDialog_FixDemandElements *fixDemandElementsDialogParents)
constructor
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FixRouteOptions * myFixRouteOptions
fix route options
FXRadioButton * selectInvalidStopsAndCancel
Option "Select invalid stops and cancel".
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
FixStopOptions * myFixStopOptions
fix stop options
std::vector< GNEDemandElement * > myInvalidStops
vector with the invalid stops
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
#define GUIDesignDialogBoxExplicit(width, height)
design for dialog box with specift width and height (for example, additional dialogs) ...
Dialog for edit rerouters.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
void enableFixStopOptions()
enable position options
FXVerticalFrame * myMainFrame
main frame
void selectOption(FXObject *option)
select option
FXTable * myTable
list with the demand elements
void enableFixRouteOptions()
enable position options
DemandList * myDemandList
list with the demand elements
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
#define GUIDesignGroupBoxFrameFill
Group box design extended over frame (X and Y)
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
#define GUIDesignButtonAccept
Accept Button.
groupbox for all radio buttons related with fix route options
GNEViewNet * myViewNet
view net
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
FXRadioButton * saveInvalid
Option "Save invalid".
GNENet * getNet() const
get the net object
DemandList(GNEDialog_FixDemandElements *fixDemandElementsDialogParents, const std::vector< GNEDemandElement *> &invalidDemandElements)
constructor
void enableFixVehicleOptions()
enable consecutive lane options
~GNEDialog_FixDemandElements()
destructor
FixVehicleOptions(GNEDialog_FixDemandElements *fixDemandElementsDialogParents)
constructor
FixVehicleOptions * myFixVehicleOptions
fix vehicle options
FXRadioButton * saveInvalidVehicles
Option "save invalid vehicles".
#define GUIDesignRadioButton
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void disableFixRouteOptions()
disable position options
An Element which don't belongs to GNENet but has influency in the simulation.
FXRadioButton * removeInvalidRoutes
Option "Remove invalid routes".
void disableFixVehicleOptions()
disable consecutive lane options