58 myAdditionalList =
new AdditionalList(
this, invalidSingleLaneAdditionals, invalidMultiLaneAdditionals);
64 if (myAdditionalList->myInvalidSingleLaneAdditionals.empty()) {
65 myPositionOptions->disablePositionOptions();
68 if (myAdditionalList->myInvalidMultiLaneAdditionals.empty()) {
69 myConsecutiveLaneOptions->disableConsecutiveLaneOptions();
78 myAcceptButton->setFocus();
96 bool continueSaving =
true;
110 i->fixAdditionalProblem();
121 continueSaving =
false;
131 i->fixAdditionalProblem();
136 for (
auto i : copyOfInvalidMultiLaneAdditionals) {
137 if (!i->isAdditionalValid()) {
158 i->fixAdditionalProblem();
163 if (continueSaving) {
165 getApp()->stopModal(
this, TRUE);
168 getApp()->stopModal(
this, FALSE);
177 getApp()->stopModal(
this, FALSE);
187 myInvalidSingleLaneAdditionals(invalidSingleLaneAdditionals),
188 myInvalidMultiLaneAdditionals(invalidMultiLaneAdditionals) {
191 myTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
192 myTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
201 myTable->setColumnWidth(1, 160);
202 myTable->setColumnWidth(2, 280);
205 myTable->setColumnText(2,
"Conflict");
206 myTable->getRowHeader()->setWidth(0);
209 FXTableItem* item =
nullptr;
213 item =
new FXTableItem(
"", i->getIcon());
214 item->setIconPosition(FXTableItem::CENTER_X);
215 myTable->setItem(indexRow, 0, item);
217 item =
new FXTableItem(i->getID().c_str());
218 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
219 myTable->setItem(indexRow, 1, item);
221 item =
new FXTableItem(i->getAdditionalProblem().c_str());
222 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
223 myTable->setItem(indexRow, 2, item);
230 item =
new FXTableItem(
"", i->getIcon());
231 item->setIconPosition(FXTableItem::CENTER_X);
232 myTable->setItem(indexRow, 0, item);
234 item =
new FXTableItem(i->getID().c_str());
235 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
236 myTable->setItem(indexRow, 1, item);
238 item =
new FXTableItem((i->getAdditionalProblem()).c_str());
239 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
240 myTable->setItem(indexRow, 2, item);
256 activateFriendlyPositionAndSave =
new FXRadioButton(RadioButtonsLeft,
"Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors",
258 saveInvalid =
new FXRadioButton(RadioButtonsLeft,
"Save invalid positions\t\tSave stopping places and E2 detectors with invalid positions",
262 fixPositionsAndSave =
new FXRadioButton(RadioButtonsRight,
"Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed",
264 selectInvalidStopsAndCancel =
new FXRadioButton(RadioButtonsRight,
"Select invalid additionals\t\tCancel saving of additionals and select invalid stopping places and E2 detectors",
324 buildConnectionBetweenLanes =
new FXRadioButton(RadioButtonsLeft,
"Build connections between lanes\t\tNew connections will be created between non-connected lanes",
326 removeInvalidElements =
new FXRadioButton(RadioButtonsLeft,
"Remove invalid E2 detectors\t\tRemove Multilane E2 Detectors with non-connected lanes",
332 activateFriendlyPositionAndSave =
new FXRadioButton(RadioButtonsRight,
"Activate friendlyPos and save\t\tFriendly pos parameter will be activated in all stopping places and E2 detectors",
334 fixPositionsAndSave =
new FXRadioButton(RadioButtonsRight,
"Fix positions and save\t\tPosition of stopping places and E2 detectors will be fixed",
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
#define GUIDesignHorizontalFrame
#define GUIDesignVerticalSeparator
vertical separator
void selectOption(FXObject *option)
select option
FXVerticalFrame * myMainFrame
main
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
#define GUIDesignButtonCancel
Cancel Button.
void disablePositionOptions()
disable position options
FXDEFMAP(GNEDialog_FixAdditionalElements) GNEDialog_FixAdditionalElementsMap[]
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...
Dialog for edit rerouters.
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
groupbox for group all radio buttons related to additionals with consecutive lanes ...
PositionOptions(GNEDialog_FixAdditionalElements *fixAdditionalPositions)
build Position Options
FixStoppingPlaces dialog.
FXRadioButton * saveInvalid
Option "Save invalid".
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
groupbox for group all radio buttons related to additionals with single lanes
void enablePositionOptions()
enable position options
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
AdditionalList(GNEDialog_FixAdditionalElements *fixAdditionalPositions, const std::vector< GNEAdditional *> &invalidSingleLaneAdditionals, const std::vector< GNEAdditional *> &invalidMultiLaneAdditionals)
constructor
#define GUIDesignDialogBoxExplicit(width, height)
design for dialog box with specift width and height (for example, additional dialogs) ...
void disableConsecutiveLaneOptions()
disable consecutive lane options
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.
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
FXRadioButton * removeInvalidElements
Option "remove invalid elements".
FXRadioButton * buildConnectionBetweenLanes
Option "build connections between lanes".
FXRadioButton * selectInvalidStopsAndCancel
Option "Select invalid stops and cancel".
ConsecutiveLaneOptions(GNEDialog_FixAdditionalElements *fixAdditionalPositions)
build consecutive lane Options
FXTable * myTable
list with the stoppingPlaces and detectors
std::vector< GNEAdditional * > myInvalidMultiLaneAdditionals
vector with the invalid multi-lane additionals
#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.
void selectOption(FXObject *option)
select option
PositionOptions * myPositionOptions
position options
ConsecutiveLaneOptions * myConsecutiveLaneOptions
consecutive lane options
void enableConsecutiveLaneOptions()
enable consecutive lane options
An Element which don't belongs to GNENet but has influency in the simulation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
~GNEDialog_FixAdditionalElements()
destructor
GNENet * getNet() const
get the net object
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
#define GUIDesignRadioButton
GNEViewNet * myViewNet
view net
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
AdditionalList * myAdditionalList
Additional List.
std::vector< GNEAdditional * > myInvalidSingleLaneAdditionals
vector with the invalid single-lane additionals