Ref T30, allow to set font as string (stylesheet string)

This commit is contained in:
Klaus Basan
2017-07-04 23:10:48 +02:00
committed by Mathew Sutcliffe
parent 3780bc18e0
commit 0c7ead7977
4 changed files with 31 additions and 11 deletions

View File

@@ -53,6 +53,9 @@ namespace BlackGui
//! Update the fonts
bool updateFont(const QFont &font);
//! Update the fonts
bool updateFont(const QString &qss);
//! Update the fonts
bool updateFont(const QString &fontFamily, const QString &fontSize, const QString &fontStyle, const QString &fontWeight, const QString &fontColor);
@@ -128,6 +131,9 @@ namespace BlackGui
//! Font as combined weight and style
static QString fontAsCombinedWeightStyle(const QFont &font);
//! Parameter as stylesheet
static QString asStylesheet(const QString &fontFamily, const QString &fontSize, const QString &fontStyle, const QString &fontWeight, const QString &fontColor);
//! Use style sheets in derived widgets
//! \sa QWidget::paintEvent
static bool useStyleSheetInDerivedWidget(QWidget *derivedWidget, QStyle::PrimitiveElement element = QStyle::PE_Widget);