61 myVTypeAtributesParent(VTypeAtributesParent) {
69 myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
71 for (
const auto& i : myVTypeAtributesParent->myVehicleTypeDialog->getEditedDemandElement()->getTagProperty().getAttributeProperties(
SUMO_ATTR_VCLASS).getDiscreteValues()) {
73 myComboBoxVClass->appendItem(i.c_str());
77 if (myComboBoxVClass->getNumItems() > 10) {
78 myComboBoxVClass->setNumVisible(10);
80 myComboBoxVClass->setNumVisible(myComboBoxVClass->getNumItems());
268 for (
auto i : VShapeStrings) {
401 myRowAttrType(rowAttrType),
403 myTextField(nullptr),
404 myComboBox(nullptr) {
423 for (
auto i : values) {
526 myComboBox->setTextColor(FXRGB(195, 195, 195));
556 if (defaultValue !=
myComboBox->getText().text()) {
559 myComboBox->setTextColor(FXRGB(195, 195, 195));
565 if (defaultValue !=
myTextField->getText().text()) {
583 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
584 colordialog.setTarget(
this);
586 if (GNEAttributeCarrier::canParse<RGBColor>(
myTextField->getText().text())) {
592 if (colordialog.execute()) {
608 FXFileDialog opendialog(
this,
"Open Image");
610 opendialog.setSelectMode(SELECTFILE_EXISTING);
611 opendialog.setPatternList(
"All files (*)");
615 if (opendialog.execute()) {
619 std::string imagePath = opendialog.getFilename().text();
635 FXFileDialog opendialog(
this,
"Open OSG File");
637 opendialog.setSelectMode(SELECTFILE_EXISTING);
638 opendialog.setPatternList(
"OSG file (*.obj)");
642 if (opendialog.execute()) {
646 std::string imagePath = opendialog.getFilename().text();
664 return "crossingGap";
666 return "driveAfterYellowTime";
668 return "driveAfterRedTime";
670 return "driveRedSpeed";
672 return "ignoreKeepClearTime";
674 return "ignoreFoeSpeed";
676 return "ignoreFoeProb";
680 return "timegapMinor";
685 return "cooperative";
703 return "timeToImpatience";
707 return "lookaheadLeft";
709 return "speedGainRight";
711 return "maxSpeedLatStanding";
713 return "maxSpeedLatFactor";
715 return "turnAlignDistance";
717 return "overtakeRight";
737 FXGroupBox* commonAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Vehicle Type attributes",
GUIDesignGroupBoxFrame);
745 FXGroupBox* JMAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Junction Model attributes",
GUIDesignGroupBoxFrame);
753 FXGroupBox* LCMAttributes =
new FXGroupBox(firstAuxiliarHorizontalFrame,
"Lane Change Model attributes",
GUIDesignGroupBoxFrame);
1142 for (
auto i : CFModels) {
1251 for (
const auto& i :
myRows) {
1434 for (
const auto& i :
myRows) {
1455 for (
const auto& i :
myRows) {
1510 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
1515 FXMessageBox::warning(getApp(), MBOX_OK,
1516 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
1517 (tagString +
" cannot be " + operation2 +
1519 " is invalid.").c_str());
1521 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
1527 getApp()->stopModal(
this, TRUE);
1538 getApp()->stopModal(
this, FALSE);
1560 myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1562 myTextField(nullptr) {
CarFollowingModelRow * myDeltaRow
Row for MinGap (only for IDM)
void buildAttributesA(FXVerticalFrame *column)
build commmon attributes (A)
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
VTypeAttributeRow * myMaxSpeedLat
VTypeAttributeRow for MaxSpeedLat.
FXComboBox * myComboBox
ComboBox for attributes with limited values.
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
void updateValues()
update values
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
static StringBijection< SumoXMLTag > CarFollowModels
car following models
long onCmdSetAttribute(FXObject *, FXSelector, void *)
#define GUIDesignComboBoxNCol
number of column of every combo box
VTypeAttributeRow * myBoardingDuration
VTypeAttributeRow for BoardingDuration.
static RGBColor parseColor(std::string coldef)
Parses a color information.
VTypeAttributeRow * myLCAPushygap
VTypeAttributeRow for pushy gap.
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
void acceptChanges()
Accept changes did in this dialog.
CarFollowingModelRow * myTmp4Row
Row for TMP4.
VTypeAttributeRow * myLCASublaneParam
VTypeAttributeRow for sublane param.
VTypeAtributes()
fox need this
VTypeAttributeRow * myJMCrossingGap
VTypeAttributeRow for Crossing Gap.
CarFollowingModelRow * myEmergencyDecelRow
Row for emergency Decel.
FXTextField * myTextField
text field
void openImageFileDialog()
open image file dialog
void buildJunctionModelAttributesB(FXVerticalFrame *column)
build JunctionModel attributes (B)
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
Dialog for edit rerouter intervals.
CarFollowingModelParameters()
fox need this
CarFollowingModelRow * myTmp5Row
Row for TMP5.
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
#define GUIDesignTextFielWidth180
text field with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
FXVerticalFrame * myContentFrame
frame for contents
vehicle is a not electrified rail
GNEVehicleTypeDialog(GNEDemandElement *editedVehicleType, bool updatingElement)
constructor
FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[]
CarFollowingModelRow * myMinGapFactorRow
Row for MinGapFactor.
const RowAttrType myRowAttrType
RowAttrType.
render as a transport vehicle
void openColorDialog()
open color dialog
VTypeAttributeRow * myJMDriveAfterRedTime
VTypeAttributeRow for Drive After Red Time.
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
render as a flexible city bus
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
void cancelChanges()
Cancel changes did in this dialog.
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAttributeParameters parent
vehicle is a small delivery vehicle
VTypeAttributeRow * myHasDriveState
VTypeAttributeRow for HasDriveState.
class used for represent rows with Car Following Model parameters
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
FXComboBox * myComboBoxShape
FXComboBox for Shape.
CarFollowingModelRow * myAdaptTimeRow
Row for Adapt Time.
VTypeAttributeRow * myMinGapLat
VTypeAttributeRow for MinGapLat.
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
FXString filterAttributeName(const SumoXMLAttr attr) const
filter attribute name
automated car (with cruise controllers)
void initChanges()
init a new group of changes that will be do it in dialog
FXString gCurrentFolder
The folder used as last.
void openOSGFileDialog()
open OSG file dialog
CarFollowingModelRow * myTmp1Row
Row for TMP1.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
render as a sedan passenger vehicle ("Stufenheck")
VTypeAtributes * myVTypeAtributes
Vehicle Type Common Attributes.
void changeDemandElementDialogHeader(const std::string &newHeader)
change additional dialog header
static const RGBColor BLACK
CarFollowingModelRow * myTauRow
Row for Tau.
FXButton * myButton
button
CarFollowingModelRow * myDecelRow
Row for Decel.
VTypeAttributeRow * myLCASpeedGainRight
VTypeAttributeRow for speed gain right.
VTypeAttributeRow * mySpeedDev
VTypeAttributeRow for SpeedDev.
SumoXMLAttr myAttr
edited attribute
VTypeAttributeRow * myLCAKeeprightParam
VTypeAttributeRow for keep right param.
std::vector< std::string > getStrings() const
rail vehicle that requires electrified tracks
long onCmdSetVariable(FXObject *, FXSelector, void *)
#define GUIDesignTextFielWidth180Int
text field with thick frame, size of 180x23 and limited to integers (Used in GNEVehicleType) ...
void updateValues()
update values
#define GUIDesignTextFielWidth180Real
text field with thick frame, size of 180x23 and limited to doubles/floats (Used in GNEVehicleType) ...
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
vehicle is a large transport vehicle
#define GUIDesignComboBox
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
void updateValue()
update value of Vehicle Type (using default value obtained from GNEAttributeCarrier) ...
CarFollowingModelRow * mySigmaRow
Row for Sigma.
VTypeAttributeRow * myLCALookAheadLeft
VTypeAttributeRow for loock ahead left.
VTypeAttributeRow * myLaneChangeModel
VTypeAttributeRow for LaneChangeModel.
VTypeAttributeRow * myLatAlignment
VTypeAttributeRow for LatAlignment.
void resetChanges()
reset changes did in this dialog.
GNEUndoList * getUndoList() const
get the undoList object
const FXButton * getButton() const
get button
VTypeAttributeRow * myLCAMaxSpeedLatStanding
VTypeAttributeRow for max speed lat standing.
bool myVehicleTypeValid
flag to check if current vehicleType is valid
VTypeAttributeRow * myCarriageLength
VTypeAttributeRow for carriage length.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
FXTextField * myTextField
text field
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
void refreshCFMFields()
refresh Car Following Model Fields
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
SUMOVehicleClass setVariable()
set vehicle class
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
CarFollowingModelRow * myPhiRow
Row for MinGap (only for Kerner)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
FXLabel * myComboBoxVClassLabelImage
label with image of VClass
RowAttrType
Attribute type.
render as a hatchback passenger vehicle ("Fliessheck")
VTypeAttributeRow * myProbability
VTypeAttributeRow for Probability.
GNEVehicleTypeDialog * myVehicleTypeDialog
pointer to Vehicle Type dialog parent
long onCmdAccept(FXObject *, FXSelector, void *)
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
VClassRow * myVClassRow
vehicle class row
long onCmdSetAttributeDialog(FXObject *obj, FXSelector, void *)
called after press a button dialog
CarFollowingModelRow * myApparentDecelRow
Row for aparent Decel.
CarFollowingModelRow * myEstimationRow
Row for Estimation (only for Wiedemann)
VTypeAttributeRow * myLCACooperativeParam
VTypeAttributeRow for cooperative param.
VTypeAttributeRow * myActionStepLenght
VTypeAttributeRow for ActionStepLenght.
void updateValues()
update values
struct for default values that depend of VClass
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
VTypeAttributeRow * myLCATurnAlignmentDistance
VTypeAttributeRow for turn alignment distance.
void buildAttributesB(FXVerticalFrame *column)
build commmon attributes (B)
FXComboBox * myComboBoxCarFollowModel
Row for CarFollowModel.
VTypeAttributeRow * myLocomotiveLength
VTypeAttributeRow for locomotive length.
VTypeAttributeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector< std::string > &values={})
constructor
render as a (city) rail without locomotive
attribute edited trought dialog
VTypeAttributeRow * myLCAOppositeParam
VTypeAttributeRow for opposite param.
VTypeAttributeRow * myLoadingDuration
VTypeAttributeRow for LoadingDuration.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
void setVariable()
set Variablen in VehicleType
#define GUIDesignLabelAttribute150
label extended over the matrix column with thick frame and height of 23
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
render as a passenger vehicle
VTypeAttributeRow * myJMDriveAfterYellowTime
VTypeAttributeRow for Drive After Yellow Time.
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
vehicle is a passenger car (a "normal" car)
void setVariable()
set variables
VTypeAttributeRow * myJMSigmaMinor
VTypeAttributeRow for Sigma Minor.
VTypeAttributeRow * myJMIgnoreKeepclearTime
VTypeAttributeRow for Ignore Keep Clear Time.
#define GUIDesignLabelAboutInfoCenter
label extended over frame with thick and with text justify to center
VShapeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *column)
constructor
VTypeAttributeRow * myJMTimeGapMinor
VTypeAttributeRow for Time GAP Minor.
VTypeAttributeRow * myLCAImpatience
VTypeAttributeRow for impatience.
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
#define GUIDesignTextFieldNCol
Num of column of text field.
class used for represent rows with Vehicle Type parameters
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
void updateValue()
update value of Vehicle Type
void setVShapeLabelImage()
set VShape texture
VTypeAttributeRow * myJMImpatience
VTypeAttributeRow for Impatience.
CarFollowingModelRow * myTmp2Row
Row for TMP2.
FXTextField * myTextFieldVehicleTypeID
FXTextfield for vehicleTypeID.
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
void setVariable()
set Variablen in VehicleType (using default value obtained from GNEAttributeCarrier) ...
render as a arbitrary ship
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
const SumoXMLAttr myAttr
edited attribute
Dialog to edit sequences, parameters, etc.. of DemandElements.
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
#define GUIDesignButtonRectangular150x23
button rectangular with thick and raise frame with a size of 150x23
const std::string & getTagStr() const
get tag assigned to this object in string format
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes ...
class for CarFollowingModel
VTypeAttributeRow * myLCAMaxSpeedLatFactor
VTypeAttributeRow for max speed lat factor.
void setVClassLabelImage()
set VClass texture
VTypeAttributeRow * myJMIgnoreFoeSpeed
VTypeAttributeRow for Ignore FOE Speed.
~GNEVehicleTypeDialog()
destructor
vehicle is a large transport vehicle
CarFollowingModelRow * myTrauLastRow
Row for TauLast.
VTypeAttributeRow * myLCAAssertive
VTypeAttributeRow for assertive.
SUMOVehicleClass updateValue()
update values
VTypeAttributeRow * myLCAOvertakeRight
VTypeAttributeRow for overtake right.
VTypeAttributeRow * myJMDriveRedSpeed
VTypeAttributeRow for Drive Red Speed.
VTypeAttributeRow * myJMIgnoreFoeProb
VTypeAttributeRow for Ignore FOE Probability.
VTypeAttributeRow * myLCASpeedgainParam
VTypeAttributeRow for speed gain param.
VTypeAttributeRow * myColor
VTypeAttributeRow for color.
FXLabel * myComboBoxShapeLabelImage
label with image of Shape
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
CarFollowingModelParameters * myCarFollowingModelParametersParent
pointer to CarFollowingModelParameters parent
render as an emergency vehicle
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
VTypeAttributeRow * myLCATimeToImpatience
VTypeAttributeRow for time to impatience.
render as a (futuristic) e-vehicle
CarFollowingModelRow * myTmp3Row
Row for TMP3.
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
FXComboBox * myComboBoxVClass
FXComboBox for VClass.
VShapeRow * myVShapeRow
vehicle shape row
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
VTypeAttributeRow * myFilename
VTypeAttributeRow for Filename.
VTypeAttributeRow * myLCAStrategicParam
VTypeAttributeRow for strategic param.
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
VTypeAttributeRow * myLCAAccelLat
VTypeAttributeRow for accel lat.
#define GUIDesignLabelTickedIcon180x46
label ticked filled extended over frame used for VClasses/VShapes. (can be used by icons of 64x32 pix...
public emergency vehicles
render as a transport vehicle with one trailer
render as a wagon passenger vehicle ("Combi")
CarFollowingModelRow * myAccelRow
Row for Accel.
VTypeAttributeRow * myLCAPushy
VTypeAttributeRow for pushy.
CarFollowingModelRow * myAprobRow
Row for Aprob.
CarFollowingModelRow(CarFollowingModelParameters *carFollowingModelParametersParent, FXVerticalFrame *verticalFrame, SumoXMLAttr attr, bool allowString=false)
constructor
#define GUIDesignComboBoxWidth180
comboBox with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
render as a semi-trailer transport vehicle ("Sattelschlepper")
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
VTypeAttributeRow * myCarriageGap
VTypeAttributeRow for carriage GAP.
virtual std::string getAttribute(SumoXMLAttr key) const =0
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
vehicle that is allowed to drive on high-speed rail tracks
vehicles ignoring classes
CarFollowingModelRow * myTrainTypeRow
Row for TrainType.
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
An Element which don't belongs to GNENet but has influency in the simulation.