Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQC2::QStyleHelper Namespace Reference

Enumerations

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

Functions

QString uniqueName (const QString &key, const QStyleOption *option, const QSize &size)
 
qreal dpi (const QStyleOption *option)
 
qreal dpiScaled (qreal value, qreal dpi)
 
qreal dpiScaled (qreal value, const QPaintDevice *device)
 
qreal dpiScaled (qreal value, const QStyleOption *option)
 
int calcBigLineSize (int radius)
 
static QPointF calcRadialPos (const QStyleOptionSlider *dial, qreal offset)
 
qreal angle (const QPointF &p1, const QPointF &p2)
 
QPolygonF calcLines (const QStyleOptionSlider *dial)
 
void drawDial (const QStyleOptionSlider *option, QPainter *painter)
 
void drawBorderPixmap (const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left, int top, int right, int bottom)
 
WidgetSizePolicy widgetSizePolicy (const QStyleOption *opt)
 
QColor backgroundColor (const QPalette &pal)
 

Variables

static const qreal qstyleBaseDpi = 96
 

Enumeration Type Documentation

◆ WidgetSizePolicy

Enumerator
SizeLarge 
SizeSmall 
SizeMini 
SizeDefault 

Definition at line 63 of file qquickstylehelper_p.h.

Function Documentation

◆ angle()

qreal QQC2::QStyleHelper::angle ( const QPointF p1,
const QPointF p2 
)

Definition at line 139 of file qquickstylehelper.cpp.

References p1, p2, Q_PI, and qAtan().

Referenced by QQC2::QCommonStyle::drawComplexControl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backgroundColor()

QColor QQC2::QStyleHelper::backgroundColor ( const QPalette pal)

Definition at line 393 of file qquickstylehelper.cpp.

References QPalette::Base, and QPalette::color().

+ Here is the call graph for this function:

◆ calcBigLineSize()

int QQC2::QStyleHelper::calcBigLineSize ( int  radius)

Definition at line 107 of file qquickstylehelper.cpp.

Referenced by QQC2::calcArrow(), calcLines(), and calcRadialPos().

+ Here is the caller graph for this function:

◆ calcLines()

QPolygonF QQC2::QStyleHelper::calcLines ( const QStyleOptionSlider dial)

Definition at line 171 of file qquickstylehelper.cpp.

References calcBigLineSize(), QQC2::QStyleOptionSlider::dialWrapping, QRect::height(), i, QQC2::QStyleOptionSlider::maximum, QQC2::QStyleOptionSlider::minimum, QQC2::QStyleOptionSlider::pageStep, Q_PI, qCos(), qMin(), qSin(), QQC2::QStyleOption::rect, QList< T >::resize(), QQC2::QStyleOptionSlider::tickInterval, and QRect::width().

Referenced by QQC2::QCommonStyle::drawComplexControl(), and drawDial().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcRadialPos()

static QPointF QQC2::QStyleHelper::calcRadialPos ( const QStyleOptionSlider dial,
qreal  offset 
)
static

Definition at line 117 of file qquickstylehelper.cpp.

References calcBigLineSize(), QQC2::QStyleOptionSlider::endAngle, QRect::height(), QQC2::QStyleOptionSlider::maximum, QQC2::QStyleOptionSlider::minimum, pos, Q_PI, qCos(), qMin(), qSin(), QQC2::QStyleOption::rect, QQC2::QStyleOptionSlider::sliderPosition, QQC2::QStyleOptionSlider::startAngle, QQC2::QStyleOptionSlider::upsideDown, and QRect::width().

Referenced by drawDial().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dpi()

qreal QQC2::QStyleHelper::dpi ( const QStyleOption option)

Definition at line 53 of file qquickstylehelper.cpp.

References Qt::AA_Use96Dpi, qstyleBaseDpi, and QCoreApplication::testAttribute().

Referenced by dpiScaled(), dpiScaled(), QQC2::QWindowsStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QQC2::QCommonStyle::sizeFromContents(), QQC2::QWindowsStyle::sizeFromContents(), QQC2::QCommonStyle::subControlRect(), and QQC2::QWindowsXPStyle::subControlRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dpiScaled() [1/3]

qreal QQC2::QStyleHelper::dpiScaled ( qreal  value,
const QPaintDevice device 
)

Definition at line 74 of file qquickstylehelper.cpp.

References device, and dpiScaled().

+ Here is the call graph for this function:

◆ dpiScaled() [2/3]

qreal QQC2::QStyleHelper::dpiScaled ( qreal  value,
const QStyleOption option 
)

Definition at line 79 of file qquickstylehelper.cpp.

References dpi(), and dpiScaled().

+ Here is the call graph for this function:

◆ dpiScaled() [3/3]

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

Definition at line 69 of file qquickstylehelper.cpp.

References dpi(), and qstyleBaseDpi.

Referenced by dpiScaled(), dpiScaled(), QQC2::QWindowsStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QQC2::QCommonStyle::pixelMetric(), QQC2::QWindowsStyle::pixelMetric(), QQC2::QWindowsXPStyle::pixelMetric(), QQC2::QCommonStyle::sizeFromContents(), QQC2::QWindowsStyle::sizeFromContents(), QQC2::QWindowsXPStyle::sizeFromContents(), QQC2::QCommonStyle::subControlRect(), and QQC2::QWindowsXPStyle::subControlRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawBorderPixmap()

void QQC2::QStyleHelper::drawBorderPixmap ( const QPixmap pixmap,
QPainter painter,
const QRect rect,
int  left,
int  top,
int  right,
int  bottom 
)

Definition at line 326 of file qquickstylehelper.cpp.

References QPainter::drawPixmap(), painter, pixmap, and rect.

+ Here is the call graph for this function:

◆ drawDial()

◆ uniqueName()

QString QQC2::QStyleHelper::uniqueName ( const QString key,
const QStyleOption option,
const QSize size 
)

Definition at line 28 of file qquickstylehelper.cpp.

References QQC2::QStyleOptionComplex::activeSubControls, QAbstractSpinBox::buttonSymbols, QAbstractSpinBox::frame, spinBox, and QAbstractSpinBox::stepEnabled().

Referenced by QQC2::QCommonStyle::drawPrimitive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ widgetSizePolicy()

WidgetSizePolicy QQC2::QStyleHelper::widgetSizePolicy ( const QStyleOption opt)

Variable Documentation

◆ qstyleBaseDpi

const qreal QQC2::QStyleHelper::qstyleBaseDpi = 96
static

Definition at line 50 of file qquickstylehelper.cpp.

Referenced by dpi(), and dpiScaled().