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
labelconfigeditor.h
Go to the documentation of this file.
1
19#ifndef OPENSWMMVIS_UI_WIDGETS_LABELCONFIGEDITOR_H
20#define OPENSWMMVIS_UI_WIDGETS_LABELCONFIGEDITOR_H
21
23#include "render/labelconfig.h"
24
25#include <QVector>
26#include <QWidget>
27
28class QCheckBox;
29class QComboBox;
30class QDoubleSpinBox;
31class QFontComboBox;
32class QLabel;
33class QLineEdit;
34class QToolButton;
35
36namespace openswmmvis::ui {
37
38class ColorButton;
39
40class LabelConfigEditor : public QWidget
41{
42 Q_OBJECT
43public:
44 explicit LabelConfigEditor(QWidget *parent = nullptr);
45
48 [[nodiscard]] OpenSWMM::Render::LabelConfig config() const;
49
66 const QVector<OpenSWMM::Render::AttributeField> &fields);
67
68signals:
71
72private:
73 void emitChanged();
75 void populateFieldCombo(QComboBox *combo, bool numericOnly) const;
77 void openExpressionBuilder();
78
80 QVector<OpenSWMM::Render::AttributeField> m_fields;
81 bool m_suppress = false;
82
83 QCheckBox *m_enabledChk = nullptr;
84 QComboBox *m_fieldCombo = nullptr;
85 QLineEdit *m_exprEdit = nullptr;
86 QToolButton *m_exprBuildBtn = nullptr;
87 QFontComboBox *m_fontCombo = nullptr;
88 QDoubleSpinBox *m_fontSizeSpin = nullptr;
89 QToolButton *m_boldBtn = nullptr;
90 QToolButton *m_italicBtn = nullptr;
91 ColorButton *m_colorBtn = nullptr;
92 QCheckBox *m_haloChk = nullptr;
93 ColorButton *m_haloColorBtn = nullptr;
94 QDoubleSpinBox *m_haloRadSpin = nullptr;
95 QComboBox *m_placementCombo = nullptr;
96 QDoubleSpinBox *m_minScaleSpin = nullptr;
97 QDoubleSpinBox *m_maxScaleSpin = nullptr;
98 QCheckBox *m_bgChk = nullptr;
99 ColorButton *m_bgColorBtn = nullptr;
100 QDoubleSpinBox *m_bgPadSpin = nullptr;
101 QComboBox *m_priorityCombo = nullptr;
102 QLabel *m_hintLabel = nullptr;
103};
104
105} // namespace openswmmvis::ui
106
107#endif // OPENSWMMVIS_UI_WIDGETS_LABELCONFIGEDITOR_H
Definition colorbutton.h:21
Definition labelconfigeditor.h:41
OpenSWMM::Render::LabelConfig config() const
Definition labelconfigeditor.cpp:228
void configChanged(const OpenSWMM::Render::LabelConfig &cfg)
void setAvailableFields(const QVector< OpenSWMM::Render::AttributeField > &fields)
The layer's themeable attributes for this sublayer's category.
Definition labelconfigeditor.cpp:274
void setConfig(const OpenSWMM::Render::LabelConfig &cfg)
Definition labelconfigeditor.cpp:202
Layer-side seam for "what attributes can I theme by?" — Slice DM.1.
Shared label-configuration value-type used by every layer that paints text labels.
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
Per-layer label rendering parameters.
Definition labelconfig.h:47