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
kindtreesymbologypanel.h
Go to the documentation of this file.
1
30#ifndef OPENSWMMVIS_UI_DIALOGS_KINDTREESYMBOLOGYPANEL_H
31#define OPENSWMMVIS_UI_DIALOGS_KINDTREESYMBOLOGYPANEL_H
32
34
35#include <QPointer>
36#include <QWidget>
37
39
40class QStackedWidget;
41class QStandardItem;
42class QStandardItemModel;
43class QTreeView;
44
45namespace openswmmvis::ui {
46
47class KindTreeSymbologyPanel : public QWidget
48{
49 Q_OBJECT
50public:
52 explicit KindTreeSymbologyPanel(OpenSWMMVisLayer *hostLayer,
53 QWidget *parent = nullptr);
54
57 void focusKind(const QString &routingId);
58
59private slots:
60 void onTreeSelectionChanged();
61 void onTreeItemChanged(QStandardItem *item);
62
63private:
64 void buildTree();
65 void mountEditorForCategory(OpenSWMMVis::SwmmCategory cat);
69 void mountSubjectEditor(const QString &routingId);
70 [[nodiscard]] QString rendererBadgeFor(OpenSWMMVis::SwmmCategory cat) const;
71 [[nodiscard]] QString routingIdFor(OpenSWMMVis::SwmmCategory cat) const;
72 [[nodiscard]] static QString suffixFor(OpenSWMMVis::SwmmCategory cat);
73
74 QPointer<OpenSWMMVisLayer> m_layer;
75
76 QTreeView *m_tree = nullptr;
77 QStandardItemModel *m_model = nullptr;
78 QStackedWidget *m_stack = nullptr;
79
81 QString m_routingPrefix;
82
83 bool m_suppressEdits = false;
84};
85
86} // namespace openswmmvis::ui
87
88#endif // OPENSWMMVIS_UI_DIALOGS_KINDTREESYMBOLOGYPANEL_H
Abstract base class for all layers displayed in the MapCanvas.
Definition openswmmvislayer.h:116
Definition kindtreesymbologypanel.h:48
void focusKind(const QString &routingId)
Definition kindtreesymbologypanel.cpp:429
SwmmCategory
Stable ordinal categorising every SWMM-element kind that has per-kind styling, per-kind tree rows,...
Definition swmm_category.h:28
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Standalone definition of the SWMM-element Category enum used by per-Category APIs across layers,...