SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
rulesymbologytab.h
Go to the documentation of this file.
1
37#ifndef OPENSWMMVIS_UI_DIALOGS_RULESYMBOLOGYTAB_H
38#define OPENSWMMVIS_UI_DIALOGS_RULESYMBOLOGYTAB_H
39
40#include <QPointer>
41#include <QWidget>
42
43class QComboBox;
44class QListWidget;
45class QListWidgetItem;
46class QPushButton;
47class QStackedWidget;
48
49namespace OpenSWMM::Render {
50class Rule;
51class RuleList;
52}
53
54namespace openswmmvis::ui {
55
56class RuleSymbologyTab : public QWidget
57{
58 Q_OBJECT
59public:
63 QWidget *parent = nullptr);
65
68 [[nodiscard]] OpenSWMM::Render::Rule *activeRule() const;
69
70signals:
74
75private slots:
76 void onComboIndexChanged(int);
77 void onListRowChanged(int);
78 void onItemChanged(QListWidgetItem *);
79 void onListReordered();
80
81 void onAddClicked();
82 void onDuplicateClicked();
83 void onDeleteClicked();
84 void onMoveUpClicked();
85 void onMoveDownClicked();
86
87 void onModelRuleListChanged();
88 void onModelActiveIndexChanged(int);
89 void onModelRuleChanged(int index);
90
91 void onRendererClassPicked(int comboIndex);
92 void onActiveRuleRendererReplaced();
93
94private:
95 void rebuildFromModel();
96 void mountBodyForActive();
97 void updateButtonsEnabled();
98 void setListAndComboToIndex(int index);
99 void syncRendererClassCombo();
100 void disconnectActiveRuleRendererSignal();
101 void connectActiveRuleRendererSignal();
102
103 OpenSWMM::Render::RuleList *m_ruleList = nullptr;
104
105 QComboBox *m_activeCombo = nullptr;
106 QListWidget *m_ruleListView = nullptr;
107 QPushButton *m_btnAdd = nullptr;
108 QPushButton *m_btnDuplicate = nullptr;
109 QPushButton *m_btnDelete = nullptr;
110 QPushButton *m_btnUp = nullptr;
111 QPushButton *m_btnDown = nullptr;
112 QStackedWidget *m_body = nullptr;
113 QComboBox *m_rendererCombo = nullptr;
120 QPointer<OpenSWMM::Render::Rule> m_subscribedRule;
121
125 bool m_suppressUiSignals = false;
126};
127
128} // namespace openswmmvis::ui
129
130#endif // OPENSWMMVIS_UI_DIALOGS_RULESYMBOLOGYTAB_H
One layer-scope styled aspect — name + renderer + filter + scale.
Definition rule.h:51
Ordered owning container for Rules on one layer.
Definition rulelist.h:48
Definition rulesymbologytab.h:57
void activeRuleChanged(int index)
Emitted when the user changes the active Rule from the combo or the list.
OpenSWMM::Render::Rule * activeRule() const
Currently selected Rule (matches RuleList::activeRule()). Null when the list is empty.
Definition rulesymbologytab.cpp:186
int index
Position in m_quadRegions / m_quadReports.
Definition meshgenerator.cpp:153
Definition gisrasterlayer.h:40
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176