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
qwindowsthemedata.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
6
7/* \internal
8 Returns \c true if the QWindowsThemeData is valid for use.
9*/
14
15/* \internal
16 Returns the theme engine handle to the specific class.
17 If the handle hasn't been opened before, it opens the data, and
18 adds it to a static map, for caching.
19*/
29
30/* \internal
31 Converts a QRect to the native RECT structure.
32*/
34{
35 RECT r;
36 r.left = qr.x();
37 r.right = qr.x() + qr.width();
38 r.top = qr.y();
39 r.bottom = qr.y() + qr.height();
40 return r;
41}
42
43/* \internal
44 Returns the native region of a part, if the part is considered
45 transparent. The region is scaled to the parts size (rect).
46*/
48{
49 if (!IsThemeBackgroundPartiallyTransparent(handle(), partId, stateId))
50 return nullptr;
51
52 HRGN hrgn;
53 HDC dc = nullptr;
54 if (widget)
56 RECT nativeRect = toRECT(rect);
57 GetThemeBackgroundRegion(handle(), dc, partId, stateId, &nativeRect, &hrgn);
58 return hrgn;
59}
\inmodule QtCore\reentrant
Definition qrect.h:30
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
HRGN mask(QWidget *widget)
const QWidget * widget
static RECT toRECT(const QRect &qr)
static HDC hdcForWidgetBackingStore(const QWidget *widget)
static HWND winId(const QWidget *widget)
static bool useVista(bool update=false)
static HTHEME createTheme(int theme, HWND hwnd)
QOpenGLWidget * widget
[1]
GLboolean r
[2]