79 myBeginEndValid(true),
80 myClosingLaneReroutesValid(true),
81 myClosingReroutesValid(true),
82 myDestProbReroutesValid(true),
83 myParkingAreaReroutesValid(true),
84 myRouteProbReroutesValid(true) {
86 for (
auto i : myEditedAdditional->getChildAdditionals()) {
88 myClosingReroutesEdited.push_back(i);
92 for (
auto i : myEditedAdditional->getChildAdditionals()) {
94 myClosingLaneReroutesEdited.push_back(i);
98 for (
auto i : myEditedAdditional->getChildAdditionals()) {
100 myDestProbReroutesEdited.push_back(i);
104 for (
auto i : myEditedAdditional->getChildAdditionals()) {
106 myRouteProbReroutesEdited.push_back(i);
110 for (
auto i : myEditedAdditional->getChildAdditionals()) {
112 myParkingAreaRerouteEdited.push_back(i);
116 std::string typeOfOperation = myUpdatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
117 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() +
" '" + myEditedAdditional->getParentAdditionals().at(0)->getID() +
"'");
142 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
143 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
149 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
150 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
156 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
157 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
163 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
164 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
170 myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
171 myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
174 if (rerouterInterval->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_PARKING_AREA).size() == 0) {
175 parkingAreaRerouteButton->disable();
180 if (rerouterInterval->getParentAdditionals().at(0)->getChildEdges().size() > 1) {
181 myAddRouteProbReroute->disable();
182 routeProbRerouteLabel->setText(
"Rerouter has more than one edge");
186 updateClosingLaneReroutesTable();
187 updateClosingReroutesTable();
188 updateDestProbReroutesTable();
189 updateRouteProbReroutesTable();
190 updateParkingAreaReroutesTable();
196 if (myUpdatingElement ==
false) {
197 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(
new GNEChange_Additional(myEditedAdditional,
true),
true);
215 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
219 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
227 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
229 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"at least one " +
myEditedAdditional->
getTagStr() +
"'s element must be defined.").c_str());
231 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
235 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
239 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
243 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
245 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"there are invalid " +
toString(
SUMO_TAG_CLOSING_REROUTE) +
"s.").c_str());
247 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
251 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
255 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
259 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
263 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
267 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
271 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
277 getApp()->stopModal(
this, TRUE);
288 getApp()->stopModal(
this, FALSE);
506 if (changeDisallow) {
546 if (changeDisallow) {
680 FXTableItem* item =
nullptr;
693 item =
new FXTableItem(
"");
695 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
696 item->setEnabled(
false);
700 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
701 item->setEnabled(
false);
727 FXTableItem* item =
nullptr;
740 item =
new FXTableItem(
"");
742 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
743 item->setEnabled(
false);
747 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
748 item->setEnabled(
false);
772 FXTableItem* item =
nullptr;
782 item =
new FXTableItem(
"");
784 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
785 item->setEnabled(
false);
789 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
790 item->setEnabled(
false);
814 FXTableItem* item =
nullptr;
824 item =
new FXTableItem(
"");
826 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
827 item->setEnabled(
false);
831 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
832 item->setEnabled(
false);
858 FXTableItem* item =
nullptr;
871 item =
new FXTableItem(
"");
873 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
874 item->setEnabled(
false);
878 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
879 item->setEnabled(
false);
FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[]
@ MID_GNE_REROUTEDIALOG_EDIT_INTERVAL
edit interval
@ MID_GNE_REROUTEDIALOG_TABLE_PARKINGAREAREROUTE
change table parkingAreaReroute
@ MID_GNE_REROUTEDIALOG_ADD_CLOSINGREROUTE
add closing reroute
@ MID_GNE_REROUTEDIALOG_TABLE_CLOSINGLANEREROUTE
change table closing lane reroute reroute
@ MID_GNE_REROUTEDIALOG_ADD_CLOSINGLANEREROUTE
add closing lane reroute
@ MID_GNE_REROUTEDIALOG_TABLE_ROUTEPROBREROUTE
change table route probability reroute
@ MID_GNE_REROUTEDIALOG_ADD_PARKINGAREAREROUTE
add parkingAreaReroute
@ MID_GNE_REROUTEDIALOG_ADD_DESTPROBREROUTE
add destiny probability route
@ MID_GNE_REROUTEDIALOG_TABLE_DESTPROBREROUTE
change table destiny probability reroute
@ MID_GNE_REROUTEDIALOG_TABLE_CLOSINGREROUTE
change table route closing reroute
@ MID_GNE_REROUTEDIALOG_ADD_ROUTEPROBREROUTE
add route probability route
#define GUIDesignButtonIcon
button only with icon
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
#define GUIDesignHeight
define a standard height for all elements (Change it carefully)
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
#define GUIDesignLabelIcon32x32Thicked
label ticked filled only with an icon of 32x32
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
#define WRITE_WARNING(msg)
const SVCPermissions SVCAll
all VClasses are allowed
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_PARKING_ZONE_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destiny of a reroute
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog to edit sequences, parameters, etc.. of Additionals.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited aditional
void resetChanges()
reset changes did in this dialog.
An Element which don't belongs to GNENet but has influency in the simulation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
A road/street connecting two junctions (netedit-version)
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > & getAdditionals() const
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEViewNet * getViewNet() const
get view net
Dialog for edit rerouter intervals.
long onCmdAddDestProbReroute(FXObject *, FXSelector, void *)
add dest prob reroute
~GNERerouterIntervalDialog()
destructor
long onCmdClickedClosingReroute(FXObject *, FXSelector, void *)
remove closing reroute
bool myRouteProbReroutesValid
flag to check if route prob reroutes are valid
long onCmdAddClosingReroute(FXObject *, FXSelector, void *)
add closing reroute
void updateRouteProbReroutesTable()
update data of probabilitry reroutes table
std::vector< GNEAdditional * > myRouteProbReroutesEdited
Route Prob Reroutes edited.
long onCmdClickedClosingLaneReroute(FXObject *, FXSelector, void *)
remove closing lane reroute
void updateClosingLaneReroutesTable()
update data of closing lane reroute table
FXTable * myDestProbRerouteTable
list with destiny probability reroutes
bool myDestProbReroutesValid
flag to check if Destiny probability reroutes are valid
long onCmdClickedRouteProbReroute(FXObject *, FXSelector, void *)
remove route prob reroute
FXTable * myClosingRerouteTable
list with closing reroutes
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myEndTextField
end time text field
long onCmdEditClosingLaneReroute(FXObject *, FXSelector, void *)
/edit closing lane reroute
std::vector< GNEAdditional * > myClosingReroutesEdited
closing Reroutes edited
void updateClosingReroutesTable()
update data of closing reroute table
long onCmdEditRouteProbReroute(FXObject *, FXSelector, void *)
/edit route prob reroute
void updateDestProbReroutesTable()
update data of destiny probabilitry reroute table
FXLabel * myCheckLabel
begin/end time check label
FXTextField * myBeginTextField
begin time text field
std::vector< GNEAdditional * > myClosingLaneReroutesEdited
closing Lane Reroutes edited
FXTable * myParkingAreaRerouteTable
list with parkingAreaReroutes
bool myClosingReroutesValid
flag to check if closing reroutes are valid
long onCmdAddRouteProbReroute(FXObject *, FXSelector, void *)
add route prob reroute
long onCmdChangeBeginEnd(FXObject *, FXSelector, void *)
called when begin or endis changed
long onCmdAddParkingAreaReroute(FXObject *, FXSelector, void *)
add parkingAreaReroute
bool myParkingAreaReroutesValid
flag to check if parkingAreaReroutes are valid
long onCmdAddClosingLaneReroute(FXObject *, FXSelector, void *)
add closing lane reroute
FXTable * myClosingLaneRerouteTable
list with closing lane reroutes
bool myBeginEndValid
flag to check if begin an end are valid
FXTable * myRouteProbRerouteTable
list with route probability reroute
long onCmdEditClosingReroute(FXObject *, FXSelector, void *)
/edit closing reroute
long onCmdClickedParkingAreaReroute(FXObject *, FXSelector, void *)
remove parkingAreaReroute
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
std::vector< GNEAdditional * > myParkingAreaRerouteEdited
Parking Area reroute edited.
long onCmdEditDestProbReroute(FXObject *, FXSelector, void *)
/edit dest prob reroute
bool myClosingLaneReroutesValid
flag to check if closing lane reroutes are valid
long onCmdClickedDestProbReroute(FXObject *, FXSelector, void *)
remove dest prob reroute
long onCmdAccept(FXObject *, FXSelector, void *)
long onCmdEditParkingAreaReroute(FXObject *, FXSelector, void *)
/edit parkingAreaReroute
std::vector< GNEAdditional * > myDestProbReroutesEdited
Dest Prob Reroutes edited.
void updateParkingAreaReroutesTable()
update data of parkingAreaReroute table
GNEUndoList * getUndoList() const
get the undoList object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element