Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowsvistastyle.cpp File Reference

(8bc80f2e1a3b509837bef17c87d2df23b046623e)

#include "qwindowsvistastyle_p.h"
#include "qwindowsvistastyle_p_p.h"
#include "qwindowsvistaanimation_p.h"
#include <qoperatingsystemversion.h>
#include <qscreen.h>
#include <qstylehints.h>
#include <qwindow.h>
#include <private/qstyleanimation_p.h>
#include <private/qstylehelper_p.h>
#include <qpa/qplatformnativeinterface.h>
#include <private/qapplication_p.h>
#include <private/qsystemlibrary_p.h>
#include <private/qwindowsthemecache_p.h>
#include "qdrawutil.h"
#include <qbackingstore.h>
+ Include dependency graph for qwindowsvistastyle.cpp:

Go to the source code of this file.

Macros

#define TMT_CONTENTMARGINS   3602
 
#define TMT_SIZINGMARGINS   3601
 
#define LISS_NORMAL   1
 
#define LISS_HOT   2
 
#define LISS_SELECTED   3
 
#define LISS_DISABLED   4
 
#define LISS_SELECTEDNOTFOCUS   5
 
#define LISS_HOTSELECTED   6
 
#define BP_COMMANDLINK   6
 
#define BP_COMMANDLINKGLYPH   7
 
#define CMDLGS_NORMAL   1
 
#define CMDLGS_HOT   2
 
#define CMDLGS_PRESSED   3
 
#define CMDLGS_DISABLED   4
 

Enumerations

enum  TransformType { SimpleTransform , HighDpiScalingTransform , ComplexTransform }
 

Functions

static void qt_add_rect (HRGN &winRegion, QRect r)
 
static HRGN qt_hrgn_from_qregion (const QRegion &region)
 
static Qt::Orientation progressBarOrientation (const QStyleOption *option=nullptr)
 
static HWND createTreeViewHelperWindow ()
 
static TransformType transformType (const QTransform &transform, qreal devicePixelRatio)
 
static bool isFullyOpaque (const QWindowsThemeData &themeData)
 
static QRectF scaleRect (const QRectF &r, qreal factor)
 
static QRegion scaleRegion (const QRegion &region, qreal factor)
 
QObjectstyleObject (const QStyleOption *option)
 
bool canAnimate (const QStyleOption *option)
 
static QImage createAnimationBuffer (const QStyleOption *option, const QWidget *widget)
 
QStyleOptionclonedAnimationStyleOption (const QStyleOption *option)
 
void deleteClonedAnimationStyleOption (const QStyleOption *option)
 
static void populateTitleBarButtonTheme (const QStyle *proxy, const QWidget *widget, const QStyleOptionComplex *option, QStyle::SubControl subControl, bool isTitleBarActive, int part, QWindowsThemeData *theme)
 
static bool buttonVisible (const QStyle::SubControl sc, const QStyleOptionTitleBar *tb)
 
static int buttonStateId (int flags, int partId)
 
static bool supportsStateTransition (QStyle::PrimitiveElement element, const QStyleOption *option, const QWidget *widget)
 

Variables

static const int windowsItemFrame = 2
 
static const int windowsItemHMargin = 3
 
static const int windowsItemVMargin = 4
 
static const int windowsArrowHMargin = 6
 
static const int windowsRightBorder = 15
 

Macro Definition Documentation

◆ BP_COMMANDLINK

#define BP_COMMANDLINK   6

Definition at line 47 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawControl().

◆ BP_COMMANDLINKGLYPH

#define BP_COMMANDLINKGLYPH   7

Definition at line 48 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::standardIcon().

◆ CMDLGS_DISABLED

#define CMDLGS_DISABLED   4

Definition at line 52 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::standardIcon().

◆ CMDLGS_HOT

#define CMDLGS_HOT   2

Definition at line 50 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::standardIcon().

◆ CMDLGS_NORMAL

#define CMDLGS_NORMAL   1

Definition at line 49 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::standardIcon().

◆ CMDLGS_PRESSED

#define CMDLGS_PRESSED   3

Definition at line 51 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::standardIcon().

◆ LISS_DISABLED

#define LISS_DISABLED   4

Definition at line 42 of file qwindowsvistastyle.cpp.

◆ LISS_HOT

#define LISS_HOT   2

Definition at line 40 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawPrimitive().

◆ LISS_HOTSELECTED

#define LISS_HOTSELECTED   6

Definition at line 44 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawPrimitive().

◆ LISS_NORMAL

#define LISS_NORMAL   1

Definition at line 39 of file qwindowsvistastyle.cpp.

◆ LISS_SELECTED

#define LISS_SELECTED   3

Definition at line 41 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawPrimitive().

◆ LISS_SELECTEDNOTFOCUS

#define LISS_SELECTEDNOTFOCUS   5

Definition at line 43 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawPrimitive().

◆ TMT_CONTENTMARGINS

#define TMT_CONTENTMARGINS   3602

◆ TMT_SIZINGMARGINS

#define TMT_SIZINGMARGINS   3601

Enumeration Type Documentation

◆ TransformType

Enumerator
SimpleTransform 
HighDpiScalingTransform 
ComplexTransform 

Definition at line 114 of file qwindowsvistastyle.cpp.

Function Documentation

◆ buttonStateId()

static int buttonStateId ( int flags,
int partId )
static

Definition at line 1204 of file qwindowsvistastyle.cpp.

References Q_ASSERT, QStyle::State_Enabled, QStyle::State_MouseOver, QStyle::State_On, and QStyle::State_Sunken.

Referenced by QWindowsVistaStyle::drawControl(), and QWindowsVistaStyle::drawPrimitive().

+ Here is the caller graph for this function:

◆ buttonVisible()

◆ canAnimate()

bool canAnimate ( const QStyleOption * option)

Definition at line 1041 of file qwindowsvistastyle.cpp.

References QObject::property(), and QVariant::toBool().

Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), and QWindowsVistaStyle::drawPrimitive().

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

◆ clonedAnimationStyleOption()

QStyleOption * clonedAnimationStyleOption ( const QStyleOption * option)

Definition at line 1060 of file qwindowsvistastyle.cpp.

References button, groupBox, and QStyleOption::rect.

Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), and QWindowsVistaStyle::drawPrimitive().

+ Here is the caller graph for this function:

◆ createAnimationBuffer()

static QImage createAnimationBuffer ( const QStyleOption * option,
const QWidget * widget )
inlinestatic

Definition at line 1047 of file qwindowsvistastyle.cpp.

References QPaintDevice::devicePixelRatioF(), QImage::Format_ARGB32_Premultiplied, qApp, and widget.

Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), and QWindowsVistaStyle::drawPrimitive().

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

◆ createTreeViewHelperWindow()

static HWND createTreeViewHelperWindow ( )
inlinestatic

Definition at line 103 of file qwindowsvistastyle.cpp.

References QGuiApplicationPrivate::platformIntegration(), and QStringLiteral.

+ Here is the call graph for this function:

◆ deleteClonedAnimationStyleOption()

void deleteClonedAnimationStyleOption ( const QStyleOption * option)

Definition at line 1081 of file qwindowsvistastyle.cpp.

References button, and groupBox.

Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), and QWindowsVistaStyle::drawPrimitive().

+ Here is the caller graph for this function:

◆ isFullyOpaque()

static bool isFullyOpaque ( const QWindowsThemeData & themeData)
inlinestatic

Definition at line 129 of file qwindowsvistastyle.cpp.

References QWindowsVistaStylePrivate::TaskDialogTheme.

Referenced by QWindowsVistaStylePrivate::drawBackground().

+ Here is the caller graph for this function:

◆ populateTitleBarButtonTheme()

static void populateTitleBarButtonTheme ( const QStyle * proxy,
const QWidget * widget,
const QStyleOptionComplex * option,
QStyle::SubControl subControl,
bool isTitleBarActive,
int part,
QWindowsThemeData * theme )
static

