93 myEditedRerouterInterval(rerouterInterval),
94 myUpdatingElement(updatingElement),
95 myBeginEndValid(true),
96 myClosingLaneReroutesValid(true),
97 myClosingReroutesValid(true),
98 myDestProbReroutesValid(true),
99 myRouteProbReroutesValid(true) {
101 std::string typeOfOperation = myUpdatingElement ?
"Edit " +
toString(myEditedRerouterInterval->getTag()) +
" of " :
"Create " +
toString(myEditedRerouterInterval->getTag()) +
" for ";
102 changeAdditionalDialogHeader(typeOfOperation +
toString(myEditedRerouterInterval->getRerouterParent()->getTag()) +
" '" + myEditedRerouterInterval->getRerouterParent()->getID() +
"'");
126 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
127 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
133 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
134 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
140 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
141 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
147 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
148 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
151 updateClosingLaneReroutesTable();
152 updateClosingReroutesTable();
153 updateDestProbReroutesTable();
154 updateRouteProbReroutesTable();
160 if (myUpdatingElement ==
false) {
161 myEditedRerouterInterval->getRerouterParent()->getViewNet()->getUndoList()->add(
new GNEChange_RerouterItem(myEditedRerouterInterval,
true),
true);
192 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
204 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"at least one " +
toString(
myEditedRerouterInterval->
getTag()) +
"'s element must be defined.").c_str());
207 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
219 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
228 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(),
"%s", (operationType +
"there are invalid " +
toString(
SUMO_TAG_CLOSING_REROUTE) +
"s.").c_str());
231 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
243 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
255 WRITE_WARNING(
"Closed FXMessageBox of type 'warning' with 'OK'");
262 getApp()->stopModal(
this, TRUE);
273 getApp()->stopModal(
this, FALSE);
547 FXTableItem* item = 0;
560 item =
new FXTableItem(
"");
562 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
563 item->setEnabled(
false);
567 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
568 item->setEnabled(
false);
594 FXTableItem* item = 0;
607 item =
new FXTableItem(
"");
609 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
610 item->setEnabled(
false);
614 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
615 item->setEnabled(
false);
639 FXTableItem* item = 0;
649 item =
new FXTableItem(
"");
651 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
652 item->setEnabled(
false);
656 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
657 item->setEnabled(
false);
681 FXTableItem* item = 0;
691 item =
new FXTableItem(
"");
693 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
694 item->setEnabled(
false);
698 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
699 item->setEnabled(
false);
#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.
const std::vector< GNEDestProbReroute * > & getDestProbReroutes() const
get destiny probability reroutes
const std::vector< GNEClosingLaneReroute * > & getClosingLaneReroutes() const
get closing reroutes
long onCmdEditDestProbReroute(FXObject *, FXSelector, void *)
/edit dest prob reroute
change table clisng lane reroute reroute
Dialog for edit rerouter intervals.
bool myBeginEndValid
flag to check if begin an end are valid
long onCmdClickedDestProbReroute(FXObject *, FXSelector, void *)
remove dest prob reroute
GNERerouterInterval * getEditedRerouterInterval() const
get edited Rerouter Interval
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
bool isValid(SumoXMLAttr key, const std::string &value)
weights: time range begin
long onCmdClickedRouteProbReroute(FXObject *, FXSelector, void *)
remove route prob 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
FXTextField * myBeginTextField
begin time text field
const std::vector< GNERouteProbReroute * > & getRouteProbReroutes() const
get reoute probability reroutes
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
add destiny probability route
#define WRITE_WARNING(msg)
bool myClosingLaneReroutesValid
flag to check if closing lane reroutes are valid
static OptionsCont & getOptions()
Retrieves the options.
long onCmdAddClosingLaneReroute(FXObject *, FXSelector, void *)
add closing lane reroute
long onCmdEditRouteProbReroute(FXObject *, FXSelector, void *)
/edit route prob reroute
bool isValid(SumoXMLAttr key, const std::string &value)
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
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
void updateClosingReroutesTable()
update data of closing reroute 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
bool myUpdatingElement
flag to indicate if rerouter interval is being created or modified
GNERerouter * getRerouterParent() const
get rerouter parent
probability of route of a reroute
probability of destiny of a reroute
long onCmdAccept(FXObject *, FXSelector, void *)
bool isValid(SumoXMLAttr key, const std::string &value)
#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
#define GUIDesignTextFieldNCol
Num of column of text field.
change table route probability reroute
FXTable * myRouteProbRerouteTable
list with route probability reroute
FXTextField * myEndTextField
end time text field
const std::vector< GNEClosingReroute * > & getClosingReroutes() const
get closing reroutes
long onCmdAddDestProbReroute(FXObject *, FXSelector, void *)
add dest prob reroute
FXLabel * myCheckLabel
begin/end time check label
void sortIntervals()
sort intervals
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void acceptChanges()
Accept changes did in this dialog.
GNERerouterInterval * myEditedRerouterInterval
pointer to rerouter interval
long onCmdClickedClosingReroute(FXObject *, FXSelector, void *)
remove closing reroute
void cancelChanges()
Cancel changes did in this dialog.
bool isValid(SumoXMLAttr key, const std::string &value)
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left and height of 23 ...
bool isValid(SumoXMLAttr key, const std::string &value)
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/doubles
change table route closing reroute
change table destiny probability reroute
FXTable * myClosingRerouteTable
list with closing reroutes
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
long onCmdChangeBeginEnd(FXObject *, FXSelector, void *)
called when begin or endis changed
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left and height of 23 ...
add route probability route
FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[]
SumoXMLTag getTag() const
get XML Tag assigned to this object