Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QStyleHelper Namespace Reference

Enumerations

enum  WidgetSizePolicy { SizeLarge = 0 , SizeSmall = 1 , SizeMini = 2 , SizeDefault = -1 }

Functions

Q_WIDGETS_EXPORT QString uniqueName (const QString &key, const QStyleOption *option, const QSize &size, qreal dpr)
Q_WIDGETS_EXPORT qreal dpi (const QStyleOption *option)
Q_WIDGETS_EXPORT qreal dpiScaled (qreal value, qreal dpi)
Q_WIDGETS_EXPORT qreal dpiScaled (qreal value, const QPaintDevice *device)
Q_WIDGETS_EXPORT qreal dpiScaled (qreal value, const QStyleOption *option)
Q_WIDGETS_EXPORT void drawBorderPixmap (const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left=0, int top=0, int right=0, int bottom=0)
Q_WIDGETS_EXPORT QColor backgroundColor (const QPalette &pal, const QWidget *widget=nullptr)
Q_WIDGETS_EXPORT WidgetSizePolicy widgetSizePolicy (const QWidget *w, const QStyleOption *opt=nullptr)
static qreal getDpr (const QWidget *widget)
static qreal getDpr (const QPainter *painter)
static bool usePixmapCache (const QStyleOption *opt)

Variables

static const qreal qstyleBaseDpi = 96

Enumeration Type Documentation

◆ WidgetSizePolicy

Enumerator
SizeLarge 
SizeSmall 
SizeMini 
SizeDefault 

Definition at line 67 of file qstylehelper_p.h.

Function Documentation

◆ backgroundColor()

QColor QStyleHelper::backgroundColor ( const QPalette & pal,
const QWidget * widget = nullptr )

Definition at line 411 of file qstylehelper.cpp.

◆ dpi()

Q_WIDGETS_EXPORT qreal QStyleHelper::dpi ( const QStyleOption * option)

Definition at line 67 of file qstylehelper.cpp.

◆ dpiScaled() [1/3]

Q_WIDGETS_EXPORT qreal QStyleHelper::dpiScaled ( qreal value,
const QPaintDevice * device )

Definition at line 94 of file qstylehelper.cpp.

◆ dpiScaled() [2/3]

Q_WIDGETS_EXPORT qreal QStyleHelper::dpiScaled ( qreal value,
const QStyleOption * option )

Definition at line 99 of file qstylehelper.cpp.

◆ dpiScaled() [3/3]

Q_WIDGETS_EXPORT qreal QStyleHelper::dpiScaled ( qreal value,
qreal dpi )

Definition at line 89 of file qstylehelper.cpp.

◆ drawBorderPixmap()

void QStyleHelper::drawBorderPixmap ( const QPixmap & pixmap,
QPainter * painter,
const QRect & rect,
int left = 0,
int top = 0,
int right = 0,
int bottom = 0 )

Definition at line 354 of file qstylehelper.cpp.

◆ getDpr() [1/2]

qreal QStyleHelper::getDpr ( const QPainter * painter)
inlinestatic

Definition at line 80 of file qstylehelper_p.h.

◆ getDpr() [2/2]

qreal QStyleHelper::getDpr ( const QWidget * widget)
inlinestatic

Definition at line 73 of file qstylehelper_p.h.

◆ uniqueName()

QString QStyleHelper::uniqueName ( const QString & key,
const QStyleOption * option,
const QSize & size,
qreal dpr )

Definition at line 36 of file qstylehelper.cpp.

References usePixmapCache().

Here is the call graph for this function:

◆ usePixmapCache()

bool QStyleHelper::usePixmapCache ( const QStyleOption * opt)
inlinestatic

Definition at line 29 of file qstylehelper.cpp.

Referenced by uniqueName().

Here is the caller graph for this function:

◆ widgetSizePolicy()

WidgetSizePolicy QStyleHelper::widgetSizePolicy ( const QWidget * w,
const QStyleOption * opt = nullptr )

Definition at line 423 of file qstylehelper.cpp.

References SizeDefault, SizeLarge, SizeMini, and SizeSmall.

Variable Documentation

◆ qstyleBaseDpi

const qreal QStyleHelper::qstyleBaseDpi = 96
static

Definition at line 64 of file qstylehelper.cpp.