47FXIMPLEMENT(
GNEAllowVClassesDialog, FXDialogBox, GNEAllowVClassesDialogMap, ARRAYNUMBER(GNEAllowVClassesDialogMap))
58 myAcceptChanges(acceptChanges),
70 myAcceptChanges(acceptChanges),
83 FXButton* buttonPressed =
dynamic_cast<FXButton*
>(obj);
86 if (vClass.second.first == buttonPressed) {
150 std::vector<std::string> allowedVehicles, disallowedVehicles;
169 getApp()->stopModal(
this, TRUE);
179 getApp()->stopModal(
this, FALSE);
194 if (allow ==
"all") {
202 const std::set<std::string> allowSet(allowStringVector.begin(), allowStringVector.end());
230 new FXLabel(myOptionsFrame,
TL(
"Allow only road vehicles"),
nullptr,
GUIDesignLabelThick(JUSTIFY_LEFT));
233 new FXLabel(myOptionsFrame,
TL(
"Allow only rail vehicles"),
nullptr,
GUIDesignLabelThick(JUSTIFY_LEFT));
236 new FXLabel(myOptionsFrame,
TL(
"Disallow all vehicles"),
nullptr,
GUIDesignLabelThick(JUSTIFY_LEFT));
240 FXHorizontalFrame* myVehiclesFrame =
new FXHorizontalFrame(myGroupBoxVehiclesFrame,
GUIDesignContentsFrame);
297 labelVehicleIcon->setBackColor(FXRGBA(255, 255, 255, 255));
305 new FXLabel(buttonAndInformationFrame, description.c_str(),
nullptr,
GUIDesignLabelThick(JUSTIFY_LEFT));
FXDEFMAP(GNEAllowVClassesDialog) GNEAllowVClassesDialogMap[]
@ MID_GNE_ALLOWDISALLOW_CHANGE
select/unselect single vehicle
@ MID_GNE_BUTTON_CANCEL
cancel button
@ MID_GNE_BUTTON_RESET
reset button
@ MID_GNE_ALLOWDISALLOW_ONLY_ROAD
select only non road vehicles
@ MID_GNE_ALLOWDISALLOW_ONLY_RAIL
select only rail vehicles
@ MID_GNE_ALLOWDISALLOW_UNSELECTALL
unselect all vehicles
@ MID_GNE_ALLOWDISALLOW_SELECTALL
select all vehicles
@ MID_GNE_BUTTON_ACCEPT
accept button
#define GUIDesignButtonIcon
button only with icon
#define GUIDesignLabelIcon64x32Thicked
label ticked filled used for VClasses. It uses icons of 64x32 pixels
#define GUIDesignButtonAccept
Accept Button.
#define GUIDesignButtonCancel
Cancel Button.
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog with padding and spacing
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignDialogBox
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignButtonReset
Reset Button.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
GUIIcon
An enumeration of icons used by the gui applications.
const std::string & getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_SHIP
is an arbitrary ship
@ SVC_PRIVATE
private vehicles
@ SVC_HOV
vehicle is a HOV
@ SVC_TRUCK
vehicle is a large transport vehicle
@ SVC_CUSTOM2
is a user-defined type
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_RAIL_CLASSES
classes which drive on tracks
@ SVC_COACH
vehicle is a coach
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_RAIL_FAST
vehicle that is allowed to drive on high-speed rail tracks
@ SVC_TRAILER
vehicle is a large transport vehicle
@ SVC_CUSTOM1
is a user-defined type
@ SVC_RAIL_ELECTRIC
rail vehicle that requires electrified tracks
@ SVC_NON_ROAD
classes which (normally) do not drive on normal roads
@ SVC_DELIVERY
vehicle is a small delivery vehicle
@ SVC_RAIL_URBAN
vehicle is a city rail
@ SVC_MOTORCYCLE
vehicle is a motorcycle
@ SVC_EMERGENCY
public emergency vehicles
@ SVC_MOPED
vehicle is a moped
@ SVC_AUTHORITY
authorities vehicles
@ SVC_TRAM
vehicle is a light rail
@ SVC_TAXI
vehicle is a taxi
@ SVC_BUS
vehicle is a bus
@ SVC_E_VEHICLE
is an electric vehicle
@ SVC_PEDESTRIAN
pedestrian
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog for edit rerouters.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
GNEViewNet * myViewNet
FOX need this.
FXButton * myAcceptButton
accept button
FXButton * myResetButton
cancel button
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
GNEAttributeCarrier * myAC
edited AC
void constructor()
constructor
long onCmdSelectOnlyRail(FXObject *, FXSelector, void *)
event when user press select only rail button
void buildVClass(FXVerticalFrame *contentsFrame, SUMOVehicleClass vclass, GUIIcon vclassIcon, const std::string &description)
build VClass
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FXButton * myCancelButton
cancel button
GNEAllowVClassesDialog(GNEViewNet *viewNet, GNEAttributeCarrier *AC, SumoXMLAttr attr, bool *acceptChanges)
FOX-declaration.
bool * myAcceptChanges
accept changes
std::map< SUMOVehicleClass, std::pair< FXButton *, FXLabel * > > myVClassMap
map with the buttons for every VClass
~GNEAllowVClassesDialog()
destructor
std::string * myAllow
allow vehicles
SumoXMLAttr myEditedAttr
the attribute being edited
long onCmdUnselectAll(FXObject *, FXSelector, void *)
event when user press unselect all VClasses button
long onCmdSelectOnlyRoad(FXObject *, FXSelector, void *)
event when user press select only road button
long onCmdValueChanged(FXObject *, FXSelector, void *)
long onCmdSelectAll(FXObject *, FXSelector, void *)
event when user press select all VClasses button
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
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
std::vector< std::string > getVector()
return vector of strings