54 const auto staticTooltip = frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu();
58 terminatelabel->setTipText(
"Terminate attribute");
64 spacingAttribute->setTipText(
"Terminate attribute");
196 std::vector<SumoXMLAttr> enableAttrs, disableAttrs;
241 if (!spacingEnabled) {
251 if (!spacingEnabled) {
360 for (
const auto& attr : enableAttrs) {
376 for (
const auto& attr : disableAttrs) {
493 const bool end = editedFlow->isAttributeEnabled(
SUMO_ATTR_END);
495 const bool perhour = editedFlow->isAttributeEnabled(
myPerHourAttr);
498 const bool probability = editedFlow->isAttributeEnabled(
SUMO_ATTR_PROB);
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) {
617 std::string solution;
618 std::set<std::string> values;
621 values.insert(flow->getAttribute(attr));
624 for (
const auto& value : values) {
625 solution.append(value +
" ");
628 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
void getFlowAttributes(CommonXMLStructure::SumoBaseObject *baseObject)
get flow attributes
long onCmdSetFlowAttribute(FXObject *, FXSelector, void *)
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 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
std::vector< GNEAttributeCarrier * > myEditedFlows
edited flows
void showFlowEditor(const std::vector< GNEAttributeCarrier * > editedFlows)
show GNEFlowEditor modul
void refreshMultipleFlows()
refresh multiple flows
bool shownFlowEditor() const
shown GNEFlowEditor modul
FXHorizontalFrame * mySpacingFrameComboBox
horizontal frame for terminate options
FXHorizontalFrame * myTerminateFrameTextField
horizontal frame for terminate definition
bool areFlowValuesValid() const
check if parameters of attributes are valid
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)