CCIMXDesktop
 
Loading...
Searching...
No Matches
LabelStyler Class Reference

Provides utility methods to style a QLabel. More...

#include <LabelStyler.h>

Public Member Functions

void setFontSize (int pointSize)
 Sets the font size of the label.
 
void setFont (const QFont &font)
 Sets the font of the label.
 
void setTextColor (const QColor &color)
 Sets the text color of the label.
 
void setLabel (QLabel *lbl)
 Assigns the label to be styled.
 

Public Attributes

QLabel * label = nullptr
 Pointer to the QLabel to style.
 

Detailed Description

Provides utility methods to style a QLabel.

This class allows modification of font size, font family, and text color of a QLabel instance.

Member Function Documentation

◆ setFont()

void LabelStyler::setFont ( const QFont &  font)

Sets the font of the label.

Parameters
fontThe QFont to apply.

◆ setFontSize()

void LabelStyler::setFontSize ( int  pointSize)

Sets the font size of the label.

Parameters
pointSizeFont size in points.

◆ setLabel()

void LabelStyler::setLabel ( QLabel *  lbl)
inline

Assigns the label to be styled.

Parameters
lblPointer to the QLabel.

◆ setTextColor()

void LabelStyler::setTextColor ( const QColor &  color)

Sets the text color of the label.

Parameters
colorThe QColor to apply.

The documentation for this class was generated from the following files: