CCIMXDesktop
 
Loading...
Searching...
No Matches
LabelStyler.h
1#ifndef LABEL_STYLER
2#define LABEL_STYLER
3
9class QLabel;
10class QColor;
11class QFont;
12
20public:
24 QLabel* label = nullptr;
25
30 void setFontSize(int pointSize);
31
36 void setFont(const QFont& font);
37
42 void setTextColor(const QColor& color);
43
48 void setLabel(QLabel* lbl) {
49 label = lbl;
50 }
51};
52
53#endif // LABEL_STYLER
Provides utility methods to style a QLabel.
Definition LabelStyler.h:19
void setFontSize(int pointSize)
Sets the font size of the label.
Definition LabelStyler.cpp:5
void setLabel(QLabel *lbl)
Assigns the label to be styled.
Definition LabelStyler.h:48
QLabel * label
Pointer to the QLabel to style.
Definition LabelStyler.h:24
void setFont(const QFont &font)
Sets the font of the label.
Definition LabelStyler.cpp:11
void setTextColor(const QColor &color)
Sets the text color of the label.
Definition LabelStyler.cpp:15