|
38 | 38 |
|
39 | 39 | namespace scopy {
|
40 | 40 | namespace admt {
|
41 |
| -class SCOPY_ADMT_EXPORT ADMTStyleHelper : public QObject { |
42 |
| - Q_OBJECT |
| 41 | +class SCOPY_ADMT_EXPORT ADMTStyleHelper : public QObject |
| 42 | +{ |
| 43 | + Q_OBJECT |
43 | 44 | protected:
|
44 |
| - ADMTStyleHelper(QObject *parent = nullptr); |
45 |
| - ~ADMTStyleHelper(); |
| 45 | + ADMTStyleHelper(QObject *parent = nullptr); |
| 46 | + ~ADMTStyleHelper(); |
46 | 47 |
|
47 | 48 | public:
|
48 |
| - // singleton |
49 |
| - ADMTStyleHelper(ADMTStyleHelper &other) = delete; |
50 |
| - void operator=(const ADMTStyleHelper &) = delete; |
51 |
| - static ADMTStyleHelper *GetInstance(); |
| 49 | + // singleton |
| 50 | + ADMTStyleHelper(ADMTStyleHelper &other) = delete; |
| 51 | + void operator=(const ADMTStyleHelper &) = delete; |
| 52 | + static ADMTStyleHelper *GetInstance(); |
52 | 53 |
|
53 | 54 | public:
|
54 |
| - static void initColorMap(); |
55 |
| - static QString getColor(QString id); |
56 |
| - static void TopContainerButtonStyle(QPushButton *btn, |
57 |
| - QString objectName = ""); |
58 |
| - static void PlotWidgetStyle(PlotWidget *widget, QString objectName = ""); |
59 |
| - static void ComboBoxStyle(QComboBox *widget, QString objectName = ""); |
60 |
| - static void LineEditStyle(QLineEdit *widget, QString objectName = ""); |
61 |
| - static void ColoredSquareCheckbox(QCheckBox *chk, QColor color, |
62 |
| - QString objectName = ""); |
63 |
| - static void StartButtonStyle(QPushButton *btn, QString objectName = ""); |
64 |
| - static void |
65 |
| - TextStyle(QWidget *widget, const char *styleHelperColor = json::global::white, |
66 |
| - bool isBold = false, |
67 |
| - QString objectName = ""); // void TextStyle(QWidget *widget, const |
68 |
| - // QString& styleHelperColor, bool isBold |
69 |
| - // = false, QString objectName = ""); |
70 |
| - static void MenuSmallLabel(QLabel *label, QString objectName = ""); |
71 |
| - static void LineStyle(QFrame *line, QString objectName = ""); |
72 |
| - static void UIBackgroundStyle(QWidget *widget, QString objectName = ""); |
73 |
| - static void GraphChannelStyle(QWidget *widget, QLayout *layout, |
74 |
| - QString objectName = ""); |
75 |
| - static void CalculatedCoeffWidgetRowStyle(QWidget *widget, |
76 |
| - QHBoxLayout *layout, QLabel *hLabel, |
77 |
| - QLabel *hMagLabel, |
78 |
| - QLabel *hPhaseLabel, |
79 |
| - QString objectName = ""); |
| 55 | + static void initColorMap(); |
| 56 | + static QString getColor(QString id); |
| 57 | + static void TopContainerButtonStyle(QPushButton *btn, QString objectName = ""); |
| 58 | + static void PlotWidgetStyle(PlotWidget *widget, QString objectName = ""); |
| 59 | + static void ComboBoxStyle(QComboBox *widget, QString objectName = ""); |
| 60 | + static void LineEditStyle(QLineEdit *widget, QString objectName = ""); |
| 61 | + static void ColoredSquareCheckbox(QCheckBox *chk, QColor color, QString objectName = ""); |
| 62 | + static void StartButtonStyle(QPushButton *btn, QString objectName = ""); |
| 63 | + static void TextStyle(QWidget *widget, const char *styleHelperColor = json::global::white, bool isBold = false, |
| 64 | + QString objectName = ""); // void TextStyle(QWidget *widget, const |
| 65 | + // QString& styleHelperColor, bool isBold |
| 66 | + // = false, QString objectName = ""); |
| 67 | + static void MenuSmallLabel(QLabel *label, QString objectName = ""); |
| 68 | + static void LineStyle(QFrame *line, QString objectName = ""); |
| 69 | + static void UIBackgroundStyle(QWidget *widget, QString objectName = ""); |
| 70 | + static void GraphChannelStyle(QWidget *widget, QLayout *layout, QString objectName = ""); |
| 71 | + static void CalculatedCoeffWidgetRowStyle(QWidget *widget, QHBoxLayout *layout, QLabel *hLabel, |
| 72 | + QLabel *hMagLabel, QLabel *hPhaseLabel, QString objectName = ""); |
80 | 73 |
|
81 | 74 | private:
|
82 |
| - QMap<QString, QString> colorMap; |
83 |
| - static ADMTStyleHelper *pinstance_; |
| 75 | + QMap<QString, QString> colorMap; |
| 76 | + static ADMTStyleHelper *pinstance_; |
84 | 77 | };
|
85 | 78 | } // namespace admt
|
86 | 79 | } // namespace scopy
|
|
0 commit comments