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
qstylekitstyle.cpp File Reference

(3d4a64baff57dee148063d4c7a34aa819843faf8)

#include "qstylekitstyle.h"
#include "qstylekitstyle_p.h"
#include <QtWidgets/qstyleoption.h>
#include <QtWidgets/qstyle.h>
#include <QtWidgets/qapplication.h>
#include <QtWidgets/private/qwidget_p.h>
#include <QtCore/private/qobject_p.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpainterpath.h>
#include <QtGui/qpainterstateguard.h>
#include <QtGui/qstylehints.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qnumeric.h>
#include <QtQml/private/qqmlcomponent_p.h>
#include <QtQml/qqmlengine.h>
#include <QtQuick/private/qquicktransition_p.h>
#include <QtLabsStyleKit/private/qqstylekit_p.h>
#include <QtLabsStyleKit/private/qqstylekitcontrolproperties_p.h>
#include <QtLabsStyleKit/private/qqstylekitstyle_p.h>
#include "moc_qstylekitstyle.cpp"
Include dependency graph for qstylekitstyle.cpp:

Go to the source code of this file.

Functions

static QQStyleKitReader::ControlType controlTypeForWidget (const QWidget *widget)
static QWidget * paintTarget (const QWidget *widget)
static bool isSelfPaintingWidget (const QWidget *widget)
static QWidget * managedViewport (QWidget *widget)
static uint resolvedAlignment (uint raw, Qt::Alignment hDefault, Qt::Alignment vDefault)
static qreal resolvedWidth (const QQStyleKitDelegateProperties *element, qreal availableW)
static qreal resolvedHeight (const QQStyleKitDelegateProperties *element, qreal availableH)
static QMargins elementMargins (const QQStyleKitDelegateProperties *element)
static QRect alignedRectInContainer (const QRect &container, const QSize &sizesize, uint alignment, const QMargins &padding, const QMargins &margins)
static QRect delegateRect (const QQStyleKitDelegateProperties *delegate, const QRect &container, Qt::Alignment hDefault, Qt::Alignment vDefault, const QMargins &padding=QMargins())
static bool applyDelegateTransform (QPainter *painter, const QQStyleKitDelegateProperties *element, const QRectF &boxbox)
static void drawStyledItemImage (const QQStyleKitImageProperties *imageimage, const QRectF &rect, qreal opacity, QPainter *painter)
static void drawStyledItemContents (const QQStyleKitDelegateProperties *propsprops, const QRectF &rect, QPainter *painter)
static void drawStyledItemRect (const QQStyleKitDelegateProperties *propsprops, const QRectF &rect, QPainter *painter)
static void drawControlIndicator (const QQStyleKitDelegateProperties *indicator, const QRectF &rect, QPainter *painter)
static void drawControlText (const QQStyleKitTextProperties *textProps, const QFont &font, const QRect &rect, const QString &text, uint textFlags, QPainter *pp, Qt::Alignment defaultAlignment=Qt::AlignHCenter|Qt::AlignVCenter)
static const QWidget * containerWidget (const QWidget *ww)
static QUrl urlFromStylePath (const QString &filePath)

Function Documentation

◆ alignedRectInContainer()

QRect alignedRectInContainer ( const QRect & container,
const QSize & size,
uint alignment,
const QMargins & padding,
const QMargins & margins )
static

Definition at line 528 of file qstylekitstyle.cpp.

◆ applyDelegateTransform()

bool applyDelegateTransform ( QPainter * painter,
const QQStyleKitDelegateProperties * element,
const QRectF & box )
static

Applies element's rotation and scale to painter about the centre of box. Returns false if the scale is 0 or if element is null, otherwise returns true.

Definition at line 577 of file qstylekitstyle.cpp.

◆ containerWidget()

const QWidget * containerWidget ( const QWidget * w)
static

Definition at line 825 of file qstylekitstyle.cpp.

◆ controlTypeForWidget()

QQStyleKitReader::ControlType controlTypeForWidget ( const QWidget * widget)
static

Definition at line 346 of file qstylekitstyle.cpp.

◆ delegateRect()

QRect delegateRect ( const QQStyleKitDelegateProperties * delegate,
const QRect & container,
Qt::Alignment hDefault,
Qt::Alignment vDefault,
const QMargins & padding = QMargins() )
static

Returns the rect of delegate inside container: sized from the width/height or fill properties after deducting padding and the delegate's margins, then aligned (falling back to hDefault and vDefault). Returns a null rect if delegate is null or not visible.

Definition at line 555 of file qstylekitstyle.cpp.

◆ drawControlIndicator()

void drawControlIndicator ( const QQStyleKitDelegateProperties * indicator,
const QRectF & rect,
QPainter * painter )
static

Definition at line 733 of file qstylekitstyle.cpp.

◆ drawControlText()

void drawControlText ( const QQStyleKitTextProperties * textProps,
const QFont & font,
const QRect & rect,
const QString & text,
uint textFlags,
QPainter * p,
Qt::Alignment defaultAlignment = Qt::AlignHCenter | Qt::AlignVCenter )
static

Definition at line 787 of file qstylekitstyle.cpp.

◆ drawStyledItemContents()

void drawStyledItemContents ( const QQStyleKitDelegateProperties * props,
const QRectF & rect,
QPainter * painter )
static

Definition at line 655 of file qstylekitstyle.cpp.

◆ drawStyledItemImage()

void drawStyledItemImage ( const QQStyleKitImageProperties * image,
const QRectF & rect,
qreal opacity,
QPainter * painter )
static

Definition at line 602 of file qstylekitstyle.cpp.

◆ drawStyledItemRect()

void drawStyledItemRect ( const QQStyleKitDelegateProperties * props,
const QRectF & rect,
QPainter * painter )
static

Definition at line 721 of file qstylekitstyle.cpp.

◆ elementMargins()

QMargins elementMargins ( const QQStyleKitDelegateProperties * element)
static

Definition at line 519 of file qstylekitstyle.cpp.

◆ isSelfPaintingWidget()

bool isSelfPaintingWidget ( const QWidget * widget)
static

Definition at line 466 of file qstylekitstyle.cpp.

◆ managedViewport()

QWidget * managedViewport ( QWidget * widget)
static

Definition at line 482 of file qstylekitstyle.cpp.

◆ paintTarget()

QWidget * paintTarget ( const QWidget * widget)
static

Definition at line 455 of file qstylekitstyle.cpp.

◆ resolvedAlignment()

uint resolvedAlignment ( uint raw,
Qt::Alignment hDefault,
Qt::Alignment vDefault )
static

Definition at line 499 of file qstylekitstyle.cpp.

◆ resolvedHeight()

qreal resolvedHeight ( const QQStyleKitDelegateProperties * element,
qreal availableH )
static

Definition at line 514 of file qstylekitstyle.cpp.

◆ resolvedWidth()

qreal resolvedWidth ( const QQStyleKitDelegateProperties * element,
qreal availableW )
static

Definition at line 509 of file qstylekitstyle.cpp.

◆ urlFromStylePath()

QUrl urlFromStylePath ( const QString & filePath)
static

Definition at line 860 of file qstylekitstyle.cpp.