54 const auto staticTooltip = frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu();
58 terminatelabel->setTipText(
"Terminate attribute");
64 spacingAttribute->setTipText(
"Terminate attribute");
197 std::vector<SumoXMLAttr> enableAttrs, disableAttrs;
242 if (!spacingEnabled) {
252 if (!spacingEnabled) {
361 for (
const auto& attr : enableAttrs) {
377 for (
const auto& attr : disableAttrs) {
500 std::vector<std::string> terminateDifferent;
501 std::vector<std::string> spacingDifferent;
524 if (end && number && terminateDifferent.empty() && spacingDifferent.empty()) {
539 if (terminateDifferent.size() > 0) {
567 if (spacingDifferent.size() > 0) {
578 }
else if (perhour) {
592 }
else if (poisson) {
599 }
else if (probability) {
620 std::string solution;
621 std::set<std::string> values;
624 values.insert(flow->getAttribute(attr));
627 for (
const auto& value : values) {
628 solution.append(value +
" ");
631 if (solution.size() > 0) {
FXDEFMAP(GNEFlowEditor) FlowEditorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_POISSON
poisson definition (used in flow)
@ SUMO_ATTR_CONTAINERSPERHOUR
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
@ SUMO_ATTR_PERSONSPERHOUR
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void addIntAttribute(const SumoXMLAttr attr, const int value)
add int attribute into current SumoBaseObject node
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
virtual void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_ToggleAttribute)
virtual bool isAttributeEnabled(SumoXMLAttr key) const
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool isTemplate() const
check if this AC is template
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
virtual void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
const std::string & getDefinition() const
get default value
void getFlowAttributes(CommonXMLStructure::SumoBaseObject *baseObject)
get flow attributes
long onCmdSetFlowAttribute(FXObject *, FXSelector, void *)
std::unordered_set< GNEAttributeCarrier * > myEditedFlows
edited flows
void refreshSingleFlow()
refresh single flow
MFXLabelTooltip * mySpacingLabel
Label for spacing.
FXTextField * myTerminateTextField
textField for terminate attribute
MFXComboBoxIcon * myTerminateComboBox
ComboBox for terminate options (end, number, end/number)
SumoXMLAttr myPerHourAttr
per hours attr (vehicles/person/container)
MFXComboBoxIcon * mySpacingComboBox
ComboBox for spacing comboBox (perHour, period, probability)
GNEViewNet * myViewNet
pointer to viewNet
const std::string getFlowAttribute(SumoXMLAttr attr)
get flow attribute (of the current edited flows)
void showFlowEditor(GNEAttributeCarrier *firstEditedFlow, const std::unordered_set< GNEAttributeCarrier * > editedFlows)
show GNEFlowEditor modul
void refreshFlowEditor()
refresh GNEFlowEditor
FXHorizontalFrame * mySpacingFrameTextField
horizontal frame for spacing textField
MFXLabelTooltip * myTerminateLabel
Label for terminate definition.
~GNEFlowEditor()
destructor
void hideFlowEditor()
hide group box
FXTextField * mySpacingTextField
textField for spacing attribute
void refreshMultipleFlows()
refresh multiple flows
bool shownFlowEditor() const
shown GNEFlowEditor modul
GNEAttributeCarrier * myFirstEditedFlow
first edited flow
FXHorizontalFrame * mySpacingFrameComboBox
horizontal frame for terminate options
FXHorizontalFrame * myTerminateFrameTextField
horizontal frame for terminate definition
bool areFlowValuesValid() const
check if parameters of attributes are valid
const GNEAttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
GNEUndoList * getUndoList() const
get the undoList object
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.
void clearItems()
Remove all items from the list.
void setText(const FXString &text)
Set the text in the textField.
FXColor getTextColor() const
Return text color.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
MFXGroupBoxModule (based on FXGroupBox)