Definition at line 1097 of file qwindowsvistastyle.cpp.

References QStyle::CC_TitleBar, QWidget::isEnabled(), QWindowsThemeData::partId, proxy, RBS_INACTIVE, QWindowsThemeData::rect, QStyle::State_MouseOver, QStyle::State_Sunken, QWindowsThemeData::stateId, and widget.

Referenced by QWindowsVistaStyle::drawComplexControl().

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

◆ progressBarOrientation()

static Qt::Orientation progressBarOrientation ( const QStyleOption * option = nullptr)
inlinestatic

Definition at line 87 of file qwindowsvistastyle.cpp.

References Qt::Horizontal, QStyle::State_Horizontal, and Qt::Vertical.

Referenced by QWindowsVistaStylePrivate::pixelMetricFromSystemDp().

+ Here is the caller graph for this function:

◆ qt_add_rect()

static void qt_add_rect ( HRGN & winRegion,
QRect r )
static

Definition at line 61 of file qwindowsvistastyle.cpp.

Referenced by qt_hrgn_from_qregion().

+ Here is the caller graph for this function:

◆ qt_hrgn_from_qregion()

static HRGN qt_hrgn_from_qregion ( const QRegion & region)
static

Definition at line 75 of file qwindowsvistastyle.cpp.

References QRegion::boundingRect(), qt_add_rect(), rect, and QRegion::rectCount().

Referenced by QWindowsVistaStylePrivate::drawBackgroundDirectly().

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

◆ scaleRect()

static QRectF scaleRect ( const QRectF & r,
qreal factor )
inlinestatic

Definition at line 134 of file qwindowsvistastyle.cpp.

◆ scaleRegion()

static QRegion scaleRegion ( const QRegion & region,
qreal factor )
static

Definition at line 140 of file qwindowsvistastyle.cpp.

References QRegion::isEmpty(), qFuzzyCompare(), and rect.

Referenced by QWindowsVistaStylePrivate::drawBackgroundDirectly(), and QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer().

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

◆ styleObject()

QObject * styleObject ( const QStyleOption * option)
inline

Definition at line 1034 of file qwindowsvistastyle.cpp.

Referenced by QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QWindows11Style::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QWindows11Style::drawPrimitive(), and QWindowsVistaStyle::drawPrimitive().

+ Here is the caller graph for this function:

◆ supportsStateTransition()

static bool supportsStateTransition ( QStyle::PrimitiveElement element,
const QStyleOption * option,
const QWidget * widget )
inlinestatic

Definition at line 1235 of file qwindowsvistastyle.cpp.

References QWindowsVistaStylePrivate::isLineEditBaseColorSet(), QStyle::PE_FrameLineEdit, QStyle::PE_IndicatorCheckBox, QStyle::PE_IndicatorRadioButton, and widget.

Referenced by QWindowsVistaStyle::drawPrimitive().

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

◆ transformType()

static TransformType transformType ( const QTransform & transform,
qreal devicePixelRatio )
inlinestatic

Definition at line 116 of file qwindowsvistastyle.cpp.

References ComplexTransform, HighDpiScalingTransform, qFuzzyCompare(), SimpleTransform, QTransform::TxScale, and QTransform::TxTranslate.

+ Here is the call graph for this function:

Variable Documentation

◆ windowsArrowHMargin

const int windowsArrowHMargin = 6
static

Definition at line 29 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawControl().

◆ windowsItemFrame

const int windowsItemFrame = 2
static

Definition at line 26 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawControl().

◆ windowsItemHMargin

const int windowsItemHMargin = 3
static

◆ windowsItemVMargin

const int windowsItemVMargin = 4
static

Definition at line 28 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawControl().

◆ windowsRightBorder

const int windowsRightBorder = 15
static

Definition at line 30 of file qwindowsvistastyle.cpp.

Referenced by QWindowsVistaStyle::drawControl().