80 myBeginEndValid(true),
81 myClosingLaneReroutesValid(true),
82 myClosingReroutesValid(true),
83 myDestProbReroutesValid(true),
84 myParkingAreaReroutesValid(true),
85 myRouteProbReroutesValid(true) {
87 for (
auto i : myEditedAdditional->getAdditionalChildren()) {
89 myClosingReroutesEdited.push_back(i);
93 for (
auto i : myEditedAdditional->getAdditionalChildren()) {
95 myClosingLaneReroutesEdited.push_back(i);
99 for (
auto i : myEditedAdditional->getAdditionalChildren()) {
101 myDestProbReroutesEdited.push_back(i);
105 for (
auto i : myEditedAdditional->getAdditionalChildren()) {
107 myRouteProbReroutesEdited.push_back(i);
111 for (
auto i : myEditedAdditional->getAdditionalChildren()) {
113 myParkingAreaRerouteEdited.push_back(i);
117 std::string typeOfOperation = myUpdatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
118 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getAdditionalParents().at(0)->getTagStr() +
" '" + myEditedAdditional->getAdditionalParents().at(0)->getID() +
"'");
143 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
144 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
150 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
151 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
157 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
158 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
164 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
165 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
171 myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
172 myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
175 if (rerouterInterval->getViewNet()->getNet()->getAttributeCarriers().additionals.at(
SUMO_TAG_PARKING_AREA).size() == 0) {
176 parkingAreaRerouteButton->disable();
181 if (rerouterInterval->getAdditionalParents().at(0)->getEdgeChildren().size() > 1) {
182 myAddRouteProbReroute->disable();
183 routeProbRerouteLabel->setText(
"Rerouter has more than one edge");
187 updateClosingLaneReroutesTable();
188 updateClosingReroutesTable();
189 updateDestProbReroutesTable();
190 updateRouteProbReroutesTable();
191 updateParkingAreaReroutesTable();
197 if (myUpdatingElement ==
false) {
198 myEditedAdditional->getViewNet()->getUndoList()->add(
new GNEChange_Additional(myEditedAdditional,
true),
true);
216 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
220 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
228 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
230 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"at least one " +
myEditedAdditional->
getTagStr() +
"'s element must be defined.").c_str());
232 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
236 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
240 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
244 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
246 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"there are invalid " +
toString(
SUMO_TAG_CLOSING_REROUTE) +
"s.").c_str());
248 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
252 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
256 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
260 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
264 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
268 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
272 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
278 getApp()->stopModal(
this, TRUE);
289 getApp()->stopModal(
this, FALSE);
475 if (changeDisallow) {
515 if (changeDisallow) {
651 FXTableItem* item =
nullptr;
664 item =
new FXTableItem(
"");
666 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
667 item->setEnabled(
false);
671 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
672 item->setEnabled(
false);
698 FXTableItem* item =
nullptr;
711 item =
new FXTableItem(
"");
713 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
714 item->setEnabled(
false);
718 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
719 item->setEnabled(
false);
743 FXTableItem* item =
nullptr;
753 item =
new FXTableItem(
"");
755 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
756 item->setEnabled(
false);
760 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
761 item->setEnabled(
false);
785 FXTableItem* item =
nullptr;
795 item =
new FXTableItem(
"");
797 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
798 item->setEnabled(
false);
802 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
803 item->setEnabled(
false);
829 FXTableItem* item =
nullptr;
842 item =
new FXTableItem(
"");
844 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
845 item->setEnabled(
false);
849 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
850 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.
void sortAdditionalChildren()
sort children (used by Rerouters, VSS, TAZs...)
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
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
probability of route of a reroute
probability of destiny of a reroute
long onCmdAccept(FXObject *, FXSelector, void *)
#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
#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/floats
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[]