66 TL(
"Remove invalid routes"),
"",
67 TL(
"Remove invalid routes and save"),
71 TL(
"Save invalid routes"),
"",
72 TL(
"Save invalid routes"),
76 TL(
"Select invalid routes"),
"",
77 TL(
"Select invalid routes and stop saving"),
81 TL(
"Remove stops out of route"),
"",
82 TL(
"Remove stops out of route"),
99 if (solution ==
"saveRouteInvalids") {
101 }
else if (solution ==
"removeRouteInvalids") {
103 }
else if (solution ==
"selectRouteInvalids") {
122 net->deleteDemandElement(conflictedElement.getElement()->getParentDemandElements().front(), undoList);
124 net->deleteDemandElement(conflictedElement.getElement(), undoList);
134 conflictedElement.getElement()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
144 std::vector<GNEDemandElement*> stopsToRemove;
146 const auto invaldstops = conflictedElement.getElement()->getInvalidStops();
148 stopsToRemove.insert(stopsToRemove.end(), invaldstops.begin(), invaldstops.end());
153 for (
const auto& stopToRemove : stopsToRemove) {
154 net->deleteDemandElement(stopToRemove, undoList);
190 TL(
"Remove invalid vehicles"),
"",
191 TL(
"Remove invalid vehicles and save"),
195 TL(
"Save invalid vehicles"),
"",
196 TL(
"Save invalid vehicles"),
200 TL(
"Select invalid vehicles"),
"",
201 TL(
"Select invalid vehicles and stop saving"),
205 TL(
"Remove stops out of route"),
"",
206 TL(
"Remove stops out of vehicle's route"),
237 if (net->getAttributeCarriers()->retrieveDemandElement(conflictedElement.getElement()->getTagProperty()->getTag(), conflictedElement.getID(),
false) !=
nullptr) {
238 net->deleteDemandElement(conflictedElement.getElement(), undoList);
248 conflictedElement.getElement()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
258 std::vector<GNEDemandElement*> stopsToRemove;
260 const auto invaldstops = conflictedElement.getElement()->getInvalidStops();
262 stopsToRemove.insert(stopsToRemove.end(), invaldstops.begin(), invaldstops.end());
267 for (
const auto& stopToRemove : stopsToRemove) {
268 net->deleteDemandElement(stopToRemove, undoList);
304 TL(
"Activate friendlyPos"),
"",
305 TL(
"Activate friendlyPos and save"),
309 TL(
"Save invalid stops"),
"",
310 TL(
"Save elements with invalid positions"),
314 TL(
"Select conflicted stops"),
"",
315 TL(
"Select conflicted stops and abort saving"),
319 TL(
"Fix positions and save"),
"",
320 TL(
"Fix stop positions and save"),
355 conflictedElement.getElement()->fixDemandElementProblem();
362 conflictedElement.getElement()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
408 TL(
"Remove invalid plans"),
"",
409 TL(
"Remove invalid plans"),
413 TL(
"Save invalid plans"),
"",
414 TL(
"Save invalid plans"),
418 TL(
"Select conflicted plans"),
"",
419 TL(
"Select conflicted plans and abort saving"),
447 net->deleteDemandElement(conflictedElement.getElement(), undoList);
454 conflictedElement.getElement()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
489 const std::vector<GNEDemandElement*>& elements) :
501 std::vector<ConflictElement> invalidRoutes, invalidVehicles, invalidStops, invalidPlans;
503 for (
const auto& invalidDemandElement : elements) {
505 auto fixElement = ConflictElement(invalidDemandElement,
506 invalidDemandElement->getID(),
507 invalidDemandElement->getACIcon(),
508 invalidDemandElement->getDemandElementProblem());
510 if (invalidDemandElement->getTagProperty()->isRoute()) {
511 invalidRoutes.push_back(fixElement);
512 }
else if (invalidDemandElement->getTagProperty()->isVehicle()) {
513 invalidVehicles.push_back(fixElement);
514 }
else if (invalidDemandElement->getTagProperty()->isVehicleStop()) {
515 invalidStops.push_back(fixElement);
517 invalidPlans.push_back(fixElement);
FXDEFMAP(GNEFixDemandElementsDialog::FixRouteOptions) FixRouteOptionsMap[]
@ MID_CHOOSEN_OPERATION
set type of selection
#define GUIDesignRadioButtonFix
design for radio button with fixed height (used in fix elements dialogs)
#define GUIDesignCheckButtonFix
design for check button with fixed height (used in fix elements dialogs)
GUIIcon
An enumeration of icons used by the gui applications.
@ GNE_TAG_ROUTE_EMBEDDED
embedded route
@ GNE_ATTR_SELECTED
element is selected
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
The main window of Netedit.
void openDialog(FXWindow *focusableElement=nullptr)
groupbox for all radio buttons related with fix person plan options
FXRadioButton * mySelectInvalidPlans
Option "Select invalid person plans and cancel".
void selectInternalTestSolution(const std::string &solution)
select internal test solution
FixPlanOptions(GNEFixDemandElementsDialog *fixDemandElementsParent)
FOX-declaration.
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
called when user select a option
FXRadioButton * myRemoveInvalidPlan
FOX needs this.
FXRadioButton * mySaveInvalid
Option "Save invalid".
bool applyFixOption()
apply selected fix option
groupbox for all radio buttons related with fix route options
FixRouteOptions(GNEFixDemandElementsDialog *fixDemandElementsParent)
FOX-declaration.
FXCheckButton * myRemoveStopsOutOfRoute
Option "Remove stops out of route".
FXRadioButton * myRemoveInvalidRoutes
FOX needs this.
FXRadioButton * mySelectRouteInvalids
Option "Select invalid routes and cancel".
FXRadioButton * mySaveInvalidRoutes
Option "Save invalid routes".
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
called when user select a option
void selectInternalTestSolution(const std::string &solution)
select internal test solution
bool applyFixOption()
apply selected fix option
groupbox for all radio buttons related with fix stop options
bool applyFixOption()
apply selected fix option
FXRadioButton * mySaveInvalid
Option "Save invalid".
FXRadioButton * myActivateFriendlyPosition
FOX needs this.
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
called when user select a option
FXRadioButton * myFixPositions
Option "Fix Positions and save".
void selectInternalTestSolution(const std::string &solution)
select internal test solution
FXRadioButton * mySelectInvalidStops
Option "Select invalid stops and cancel".
FixStopPositionOptions(GNEFixDemandElementsDialog *fixDemandElementsParent)
FOX-declaration.
groupbox for all radio buttons related with fix vehicle options
void selectInternalTestSolution(const std::string &solution)
select internal test solution
FixVehicleOptions(GNEFixDemandElementsDialog *fixDemandElementsParent)
FOX-declaration.
FXRadioButton * mySelectInvalidVehicles
Option "Select invalid vehicles and cancel".
bool applyFixOption()
apply selected fix option
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
called when user select a option
FXCheckButton * myRemoveStopsOutOfVehicle
Option "Remove stops out of vehicle".
FXRadioButton * mySaveInvalidVehicles
Option "save invalid vehicles".
FXRadioButton * myRemoveInvalidVehicles
FOX needs this.
GNEFixDemandElementsDialog(GNEApplicationWindow *mainWindow, const std::vector< GNEDemandElement * > &elements)
Constructor.
FixPlanOptions * myFixPlanOptions
fix person plan options
FixRouteOptions * myFixRouteOptions
fix route options
~GNEFixDemandElementsDialog()
destructor
FixStopPositionOptions * myFixStopPositionOptions
fix stop options
FixVehicleOptions * myFixVehicleOptions
fix vehicle options
void registerOption(FXWindow *option)
add option to options container (used for adjust width and enable/disable)
std::vector< ConflictElement > myConflictedElements
list of elements to fix
FXVerticalFrame * myRightFrameOptions
vertical right frame for options
GNEFixElementsDialog * myFixElementDialogParent
pointer to the parent dialog
FixOptions(GNEFixElementsDialog< T > *fixElementDialog, FXVerticalFrame *frameParent, const std::string &title)
constructor
FXVerticalFrame * myLeftFrameOptions
vertical left frame for options
GNEFixElementsDialog(GNEApplicationWindow *mainWindow, const std::string title, GUIIcon icon, DialogType type)
FXVerticalFrame * myRightFrame
FXVerticalFrame * myLeftFrame
static FXCheckButton * buildFXCheckButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXObject *tgt, FXSelector sel, FXuint opts=CHECKBUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build check button
static FXRadioButton * buildFXRadioButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXObject *tgt, FXSelector sel, FXuint opts=RADIOBUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build radio button
MFXGroupBoxModule (based on FXGroupBox).