![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qwindowsvistastyle_p_p.h>
Public Types | |
enum | Theme { ButtonTheme , ComboboxTheme , EditTheme , HeaderTheme , ListViewTheme , MenuTheme , ProgressTheme , RebarTheme , ScrollBarTheme , SpinTheme , TabTheme , TaskDialogTheme , ToolBarTheme , ToolTipTheme , TrackBarTheme , WindowTheme , StatusTheme , VistaTreeViewTheme , NThemes } |
Public Member Functions | |
QWindowsVistaStylePrivate () | |
~QWindowsVistaStylePrivate () | |
void | init (bool force=false) |
void | cleanup (bool force=false) |
void | cleanupHandleMap () |
HBITMAP | buffer (int w=0, int h=0) |
HDC | bufferHDC () |
bool | isTransparent (QWindowsThemeData &QWindowsThemeData) |
QRegion | region (QWindowsThemeData &QWindowsThemeData) |
bool | drawBackground (QWindowsThemeData &QWindowsThemeData, qreal correctionFactor=1) |
bool | drawBackgroundThruNativeBuffer (QWindowsThemeData &QWindowsThemeData, qreal aditionalDevicePixelRatio, qreal correctionFactor) |
bool | drawBackgroundDirectly (HDC dc, QWindowsThemeData &QWindowsThemeData, qreal aditionalDevicePixelRatio) |
bool | hasAlphaChannel (const QRect &rect) |
bool | fixAlphaChannel (const QRect &rect) |
bool | swapAlphaChannel (const QRect &rect, bool allPixels=false) |
QTime | animationTime () const |
bool | transitionsEnabled () const |
Static Public Member Functions | |
static HTHEME | createTheme (int theme, const QWidget *widget) |
static QString | themeName (int theme) |
static bool | isItemViewDelegateLineEdit (const QWidget *widget) |
static int | pixelMetricFromSystemDp (QStyle::PixelMetric pm, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) |
static int | fixedPixelMetric (QStyle::PixelMetric pm) |
static bool | isLineEditBaseColorSet (const QStyleOption *option, const QWidget *widget) |
static HWND | winId (const QWidget *widget) |
static bool | useVista (bool update=false) |
static QBackingStore * | backingStoreForWidget (const QWidget *widget) |
static HDC | hdcForWidgetBackingStore (const QWidget *widget) |
Public Attributes | |
QRgb | groupBoxTextColor = 0 |
QRgb | groupBoxTextColorDisabled = 0 |
QRgb | sliderTickColor = 0 |
bool | hasInitColors = false |
Protected Attributes | |
QFont | assetFont |
QIcon | m_titleBarMinIcon |
QIcon | m_titleBarMaxIcon |
QIcon | m_titleBarCloseIcon |
QIcon | m_titleBarNormalIcon |
Definition at line 88 of file qwindowsvistastyle_p_p.h.
Definition at line 93 of file qwindowsvistastyle_p_p.h.
|
inline |
Definition at line 115 of file qwindowsvistastyle_p_p.h.
References init().
|
inline |
Definition at line 118 of file qwindowsvistastyle_p_p.h.
References cleanup().
QTime QWindowsVistaStylePrivate::animationTime | ( | ) | const |
Animations are started at a frame that is based on the current time, which makes it impossible to run baseline tests with this style. Allow overriding through a dynamic property.
Definition at line 1035 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 312 of file qwindowsvistastyle.cpp.
References QPainter::QWidget.
HBITMAP QWindowsVistaStylePrivate::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 394 of file qwindowsvistastyle.cpp.
|
inline |
Definition at line 137 of file qwindowsvistastyle_p_p.h.
void QWindowsVistaStylePrivate::cleanup | ( | bool | force = false | ) |
Definition at line 185 of file qwindowsvistastyle.cpp.
Referenced by ~QWindowsVistaStylePrivate().
void QWindowsVistaStylePrivate::cleanupHandleMap | ( | ) |
Definition at line 297 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 303 of file qwindowsvistastyle.cpp.
bool QWindowsVistaStylePrivate::drawBackground | ( | QWindowsThemeData & | themeData, |
qreal | correctionFactor = 1 ) |
Main theme drawing function. Determines the correct lowlevel drawing method depending on several factors. Use drawBackgroundThruNativeBuffer() if:
Definition at line 619 of file qwindowsvistastyle.cpp.
References QPaintEngine::QPainter, and QPainter::QWidget.
bool QWindowsVistaStylePrivate::drawBackgroundDirectly | ( | HDC | dc, |
QWindowsThemeData & | 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 678 of file qwindowsvistastyle.cpp.
References QPaintEngine::QPainter.
bool QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer | ( | QWindowsThemeData & | 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 (horizontal 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 730 of file qwindowsvistastyle.cpp.
References ThemeMapData::dataValid, QPaintEngine::QPainter, and UnknownAlpha.
bool QWindowsVistaStylePrivate::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 occurs.
Definition at line 548 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 251 of file qwindowsvistastyle.cpp.
bool QWindowsVistaStylePrivate::hasAlphaChannel | ( | const QRect & | rect | ) |
Returns true
if the native doublebuffer contains pixels with varying alpha value.
Definition at line 519 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 322 of file qwindowsvistastyle.cpp.
void QWindowsVistaStylePrivate::init | ( | bool | force = false | ) |
Definition at line 172 of file qwindowsvistastyle.cpp.
Referenced by QWindowsVistaStylePrivate().
|
static |
Definition at line 337 of file qwindowsvistastyle.cpp.
References QPainter::QWidget.
|
static |
Definition at line 351 of file qwindowsvistastyle.cpp.
bool QWindowsVistaStylePrivate::isTransparent | ( | QWindowsThemeData & | 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 458 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 222 of file qwindowsvistastyle.cpp.
QRegion QWindowsVistaStylePrivate::region | ( | QWindowsThemeData & | themeData | ) |
Returns a QRegion of the region of the part
Definition at line 468 of file qwindowsvistastyle.cpp.
bool QWindowsVistaStylePrivate::swapAlphaChannel | ( | const QRect & | rect, |
bool | allPixels = false ) |
Swaps the alpha values on certain pixels: 0xFF?????? -> 0x00?????? 0x00?????? -> 0xFF?????? Used to determine 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 579 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 332 of file qwindowsvistastyle.cpp.
bool QWindowsVistaStylePrivate::transitionsEnabled | ( | ) | const |
Definition at line 207 of file qwindowsvistastyle.cpp.
|
static |
Definition at line 162 of file qwindowsvistastyle.cpp.
Referenced by QWindowsThemeData::handle(), QWindowsVistaAnimation::isUpdateNeeded(), QWindowsVistaStyle::standardIcon(), QWindowsVistaStyle::standardPixmap(), and QWindowsVistaStyle::unpolish().
|
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 372 of file qwindowsvistastyle.cpp.
|
protected |
Definition at line 160 of file qwindowsvistastyle_p_p.h.
QRgb QWindowsVistaStylePrivate::groupBoxTextColor = 0 |
Definition at line 151 of file qwindowsvistastyle_p_p.h.
QRgb QWindowsVistaStylePrivate::groupBoxTextColorDisabled = 0 |
Definition at line 152 of file qwindowsvistastyle_p_p.h.
bool QWindowsVistaStylePrivate::hasInitColors = false |
Definition at line 154 of file qwindowsvistastyle_p_p.h.
|
protected |
Definition at line 163 of file qwindowsvistastyle_p_p.h.
|
protected |
Definition at line 162 of file qwindowsvistastyle_p_p.h.
|
protected |
Definition at line 161 of file qwindowsvistastyle_p_p.h.
|
protected |
Definition at line 164 of file qwindowsvistastyle_p_p.h.
QRgb QWindowsVistaStylePrivate::sliderTickColor = 0 |
Definition at line 153 of file qwindowsvistastyle_p_p.h.