55 myStepsValids(false) {
66 myStepsTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
67 myStepsTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
95 std::vector<GNEAdditional*> VSSChildren;
97 if (!VSSChild->getTagProperty().isSymbol()) {
98 VSSChildren.push_back(VSSChild);
113 const double time = GNEAttributeCarrier::parse<double>(
myStepsTable->getItem(i, 0)->getText().text());
114 const std::string speed =
myStepsTable->getItem(i, 1)->getText().text();
131 std::vector<GNEAdditional*> VSSChildren;
133 if (!VSSChild->getTagProperty().isSymbol()) {
134 VSSChildren.push_back(VSSChild);
138 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
163 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
168 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
174 getApp()->stopModal(
this, TRUE);
185 getApp()->stopModal(
this, FALSE);
203 std::vector<GNEAdditional*> VSSChildren;
205 if (!VSSChild->getTagProperty().isSymbol()) {
206 VSSChildren.push_back(VSSChild);
225 FXTableItem* item =
nullptr;
227 for (
int i = 0; i < (int)VSSChildren.size(); i++) {
229 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_TIME).c_str());
232 item =
new FXTableItem(VSSChildren.at(i)->getAttribute(
SUMO_ATTR_SPEED).c_str());
235 item =
new FXTableItem(
"");
237 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
238 item->setEnabled(
false);
242 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
243 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
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 FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon