78 myBeginEndValid(true),
79 myClosingLaneReroutesValid(true),
80 myClosingReroutesValid(true),
81 myDestProbReroutesValid(true),
82 myParkingAreaReroutesValid(true),
83 myRouteProbReroutesValid(true) {
85 for (
auto i : myEditedAdditional->getChildAdditionals()) {
87 myClosingReroutesEdited.push_back(i);
91 for (
auto i : myEditedAdditional->getChildAdditionals()) {
93 myClosingLaneReroutesEdited.push_back(i);
97 for (
auto i : myEditedAdditional->getChildAdditionals()) {
99 myDestProbReroutesEdited.push_back(i);
103 for (
auto i : myEditedAdditional->getChildAdditionals()) {
105 myRouteProbReroutesEdited.push_back(i);
109 for (
auto i : myEditedAdditional->getChildAdditionals()) {
111 myParkingAreaRerouteEdited.push_back(i);
115 std::string typeOfOperation = myUpdatingElement ?
"Edit " + myEditedAdditional->getTagStr() +
" of " :
"Create " + myEditedAdditional->getTagStr() +
" for ";
116 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() +
" '" + myEditedAdditional->getParentAdditionals().at(0)->getID() +
"'");
141 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
142 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
148 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
149 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
155 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
156 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
162 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
163 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
169 myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
170 myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
173 if (rerouterInterval->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_PARKING_AREA).size() == 0) {
174 parkingAreaRerouteButton->disable();
180 if (rerouterInterval->getParentAdditionals().at(0)->getChildEdges().size() > 1) {
181 myAddRouteProbReroute->disable();
182 routeProbRerouteLabel->setText(
TL(
"Rerouter has more than one edge"));
187 updateClosingLaneReroutesTable();
188 updateClosingReroutesTable();
189 updateDestProbReroutesTable();
190 updateRouteProbReroutesTable();
191 updateParkingAreaReroutesTable();
197 if (!myUpdatingElement) {
198 myEditedAdditional->getNet()->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);
372 if (routes.size() > 0) {
515 if (changeDisallow) {
558 if (changeDisallow) {
695 FXTableItem* item =
nullptr;
708 item =
new FXTableItem(
"");
710 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
711 item->setEnabled(
false);
715 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
716 item->setEnabled(
false);
742 FXTableItem* item =
nullptr;
755 item =
new FXTableItem(
"");
757 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
758 item->setEnabled(
false);
762 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
763 item->setEnabled(
false);
787 FXTableItem* item =
nullptr;
797 item =
new FXTableItem(
"");
799 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
800 item->setEnabled(
false);
804 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
805 item->setEnabled(
false);
829 FXTableItem* item =
nullptr;
839 item =
new FXTableItem(
"");
841 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
842 item->setEnabled(
false);
846 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
847 item->setEnabled(
false);
873 FXTableItem* item =
nullptr;
886 item =
new FXTableItem(
"");
888 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
889 item->setEnabled(
false);
893 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
894 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 destination probability route
@ MID_GNE_REROUTEDIALOG_TABLE_DESTPROBREROUTE
change table destination 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 GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#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(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame 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_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination 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
int GUIDesignHeight
the default size for GUI elements
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 additional
void resetChanges()
reset changes did in this dialog.
An Element which don't belong to GNENet but has influence 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 correspondent 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< SumoXMLTag, std::map< const GUIGlObject *, GNEAdditional * > > & getAdditionals() const
get additionals
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this 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 probability 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 destination probability reroutes
bool myDestProbReroutesValid
flag to check if Destination 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 destination probability 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 end is 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
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
GNEUndoList * getUndoList() const
get the undoList object
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_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 button
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