55 myStepsValids(false) {
68 myStepsTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
69 myStepsTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
100 std::vector<GNEAdditional*> VSSChildren;
102 if (!VSSChild->getTagProperty().isSymbol()) {
103 VSSChildren.push_back(VSSChild);
118 double time = GNEAttributeCarrier::parse<double>(
myStepsTable->getItem(i, 0)->getText().text());
119 double speed = GNEAttributeCarrier::parse<double>(
myStepsTable->getItem(i, 1)->getText().text());
136 std::vector<GNEAdditional*> VSSChildren;
138 if (!VSSChild->getTagProperty().isSymbol()) {
139 VSSChildren.push_back(VSSChild);
143 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
168 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
173 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
179 getApp()->stopModal(
this, TRUE);
190 getApp()->stopModal(
this, FALSE);
208 std::vector<GNEAdditional*> VSSChildren;
210 if (!VSSChild->getTagProperty().isSymbol()) {
211 VSSChildren.push_back(VSSChild);
230 FXTableItem* item =
nullptr;
232 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
234 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_TIME).c_str());
237 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_SPEED).c_str());
240 item =
new FXTableItem(
"");
242 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
243 item->setEnabled(
false);
247 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
248 item->setEnabled(
false);
FXDEFMAP(GNEVariableSpeedSignDialog) GNERerouterDialogMap[]
@ MID_GNE_VARIABLESPEEDSIGN_TABLE
Click over Table.
@ MID_GNE_VARIABLESPEEDSIGN_ADDROW
add row
@ MID_GNE_VARIABLESPEEDSIGN_SORT
sort table values
#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 GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog to edit sequences, parameters, etc.. of Additionals.
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 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
GNENet * getNet() const
get pointer to net
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
GNEViewNet * getViewNet() const
get view net
~GNEVariableSpeedSignDialog()
destructor
FXTable * myStepsTable
Table with the data.
long onCmdClickedStep(FXObject *, FXSelector, void *)
event called after clicked a row
long onCmdCancel(FXObject *, FXSelector, void *)
event called after press cancel button
long onCmdAccept(FXObject *, FXSelector, void *)
event called after press accept button
long onCmdEditStep(FXObject *, FXSelector, void *)
event called after edit row
long onCmdSortSteps(FXObject *, FXSelector, void *)
event called after clicked over sort step button
long onCmdAddStep(FXObject *, FXSelector, void *)
long onCmdReset(FXObject *, FXSelector, void *)
event called after press cancel button
void updateTableSteps()
update data table
GNEUndoList * getUndoList() const
get the undoList object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon