92 myBeginEndValid(true),
93 myClosingLaneReroutesValid(true),
94 myClosingReroutesValid(true),
95 myDestProbReroutesValid(true),
96 myParkingAreaReroutesValid(true),
97 myRouteProbReroutesValid(true) {
99 for (
auto i : myEditedAdditional->getAdditionalChilds()) {
101 myClosingReroutesEdited.push_back(i);
105 for (
auto i : myEditedAdditional->getAdditionalChilds()) {
107 myClosingLaneReroutesEdited.push_back(i);
111 for (
auto i : myEditedAdditional->getAdditionalChilds()) {
113 myDestProbReroutesEdited.push_back(i);
117 for (
auto i : myEditedAdditional->getAdditionalChilds()) {
119 myRouteProbReroutesEdited.push_back(i);
123 for (
auto i : myEditedAdditional->getAdditionalChilds()) {
125 myParkingAreaRerouteEdited.push_back(i);
129 std::string typeOfOperation = myUpdatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
130 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getFirstAdditionalParent()->getTagStr() +
" '" + myEditedAdditional->getFirstAdditionalParent()->getID() +
"'");
155 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
156 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
162 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
163 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
169 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
170 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
176 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
177 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
183 myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
184 myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
187 if (rerouterInterval->getViewNet()->getNet()->getAdditionalByType(
SUMO_TAG_PARKING_AREA).size() == 0) {
188 parkingAreaRerouteButton->disable();
193 if (rerouterInterval->getFirstAdditionalParent()->getEdgeChilds().size() > 1) {
194 myAddRouteProbReroute->disable();
195 routeProbRerouteLabel->setText(
"Rerouter has more than one edge");
199 updateClosingLaneReroutesTable();
200 updateClosingReroutesTable();
201 updateDestProbReroutesTable();
202 updateRouteProbReroutesTable();
203 updateParkingAreaReroutesTable();
209 if (myUpdatingElement ==
false) {
210 myEditedAdditional->getViewNet()->getUndoList()->add(
new GNEChange_Additional(myEditedAdditional,
true),
true);
228 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
232 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
240 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
242 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"at least one " +
myEditedAdditional->
getTagStr() +
"'s element must be defined.").c_str());
244 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
248 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
252 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
256 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
258 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"there are invalid " +
toString(
SUMO_TAG_CLOSING_REROUTE) +
"s.").c_str());
260 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
264 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
268 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
272 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
276 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
280 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
284 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
290 getApp()->stopModal(
this, TRUE);
301 getApp()->stopModal(
this, FALSE);
487 if (changeDisallow) {
527 if (changeDisallow) {
663 FXTableItem* item =
nullptr;
676 item =
new FXTableItem(
"");
678 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
679 item->setEnabled(
false);
683 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
684 item->setEnabled(
false);
710 FXTableItem* item =
nullptr;
723 item =
new FXTableItem(
"");
725 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
726 item->setEnabled(
false);
730 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
731 item->setEnabled(
false);
755 FXTableItem* item =
nullptr;
765 item =
new FXTableItem(
"");
767 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
768 item->setEnabled(
false);
772 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
773 item->setEnabled(
false);
797 FXTableItem* item =
nullptr;
807 item =
new FXTableItem(
"");
809 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
810 item->setEnabled(
false);
814 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
815 item->setEnabled(
false);
841 FXTableItem* item =
nullptr;
854 item =
new FXTableItem(
"");
856 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
857 item->setEnabled(
false);
861 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
862 item->setEnabled(
false);
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
long onCmdAddParkingAreaReroute(FXObject *, FXSelector, void *)
add parkingAreaReroute
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
void updateDestProbReroutesTable()
update data of destiny probabilitry reroute table
void resetChanges()
reset changes did in this dialog.
change table route closing reroute
long onCmdClickedParkingAreaReroute(FXObject *, FXSelector, void *)
remove parkingAreaReroute
long onCmdEditDestProbReroute(FXObject *, FXSelector, void *)
/edit dest prob reroute
Dialog for edit rerouter intervals.
change table parkingAreaReroute
bool myBeginEndValid
flag to check if begin an end are valid
long onCmdClickedDestProbReroute(FXObject *, FXSelector, void *)
remove dest prob reroute
lane of a reroute of type closing
#define GUIDesignLabelIcon32x32Thicked
label ticked filled only with an icon of 32x32
bool myClosingReroutesValid
flag to check if closing reroutes are valid
~GNERerouterIntervalDialog()
destructor
Dialog to edit sequences, parameters, etc.. of Additionals.
void updateRouteProbReroutesTable()
update data of probabilitry reroutes table
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
weights: time range begin
long onCmdClickedRouteProbReroute(FXObject *, FXSelector, void *)
remove route prob reroute
change table closing lane reroute reroute
void updateClosingLaneReroutesTable()
update data of closing lane reroute table
FXTable * myClosingLaneRerouteTable
list with closing lane reroutes
bool myRouteProbReroutesValid
flag to check if route prob reroutes are valid
FXTable * myParkingAreaRerouteTable
list with parkingAreaReroutes
FXTextField * myBeginTextField
begin time text field
change table destiny probability reroute
std::vector< GNEAdditional * > myRouteProbReroutesEdited
Route Prob Reroutes edited.
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool myClosingLaneReroutesValid
flag to check if closing lane reroutes are valid
long onCmdAddClosingLaneReroute(FXObject *, FXSelector, void *)
add closing lane reroute
long onCmdEditRouteProbReroute(FXObject *, FXSelector, void *)
/edit route prob reroute
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
std::vector< GNEAdditional * > myParkingAreaRerouteEdited
Parking Area reroute edited.
long onCmdAddRouteProbReroute(FXObject *, FXSelector, void *)
add route prob reroute
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
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
void updateClosingReroutesTable()
update data of closing reroute table
void updateParkingAreaReroutesTable()
update data of parkingAreaReroute table
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
long onCmdAddClosingReroute(FXObject *, FXSelector, void *)
add closing reroute
long onCmdEditClosingReroute(FXObject *, FXSelector, void *)
/edit closing reroute
long onCmdEditClosingLaneReroute(FXObject *, FXSelector, void *)
/edit closing lane reroute
probability of route of a reroute
probability of destiny of a reroute
long onCmdAccept(FXObject *, FXSelector, void *)
void sortAdditionalChilds()
sort childs (used by Rerouters and VSS)
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
long onCmdClickedClosingLaneReroute(FXObject *, FXSelector, void *)
remove closing lane reroute
#define GUIDesignButtonIcon
button only with icon (23x23)
FXTable * myDestProbRerouteTable
list with destiny probability reroutes
bool myDestProbReroutesValid
flag to check if Destiny probability reroutes are valid
GNEAdditional * myEditedAdditional
pointer to edited aditional
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
bool myParkingAreaReroutesValid
flag to check if parkingAreaReroutes are valid
GNEAdditional * getFirstAdditionalParent() const
#define GUIDesignTextFieldNCol
Num of column of text field.
entry for an alternative parking zone
FXTable * myRouteProbRerouteTable
list with route probability reroute
FXTextField * myEndTextField
end time text field
std::vector< GNEAdditional * > myClosingReroutesEdited
closing Reroutes edited
long onCmdAddDestProbReroute(FXObject *, FXSelector, void *)
add dest prob reroute
FXLabel * myCheckLabel
begin/end time check label
change table route probability reroute
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void acceptChanges()
Accept changes did in this dialog.
add route probability route
An Element which don't belongs to GNENet but has influency in the simulation.
long onCmdClickedClosingReroute(FXObject *, FXSelector, void *)
remove closing reroute
add destiny probability route
const std::string & getTagStr() const
get tag assigned to this object in string format
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 ...
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/doubles
FXTable * myClosingRerouteTable
list with closing reroutes
long onCmdEditParkingAreaReroute(FXObject *, FXSelector, void *)
/edit parkingAreaReroute
std::vector< GNEAdditional * > myDestProbReroutesEdited
Dest Prob Reroutes edited.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
long onCmdChangeBeginEnd(FXObject *, FXSelector, void *)
called when begin or endis changed
std::vector< GNEAdditional * > myClosingLaneReroutesEdited
closing Lane Reroutes edited
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left and height of 23 ...
FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[]