54 myStepsValids(false) {
65 myStepsTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
66 myStepsTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
94 std::vector<GNEAdditional*> VSSChildren;
96 if (!VSSChild->getTagProperty()->isSymbol()) {
97 VSSChildren.push_back(VSSChild);
112 const double time = GNEAttributeCarrier::parse<double>(
myStepsTable->getItem(i, 0)->getText().text());
113 const std::string speed =
myStepsTable->getItem(i, 1)->getText().text();
130 std::vector<GNEAdditional*> VSSChildren;
132 if (!VSSChild->getTagProperty()->isSymbol()) {
133 VSSChildren.push_back(VSSChild);
137 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
169 getApp()->stopModal(
this, TRUE);
180 getApp()->stopModal(
this, FALSE);
198 std::vector<GNEAdditional*> VSSChildren;
200 if (!VSSChild->getTagProperty()->isSymbol()) {
201 VSSChildren.push_back(VSSChild);
220 FXTableItem* item =
nullptr;
222 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
224 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_TIME).c_str());
227 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_SPEED).c_str());
230 item =
new FXTableItem(
"");
232 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
233 item->setEnabled(
false);
237 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
238 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 GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelThick(justify)
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
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.
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.
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
GNENet * getNet() const
get pointer to net
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
GNEViewNet * getViewNet() const
get view net
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...
~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 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