55 terminatelabel->setTipText(
"Terminate attribute");
60 spacingAttribute->setTipText(
"Terminate attribute");
65 frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
"A",
nullptr,
GUIDesignLabelAttribute);
69 mySpacingLabel =
new MFXLabelTooltip(mySpacingFrameTextField, frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
76 myTerminateComboBox->setNumVisible(3);
82 mySpacingComboBox->setNumVisible(4);
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) {
540 myTerminateComboBox->setText((
"different: " + terminateDifferent.front() +
" " + terminateDifferent.back()).c_str());
567 if (spacingDifferent.size() > 0) {
568 mySpacingComboBox->setText((
"different: " + spacingDifferent.front() +
" " + spacingDifferent.back()).c_str());
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 GUIDesignLabelAttribute
label extended over the matrix column with thick frame
#define GUIDesignTextFieldNCol
Num of column of text field.
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
@ 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 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
FXComboBox * mySpacingComboBox
ComboBox for spacing comboBox (perHour, period, probability)
SumoXMLAttr myPerHourAttr
per hours attr (vehicles/person/container)
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
FXComboBox * myTerminateComboBox
ComboBox for terminate options (end, number, end/number)
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
MFXGroupBoxModule (based on FXGroupBox)