45 #include "private/qobject_p.h" 46 #include <QtGui/qstyle.h> 76 #define BEGIN_STYLE_PIXMAPCACHE(a) \ 77 QRect rect = option->rect; \ 78 QPixmap internalPixmapCache; \ 80 QPainter *p = painter; \ 81 QString unique = QStyleHelper::uniqueName((a), option, option->rect.size()); \ 82 int txType = painter->deviceTransform().type() | painter->worldTransform().type(); \ 83 bool doPixmapCache = txType <= QTransform::TxTranslate; \ 84 if (doPixmapCache && QPixmapCache::find(unique, internalPixmapCache)) { \ 85 painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \ 87 if (doPixmapCache) { \ 88 rect.setRect(0, 0, option->rect.width(), option->rect.height()); \ 89 imageCache = QImage(option->rect.size(), QImage::Format_ARGB32_Premultiplied); \ 91 p = new QPainter(&imageCache); \ 96 #define END_STYLE_PIXMAPCACHE \ 97 if (doPixmapCache) { \ 100 internalPixmapCache = QPixmap::fromImage(imageCache); \ 101 painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \ 102 QPixmapCache::insert(unique, internalPixmapCache); \ #define QT_END_NAMESPACE
This macro expands to.
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_DECLARE_PUBLIC(Class)
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...