![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquickwindowsxpstyle_p_p.h>
Public Types | |
| enum | Theme { ButtonTheme , ComboboxTheme , EditTheme , HeaderTheme , ListViewTheme , MenuTheme , ProgressTheme , RebarTheme , ScrollBarTheme , SpinTheme , TabTheme , TaskDialogTheme , ToolBarTheme , ToolTipTheme , TrackBarTheme , XpTreeViewTheme , WindowTheme , StatusTheme , VistaTreeViewTheme , NThemes } |
| Public Types inherited from QQC2::QWindowsStylePrivate | |
| enum | { InvalidMetric = -23576 } |
| enum | { windowsItemFrame = 2 , windowsSepHeight = 9 , windowsItemHMargin = 3 , windowsItemVMargin = 2 , windowsArrowHMargin = 6 , windowsRightBorder = 15 , windowsCheckMarkWidth = 12 } |
| Public Types inherited from QObjectPrivate | |
| typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
| using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Static Public Member Functions | |
| static int | pixelMetricFromSystemDp (QStyle::PixelMetric pm, const QStyleOption *option=nullptr) |
| static int | fixedPixelMetric (QStyle::PixelMetric pm, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) |
| static HWND | winId (const QWindow *window) |
| static bool | useXP (bool update=false) |
| static QRect | scrollBarGripperBounds (QStyle::State flags, XPThemeData *theme) |
| static HTHEME | createTheme (int theme, HWND hwnd) |
| static QString | themeName (int theme) |
| static bool | hasTheme (int theme) |
| static bool | isItemViewDelegateLineEdit (const QWidget *widget) |
| static bool | isLineEditBaseColorSet (const QStyleOption *option, const QWidget *widget) |
| Static Public Member Functions inherited from QQC2::QWindowsStylePrivate | |
| static int | pixelMetricFromSystemDp (QStyle::PixelMetric pm, const QStyleOption *option=nullptr) |
| static int | fixedPixelMetric (QStyle::PixelMetric pm) |
| static qreal | devicePixelRatio (const QStyleOption *option=nullptr) |
| static qreal | devicePixelRatio (const QWindow *win) |
| static qreal | nativeMetricScaleFactor (const QStyleOption *option=nullptr) |
| static qreal | nativeMetricScaleFactor (const QWindow *win) |
| static bool | isDarkMode () |
| Static Public Member Functions inherited from QQC2::QStylePrivate | |
| static bool | useFullScreenForPopup () |
| Static Public Member Functions inherited from QObjectPrivate | |
| static bool | removeConnection (Connection *c) |
| static QObjectPrivate * | get (QObject *o) |
| static const QObjectPrivate * | get (const QObject *o) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
| static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
| static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
| static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Definition at line 159 of file qquickwindowsxpstyle_p_p.h.
Definition at line 163 of file qquickwindowsxpstyle_p_p.h.
|
inline |
Definition at line 186 of file qquickwindowsxpstyle_p_p.h.
References init().
|
inline |
Definition at line 189 of file qquickwindowsxpstyle_p_p.h.
References cleanup().
| HBITMAP QQC2::QWindowsXPStylePrivate::buffer | ( | int | w = 0, |
| int | h = 0 ) |
Returns a native buffer (DIB section) of at least the size of ( x , y ). The buffer has a 32 bit depth, to not lose the alpha values on proper alpha-pixmaps.
Definition at line 324 of file qquickwindowsxpstyle.cpp.
|
inline |
Definition at line 202 of file qquickwindowsxpstyle_p_p.h.
| void QQC2::QWindowsXPStylePrivate::cleanup | ( | bool | force = false | ) |
Definition at line 149 of file qquickwindowsxpstyle.cpp.
References cleanupHandleMap().
Referenced by ~QWindowsXPStylePrivate().
| void QQC2::QWindowsXPStylePrivate::cleanupHandleMap | ( | ) |
Definition at line 228 of file qquickwindowsxpstyle.cpp.
Referenced by cleanup().
|
static |
Definition at line 239 of file qquickwindowsxpstyle.cpp.
| bool QQC2::QWindowsXPStylePrivate::drawBackground | ( | XPThemeData & | themeData, |
| qreal | correctionFactor = 1 ) |
Main theme drawing function. Determines the correct lowlevel drawing method depending on several factors. Use drawBackgroundThruNativeBuffer() if:
Definition at line 571 of file qquickwindowsxpstyle.cpp.
| bool QQC2::QWindowsXPStylePrivate::drawBackgroundDirectly | ( | HDC | dc, |
| XPThemeData & | themeData, | ||
| qreal | additionalDevicePixelRatio ) |
This function draws the theme parts directly to the paintengines HDC. Do not use this if you need to perform other transformations on the resulting data.
Definition at line 649 of file qquickwindowsxpstyle.cpp.
References QQC2::XPThemeData::partId, and QQC2::XPThemeData::stateId.
| bool QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer | ( | XPThemeData & | themeData, |
| qreal | additionalDevicePixelRatio, | ||
| qreal | correctionFactor ) |
This function uses a secondary Native doublebuffer for painting parts. It should only be used when the painteengine doesn't provide a proper HDC for direct painting (e.g. when doing a grabWidget(), painting to other pixmaps etc), or when special transformations are needed (e.g. flips (horizonal mirroring only, vertical are handled by the theme engine).
correctionFactor is an additional factor used to scale up controls that are too small on High DPI screens, as has been observed for WP_MDICLOSEBUTTON, WP_MDIRESTOREBUTTON, WP_MDIMINBUTTON (QTBUG-75927).
Definition at line 701 of file qquickwindowsxpstyle.cpp.
References QQC2::ThemeMapKey::ThemeMapKey(), QQC2::ThemeMapData::alphaType, QQC2::ThemeMapData::dataValid, QQC2::ThemeMapData::hadInvalidAlpha, QQC2::ThemeMapData::hasAlphaChannel, isTransparent(), QQC2::MaskAlpha, QQC2::NoAlpha, QQC2::XPThemeData::partId, QQC2::ThemeMapData::partIsTransparent, QQC2::RealAlpha, QQC2::XPThemeData::stateId, QQC2::UnknownAlpha, and QQC2::ThemeMapData::wasAlphaSwapped.
| bool QQC2::QWindowsXPStylePrivate::fixAlphaChannel | ( | const QRect & | rect | ) |
When the theme engine paints both a true alpha pixmap and a glyph into our buffer, the glyph might not contain a proper alpha value. The rule of thumb for premultiplied pixmaps is that the color values of a pixel can never be higher than the alpha values, so we use this to our advantage here, and fix all instances where this occures.
Definition at line 478 of file qquickwindowsxpstyle.cpp.
|
static |
| bool QQC2::QWindowsXPStylePrivate::hasAlphaChannel | ( | const QRect & | rect | ) |
Returns true if the native doublebuffer contains pixels with varying alpha value.
Definition at line 449 of file qquickwindowsxpstyle.cpp.
|
inlinestatic |
Definition at line 226 of file qquickwindowsxpstyle_p_p.h.
| void QQC2::QWindowsXPStylePrivate::init | ( | bool | force = false | ) |
Definition at line 135 of file qquickwindowsxpstyle.cpp.
References useXP().
Referenced by QWindowsXPStylePrivate().
|
static |
|
static |
| bool QQC2::QWindowsXPStylePrivate::isTransparent | ( | XPThemeData & | themeData | ) |
Returns true if the part contains any transparency at all. This does not indicate what kind of transparency we're dealing with. It can be
Definition at line 388 of file qquickwindowsxpstyle.cpp.
References QQC2::XPThemeData::partId, and QQC2::XPThemeData::stateId.
Referenced by drawBackgroundThruNativeBuffer().
|
static |
Definition at line 3045 of file qquickwindowsxpstyle.cpp.
| QRegion QQC2::QWindowsXPStylePrivate::region | ( | XPThemeData & | themeData | ) |
Returns a QRegion of the region of the part
Definition at line 398 of file qquickwindowsxpstyle.cpp.
References QQC2::XPThemeData::partId, and QQC2::XPThemeData::stateId.
|
static |
Definition at line 2265 of file qquickwindowsxpstyle.cpp.
| bool QQC2::QWindowsXPStylePrivate::swapAlphaChannel | ( | const QRect & | rect, |
| bool | allPixels = false ) |
Swaps the alpha values on certain pixels: 0xFF?????? -> 0x00?????? 0x00?????? -> 0xFF?????? Used to determin the mask of a non-alpha transparent pixmap in the native doublebuffer, and swap the alphas so we may paint the image as a Premultiplied QImage with drawImage(), and obtain the mask transparency.
Definition at line 509 of file qquickwindowsxpstyle.cpp.
|
static |
Definition at line 257 of file qquickwindowsxpstyle.cpp.
|
static |
Definition at line 123 of file qquickwindowsxpstyle.cpp.
Referenced by QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawControl(), QQC2::QWindowsXPStyle::drawPrimitive(), QQC2::XPThemeData::handle(), init(), QQC2::QWindowsXPStyle::standardIcon(), and QQC2::QWindowsXPStyle::subElementRect().
|
static |
This function will always return a valid window handle, and might create a limbo widget to do so. We often need a window handle to for example open theme data, so this function ensures that we get one.
Definition at line 303 of file qquickwindowsxpstyle.cpp.
| QIcon QQC2::QWindowsXPStylePrivate::dockClose |
Definition at line 230 of file qquickwindowsxpstyle_p_p.h.
| QIcon QQC2::QWindowsXPStylePrivate::dockFloat |
Definition at line 230 of file qquickwindowsxpstyle_p_p.h.
| QRgb QQC2::QWindowsXPStylePrivate::groupBoxTextColor = 0 |
Definition at line 219 of file qquickwindowsxpstyle_p_p.h.
| QRgb QQC2::QWindowsXPStylePrivate::groupBoxTextColorDisabled = 0 |
Definition at line 220 of file qquickwindowsxpstyle_p_p.h.
| bool QQC2::QWindowsXPStylePrivate::hasInitColors = false |
Definition at line 222 of file qquickwindowsxpstyle_p_p.h.
| QRgb QQC2::QWindowsXPStylePrivate::sliderTickColor = 0 |
Definition at line 221 of file qquickwindowsxpstyle_p_p.h.