Qt 4.8
|
#include <qwindowsxpstyle_p.h>
Public Functions | |
HBITMAP | buffer (int w=0, int h=0) |
Returns a native buffer (DIB section) of at least the size of ( x , y ). More... | |
HDC | bufferHDC () |
void | cleanup (bool force=false) |
void | cleanupHandleMap () |
void | drawBackground (XPThemeData &themeData) |
Main theme drawing function. More... | |
void | drawBackgroundDirectly (XPThemeData &themeData) |
This function draws the theme parts directly to the paintengines HDC. More... | |
void | drawBackgroundThruNativeBuffer (XPThemeData &themeData) |
This function uses a secondary Native doublebuffer for painting parts. More... | |
bool | 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. More... | |
bool | hasAlphaChannel (const QRect &rect) |
Returns true if the native doublebuffer contains pixels with varying alpha value. More... | |
bool | hasAnyData (const QRect &rect) |
Returns true if the native doublebuffer contains a pixel which has a non-0xFF alpha value. More... | |
void | init (bool force=false) |
bool | isTransparent (XPThemeData &themeData) |
Returns true if the part contains any transparency at all. More... | |
QWindowsXPStylePrivate () | |
QRegion | region (XPThemeData &themeData) |
void | setTransparency (QWidget *widget, XPThemeData &themeData) |
Sets the parts region on a window. More... | |
bool | 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. More... | |
const QPixmap * | tabBody (QWidget *widget) |
Returns the pointer to a tab widgets body pixmap, scaled to the height of the screen. More... | |
~QWindowsXPStylePrivate () | |
Public Functions inherited from QWindowsStylePrivate | |
bool | altDown () const |
bool | hasSeenAlt (const QWidget *widget) const |
QWindowsStylePrivate () | |
void | startAnimation (QObject *o, QProgressBar *bar) |
void | stopAnimation (QObject *o, QProgressBar *bar) |
Public Functions inherited from QCommonStylePrivate | |
bool | isViewItemCached (const QStyleOptionViewItemV4 &option) const |
QCommonStylePrivate () | |
void | tabLayout (const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const |
void | viewItemDrawText (QPainter *p, const QStyleOptionViewItemV4 *option, const QRect &rect) const |
void | viewItemLayout (const QStyleOptionViewItemV4 *opt, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const |
Set sizehint to false to layout the elements inside opt->rect. More... | |
QSize | viewItemSize (const QStyleOptionViewItemV4 *option, int role) const |
~QCommonStylePrivate () | |
Public Functions inherited from QStylePrivate | |
QStylePrivate () | |
Public Functions inherited from QObjectPrivate | |
void | _q_reregisterTimers (void *pointer) |
void | addConnection (int signal, Connection *c) |
void | cleanConnectionLists () |
void | connectNotify (const char *signal) |
void | deleteChildren () |
void | disconnectNotify (const char *signal) |
bool | isSender (const QObject *receiver, const char *signal) const |
bool | isSignalConnected (uint signalIdx) const |
Returns true if the signal with index signal_index from object sender is connected. More... | |
void | moveToThread_helper () |
QObjectPrivate (int version=QObjectPrivateVersion) | |
QObjectList | receiverList (const char *signal) const |
QObjectList | senderList () const |
void | setParent_helper (QObject *) |
void | setThreadData_helper (QThreadData *currentData, QThreadData *targetData) |
int | signalIndex (const char *signalName) const |
Returns the signal index used in the internal connectionLists vector. More... | |
virtual | ~QObjectPrivate () |
Public Functions inherited from QObjectData | |
virtual | ~QObjectData ()=0 |
Static Public Functions | |
static bool | isItemViewDelegateLineEdit (const QWidget *widget) |
static bool | resolveSymbols () |
Returns true if all the necessary theme engine symbols were resolved. More... | |
static bool | useXP (bool update=false) |
static HWND | winId (const QWidget *widget) |
This function will always return a valid window handle, and might create a limbo widget to do so. More... | |
Static Public Functions inherited from QObjectPrivate | |
static void | clearGuards (QObject *) |
static QObjectPrivate * | get (QObject *o) |
static void | resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender) |
static Sender * | setCurrentSender (QObject *receiver, Sender *sender) |
static void | signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result) |
Static Public Variables | |
static QMap< QString, HTHEME > * | handleMap = 0 |
Properties | |
QHash< ThemeMapKey, ThemeMapData > | alphaCache |
HBITMAP | bufferBitmap |
HDC | bufferDC |
int | bufferH |
uchar * | bufferPixels |
int | bufferW |
HBITMAP | nullBitmap |
Static Private Attributes | |
static QWidget * | limboWidget = 0 |
static QBasicAtomicInt | ref = Q_BASIC_ATOMIC_INITIALIZER(-1) |
static QPixmap * | tabbody = 0 |
static bool | use_xp = false |
Additional Inherited Members | |
Public Types inherited from QWindowsStylePrivate | |
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 **) |
Definition at line 285 of file qwindowsxpstyle_p.h.
|
inline |
Definition at line 289 of file qwindowsxpstyle_p.h.
|
inline |
Definition at line 294 of file qwindowsxpstyle_p.h.
HBITMAP QWindowsXPStylePrivate::buffer | ( | int | w = 0 , |
int | h = 0 |
||
) |
Returns a native buffer (DIB section) of at least the size of ( x , y ).
Definition at line 410 of file qwindowsxpstyle.cpp.
|
inline |
Definition at line 305 of file qwindowsxpstyle_p.h.
void QWindowsXPStylePrivate::cleanup | ( | bool | force = false | ) |
Definition at line 242 of file qwindowsxpstyle.cpp.
void QWindowsXPStylePrivate::cleanupHandleMap | ( | ) |
Definition at line 278 of file qwindowsxpstyle.cpp.
void QWindowsXPStylePrivate::drawBackground | ( | XPThemeData & | themeData | ) |
Main theme drawing function.
Determines the correct lowlevel drawing method depending on several factors. Use drawBackgroundThruNativeBuffer() if:
Definition at line 660 of file qwindowsxpstyle.cpp.
Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsXPStyle::standardIconImplementation(), and QWindowsVistaStyle::standardIconImplementation().
void QWindowsXPStylePrivate::drawBackgroundDirectly | ( | XPThemeData & | themeData | ) |
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 705 of file qwindowsxpstyle.cpp.
void QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer | ( | XPThemeData & | themeData | ) |
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).
Definition at line 786 of file qwindowsxpstyle.cpp.
bool 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 585 of file qwindowsxpstyle.cpp.
bool QWindowsXPStylePrivate::hasAlphaChannel | ( | const QRect & | rect | ) |
Returns true if the native doublebuffer contains pixels with varying alpha value.
Definition at line 553 of file qwindowsxpstyle.cpp.
bool QWindowsXPStylePrivate::hasAnyData | ( | const QRect & | rect | ) |
Returns true if the native doublebuffer contains a pixel which has a non-0xFF alpha value.
Definition at line 528 of file qwindowsxpstyle.cpp.
void QWindowsXPStylePrivate::init | ( | bool | force = false | ) |
Definition at line 229 of file qwindowsxpstyle.cpp.
|
static |
Definition at line 290 of file qwindowsxpstyle.cpp.
Referenced by QWindowsVistaStyle::drawPrimitive(), and QWindowsXPStyle::drawPrimitive().
bool QWindowsXPStylePrivate::isTransparent | ( | XPThemeData & | themeData | ) |
Returns true if the part contains any transparency at all.
Definition at line 474 of file qwindowsxpstyle.cpp.
QRegion QWindowsXPStylePrivate::region | ( | XPThemeData & | themeData | ) |
Definition at line 484 of file qwindowsxpstyle.cpp.
Referenced by QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::styleHint(), and QWindowsXPStyle::styleHint().
|
static |
Returns true if all the necessary theme engine symbols were resolved.
Definition at line 364 of file qwindowsxpstyle.cpp.
void QWindowsXPStylePrivate::setTransparency | ( | QWidget * | widget, |
XPThemeData & | themeData | ||
) |
Sets the parts region on a window.
Definition at line 512 of file qwindowsxpstyle.cpp.
bool 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 619 of file qwindowsxpstyle.cpp.
Returns the pointer to a tab widgets body pixmap, scaled to the height of the screen.
Definition at line 337 of file qwindowsxpstyle.cpp.
|
static |
Definition at line 218 of file qwindowsxpstyle.cpp.
Referenced by QWindowsXPStyle::drawComplexControl(), QWindowsXPStyle::drawControl(), QWindowsXPStyle::drawPrimitive(), XPThemeData::handle(), XPThemeData::isValid(), QWindowsXPStyle::pixelMetric(), QWindowsXPStyle::polish(), QWindowsXPStyle::sizeFromContents(), QWindowsXPStyle::standardIconImplementation(), QWindowsXPStyle::standardPalette(), QWindowsXPStyle::standardPixmap(), QWindowsXPStyle::styleHint(), QWindowsXPStyle::subControlRect(), QWindowsXPStyle::subElementRect(), QWindowsXPStyle::unpolish(), and QWindowsVistaStylePrivate::useVista().
|
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 312 of file qwindowsxpstyle.cpp.
Referenced by XPThemeData::handle(), QWindowsVistaStyle::polish(), and QWindowsVistaStyle::subElementRect().
|
private |
Definition at line 346 of file qwindowsxpstyle_p.h.
|
private |
Definition at line 348 of file qwindowsxpstyle_p.h.
|
private |
Definition at line 347 of file qwindowsxpstyle_p.h.
|
private |
Definition at line 351 of file qwindowsxpstyle_p.h.
|
private |
Definition at line 350 of file qwindowsxpstyle_p.h.
|
private |
Definition at line 351 of file qwindowsxpstyle_p.h.
QIcon QWindowsXPStylePrivate::dockClose |
Definition at line 333 of file qwindowsxpstyle_p.h.
Referenced by QWindowsXPStyle::standardIconImplementation().
QIcon QWindowsXPStylePrivate::dockFloat |
Definition at line 333 of file qwindowsxpstyle_p.h.
Referenced by QWindowsXPStyle::standardIconImplementation().
QRgb QWindowsXPStylePrivate::groupBoxTextColor |
Definition at line 326 of file qwindowsxpstyle_p.h.
Referenced by QWindowsXPStyle::styleHint().
QRgb QWindowsXPStylePrivate::groupBoxTextColorDisabled |
Definition at line 327 of file qwindowsxpstyle_p.h.
Referenced by QWindowsXPStyle::styleHint().
Definition at line 331 of file qwindowsxpstyle_p.h.
Referenced by XPThemeData::handle(), and XPThemeData::mask().
bool QWindowsXPStylePrivate::hasInitColors |
Definition at line 329 of file qwindowsxpstyle_p.h.
|
staticprivate |
Definition at line 343 of file qwindowsxpstyle_p.h.
Referenced by XPThemeData::mask().
|
private |
Definition at line 349 of file qwindowsxpstyle_p.h.
|
staticprivate |
Definition at line 341 of file qwindowsxpstyle_p.h.
Referenced by XPThemeData::mask().
QRgb QWindowsXPStylePrivate::sliderTickColor |
Definition at line 328 of file qwindowsxpstyle_p.h.
Referenced by QWindowsXPStyle::drawComplexControl().
|
staticprivate |
Definition at line 344 of file qwindowsxpstyle_p.h.
Referenced by XPThemeData::mask().
|
staticprivate |
Definition at line 342 of file qwindowsxpstyle_p.h.
Referenced by XPThemeData::mask().