Qt 4.8
Public Functions | Public Variables | List of all members
XPThemeData Class Reference

#include <qwindowsxpstyle_p.h>

Public Functions

HTHEME handle ()
 
bool isValid ()
 
HRGN mask ()
 
RECT toRECT (const QRect &qr)
 
 XPThemeData (const QWidget *w=0, QPainter *p=0, const QString &theme=QString(), int part=0, int state=0, const QRect &r=QRect())
 

Public Variables

HTHEME htheme
 
uint mirrorHorizontally: 1
 
uint mirrorVertically: 1
 
QString name
 
uint noBorder: 1
 
uint noContent: 1
 
QPainterpainter
 
int partId
 
QRect rect
 
uint rotate
 
int stateId
 
const QWidgetwidget
 

Detailed Description

Definition at line 209 of file qwindowsxpstyle_p.h.

Constructors and Destructors

◆ XPThemeData()

XPThemeData::XPThemeData ( const QWidget w = 0,
QPainter p = 0,
const QString theme = QString(),
int  part = 0,
int  state = 0,
const QRect r = QRect() 
)
inline

Definition at line 212 of file qwindowsxpstyle_p.h.

214  : widget(w), painter(p), name(theme), htheme(0), partId(part), stateId(state),
215  mirrorHorizontally(false), mirrorVertically(false), noBorder(false),
216  noContent(false), rotate(0), rect(r)
217  {}
const QWidget * widget
QPainter * painter

Functions

◆ handle()

HTHEME XPThemeData::handle ( )

Definition at line 155 of file qwindowsxpstyle.cpp.

Referenced by QWindowsXPStylePrivate::drawBackgroundDirectly(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsXPStylePrivate::isTransparent(), isValid(), mask(), QWindowsXPStyle::pixelMetric(), QWindowsXPStyle::polish(), QWindowsXPStyle::QWindowsXPStyle(), QWindowsXPStylePrivate::region(), QWindowsVistaStyle::sizeFromContents(), QWindowsXPStyle::sizeFromContents(), QWindowsXPStyle::standardIconImplementation(), QWindowsVistaStyle::standardIconImplementation(), QWindowsXPStyle::standardPixmap(), QWindowsVistaStyle::subElementRect(), QWindowsXPStyle::subElementRect(), and QWindowsXPStylePrivate::tabBody().

156 {
158  return 0;
159 
162 
163  if (!htheme) {
165  if (htheme) {
169  }
170  }
171 
172  return htheme;
173 }
const QWidget * widget
static PtrOpenThemeData pOpenThemeData
static HWND winId(const QWidget *widget)
This function will always return a valid window handle, and might create a limbo widget to do so...
static bool useXP(bool update=false)
static QMap< QString, HTHEME > * handleMap
const ushort * utf16() const
Returns the QString as a &#39;\0\&#39;-terminated array of unsigned shorts.
Definition: qstring.cpp:5290

◆ isValid()

bool XPThemeData::isValid ( )

◆ mask()

HRGN XPThemeData::mask ( )

Definition at line 192 of file qwindowsxpstyle.cpp.

Referenced by QWindowsXPStylePrivate::setTransparency().

193 {
195  return 0;
196 
197  HRGN hrgn;
198  HDC dc = painter == 0 ? 0 : painter->paintEngine()->getDC();
199  RECT nativeRect = toRECT(rect);
200  pGetThemeBackgroundRegion(handle(), dc, partId, stateId, &nativeRect, &hrgn);
201  if (dc)
202  painter->paintEngine()->releaseDC(dc);
203  return hrgn;
204 }
QPainter * painter
virtual HDC getDC() const
Empty default implementation.
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
Definition: qpainter.cpp:1991
virtual void releaseDC(HDC hdc) const
Empty default implementation.
RECT toRECT(const QRect &qr)
static PtrIsThemeBackgroundPartiallyTransparent pIsThemeBackgroundPartiallyTransparent
static PtrGetThemeBackgroundRegion pGetThemeBackgroundRegion

◆ toRECT()

RECT XPThemeData::toRECT ( const QRect qr)

Definition at line 178 of file qwindowsxpstyle.cpp.

Referenced by QWindowsXPStylePrivate::drawBackgroundDirectly(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), mask(), and QWindowsXPStylePrivate::region().

179 {
180  RECT r;
181  r.left = qr.x();
182  r.right = qr.x() + qr.width();
183  r.top = qr.y();
184  r.bottom = qr.y() + qr.height();
185  return r;
186 }
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252

Properties

◆ htheme

HTHEME XPThemeData::htheme

Definition at line 228 of file qwindowsxpstyle_p.h.

Referenced by handle().

◆ mirrorHorizontally

uint XPThemeData::mirrorHorizontally

◆ mirrorVertically

uint XPThemeData::mirrorVertically

◆ name

QString XPThemeData::name

◆ noBorder

uint XPThemeData::noBorder

◆ noContent

uint XPThemeData::noContent

◆ painter

QPainter* XPThemeData::painter

◆ partId

int XPThemeData::partId

◆ rect

QRect XPThemeData::rect

◆ rotate

uint XPThemeData::rotate

◆ stateId

int XPThemeData::stateId

◆ widget

const QWidget* XPThemeData::widget

Definition at line 225 of file qwindowsxpstyle_p.h.

Referenced by handle().


The documentation for this class was generated from the following files: