43 #include "qplatformdefs.h" 47 #include <QtCore/qglobal.h> 48 #include <QtCore/qdebug.h> 49 #include <QtCore/qvarlengtharray.h> 50 #include <QtGui/qevent.h> 51 #include <QtGui/qapplication.h> 52 #include <QtGui/qpaintengine.h> 53 #include <QtGui/qgraphicsproxywidget.h> 55 #include <private/qwidget_p.h> 56 #include <private/qwindowsurface_raster_p.h> 57 #include <private/qapplication_p.h> 58 #include <private/qpaintengine_raster_p.h> 59 #include <private/qgraphicseffect_p.h> 64 #include <QtGui/qwsmanager_qws.h> 65 #include <private/qwsmanager_p.h> 94 #if !defined(QT_NO_PAINT_DEBUG) && !defined(Q_WS_QWS) 106 static int frames = 0;
111 double fps = double(frames * 1000) /time.
restart();
112 fprintf(stderr,
"FPS: %.1f\n",fps);
117 windowSurface->
flush(widget, region, tlwOffset + widget->
mapTo(tlw,
QPoint()));
119 windowSurface->
flush(widget, region, tlwOffset);
122 #ifndef QT_NO_PAINT_DEBUG 130 brush = CreateSolidBrush(RGB(255, 255, 0));
133 brush = CreateSolidBrush(RGB(255, 200, 55));
136 brush = CreateSolidBrush(RGB(200, 255, 55));
139 brush = CreateSolidBrush(RGB(200, 200, 0));
144 HDC hdc = widget->
getDC();
147 foreach (
QRect rect, rects) {
150 FillRect(hdc, &winRect, brush);
167 QRegion paintRegion = toBePainted;
175 widget = nativeParent;
184 if (unclipped && !widget->d_func()->paintOnScreen())
229 #if defined(Q_OS_UNIX) 230 ::usleep(1000 * msec);
243 static int flushPaintEvent =
qgetenv(
"QT_FLUSH_PAINT_EVENT").
toInt();
244 if (!flushPaintEvent)
246 delay = flushPaintEvent;
260 if (widget->d_func()->paintOnScreen() || rgn.
isEmpty())
264 QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();
271 #endif // QT_NO_PAINT_DEBUG 289 #if defined(Q_WS_QPA) 294 #ifdef Q_BACKINGSTORE_SUBSURFACES 295 for (
int i = 0; i < subSurfaces.size(); ++i)
296 subSurfaces.at(i)->setGeometry(
QRect());
318 windowSurface =
tlw->d_func()->createDefaultWindowSurface();
329 const QRegion toCleanUnclipped(toClean);
333 #ifdef Q_BACKINGSTORE_SUBSURFACES 334 else if (toCleanIsInTopLevelCoordinates)
336 if (!toCleanIsInTopLevelCoordinates && windowSurface == this->windowSurface)
356 if (toCleanUnclipped != toClean) {
369 Q_UNUSED(toCleanIsInTopLevelCoordinates);
374 #if defined(Q_WS_QWS) && !defined(Q_BACKINGSTORE_SUBSURFACES) 378 #ifdef QT_NO_PAINT_DEBUG 396 #ifndef QT_NO_PAINT_DEBUG 406 #ifdef Q_BACKINGSTORE_SUBSURFACES 407 flush(static_cast<QWSWindowSurface *>(windowSurface)->
window(), windowSurface);
421 const bool widgetDirty = widget && widget !=
tlw;
423 #if defined(Q_WS_QPA) 442 if (widgetDirty && w != widget && !widget->
isAncestorOf(w))
453 if (widgetDirty && w != widget && !widget->
isAncestorOf(w))
478 #if defined(Q_WS_QPA) 483 QRect surfaceRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());
485 surfaceRect &= withinClipRect;
493 const bool clipToRect = !withinClipRect.
isEmpty();
495 for (
int i = 0; i < count; ++i) {
532 if (updateImmediately) {
554 bool invalidateBuffer)
558 Q_ASSERT(!
tlw->d_func()->extra->topextra->inTopLevelResize);
563 #ifndef QT_NO_GRAPHICSEFFECT 564 widget->d_func()->invalidateGraphicsEffectsRecursively();
565 #endif //QT_NO_GRAPHICSEFFECT 567 if (widget->d_func()->paintOnScreen()) {
568 if (widget->d_func()->dirty.isEmpty()) {
569 widget->d_func()->dirty = rgn;
573 if (updateImmediately)
578 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();
579 widget->d_func()->dirty += rgn;
580 if (!eventAlreadyPosted || updateImmediately)
586 if (updateImmediately)
598 const QRect widgetRect = widget->d_func()->effectiveRectFor(widget->
rect());
600 if (updateImmediately)
605 if (invalidateBuffer) {
607 #ifndef QT_NO_GRAPHICSEFFECT 609 dirty += widget->d_func()->effectiveRectFor(rgn.
boundingRect()).translated(offset);
611 #endif //QT_NO_GRAPHICSEFFECT 613 if (!eventAlreadyPosted || updateImmediately)
624 if (widget->d_func()->inDirtyList) {
626 #ifndef QT_NO_GRAPHICSEFFECT 628 widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.
boundingRect());
630 #endif //QT_NO_GRAPHICSEFFECT 631 widget->d_func()->dirty += rgn;
637 if (updateImmediately)
649 bool invalidateBuffer)
653 Q_ASSERT(!
tlw->d_func()->extra->topextra->inTopLevelResize);
658 #ifndef QT_NO_GRAPHICSEFFECT 659 widget->d_func()->invalidateGraphicsEffectsRecursively();
660 #endif //QT_NO_GRAPHICSEFFECT 662 if (widget->d_func()->paintOnScreen()) {
663 if (widget->d_func()->dirty.isEmpty()) {
664 widget->d_func()->dirty =
QRegion(rect);
668 if (updateImmediately)
673 const bool eventAlreadyPosted = !widget->d_func()->dirty.isEmpty();
674 widget->d_func()->dirty += rect;
675 if (!eventAlreadyPosted || updateImmediately)
681 if (updateImmediately)
692 const QRect widgetRect = widget->d_func()->effectiveRectFor(rect);
695 if (updateImmediately)
700 if (invalidateBuffer) {
702 dirty += translatedRect;
703 if (!eventAlreadyPosted || updateImmediately)
714 if (widget->d_func()->inDirtyList) {
716 widget->d_func()->dirty += widgetRect;
721 if (updateImmediately)
733 if (!widget || widget->d_func()->paintOnScreen() || region.
isEmpty())
736 #if defined(Q_WS_QWS) || defined(Q_WS_MAC) 752 if (nativeParent ==
tlw) {
787 for (
int i = 0; i < n; ++i) {
793 #if defined(Q_WS_QWS) && !defined(QT_NO_QWS_MANAGER) 794 bool QWidgetBackingStore::hasDirtyWindowDecoration()
const 797 if (tlwExtra && tlwExtra->qwsManager)
798 return !tlwExtra->qwsManager->d_func()->dirtyRegions.isEmpty();
802 void QWidgetBackingStore::paintWindowDecoration()
804 if (!hasDirtyWindowDecoration())
807 QDecoration &decoration = QApplication::qwsDecoration();
812 const bool doClipping = !managerPrivate->entireDecorationNeedsRepaint
813 && !managerPrivate->dirtyClip.isEmpty();
817 decorationRegion &= managerPrivate->dirtyClip;
820 if (decorationRegion.
isEmpty())
839 const int numDirty = managerPrivate->dirtyRegions.size();
840 for (
int i = 0; i < numDirty; ++i) {
841 const int area = managerPrivate->dirtyRegions.at(i);
847 painter.setClipRegion(clipRegion);
848 decoration.
paint(&painter,
tlw, area, managerPrivate->dirtyStates.at(i));
855 managerPrivate->clearDirtyRegions();
866 for (
int i = 0; i < children.
size(); ++i) {
877 #ifdef Q_BACKINGSTORE_SUBSURFACES 878 QTLWExtra *extra = cur->d_func()->maybeTopData();
890 windowSurface = topLevel->d_func()->createDefaultWindowSurface();
894 #ifdef Q_BACKINGSTORE_SUBSURFACES 920 if (!q->isVisible() || (dx == 0 && dy == 0))
928 static int accelEnv = -1;
929 if (accelEnv == -1) {
944 if (destRect.isValid())
946 const QRect sourceRect(destRect.translated(-dx, -dy));
947 const QRect parentRect(rect & clipR);
949 bool accelerateMove = accelEnv && isOpaque
950 #ifndef QT_NO_GRAPHICSVIEW 952 && !tlw->d_func()->extra->proxyWidget
954 && !isOverlapped(sourceRect) && !isOverlapped(destRect);
956 if (!accelerateMove) {
957 QRegion parentR(effectiveRectFor(parentRect));
958 if (!extra || !extra->hasMask) {
962 parentR += newRect & clipR;
965 invalidateBuffer((newRect & clipR).translated(-
data.crect.topLeft()));
969 QRegion childExpose(newRect & clipR);
971 if (sourceRect.isValid() && wbs->
bltRect(sourceRect, dx, dy, pw))
972 childExpose -= destRect;
977 const bool childUpdatesEnabled = q->updatesEnabled();
978 if (childUpdatesEnabled && !childExpose.
isEmpty()) {
984 QRegion parentExpose(parentRect);
985 parentExpose -= newRect;
986 if (extra && extra->hasMask)
994 if (childUpdatesEnabled) {
995 QRegion needsFlush(sourceRect);
996 needsFlush += destRect;
1015 static int accelEnv = -1;
1016 if (accelEnv == -1) {
1020 QRect scrollRect = rect & clipRect();
1021 bool overlapped =
false;
1022 bool accelerateScroll = accelEnv && isOpaque
1023 && !(overlapped = isOverlapped(scrollRect.
translated(
data.crect.topLeft())));
1025 #if defined(Q_WS_QWS) 1029 if (accelerateScroll && !surface->
isBuffered()) {
1034 if (clipped.
size() < 8) {
1035 for (
int i = 0; i < clipped.
size(); ++i)
1036 this->scrollRect(clipped.
at(i), dx, dy);
1039 accelerateScroll =
false;
1045 if (!accelerateScroll) {
1048 subtractOpaqueSiblings(region);
1049 invalidateBuffer(region);
1051 invalidateBuffer(scrollRect);
1059 scrollRect &= clipBoundingRect;
1064 QRegion childExpose(scrollRect);
1066 if (wbs->
bltRect(sourceRect, dx, dy, q))
1067 childExpose -= destRect;
1071 if (rect == q->rect()) {
1075 if (!dirtyScrollRegion.
isEmpty()) {
1076 dirty -= dirtyScrollRegion;
1078 dirty += dirtyScrollRegion;
1083 if (!q->updatesEnabled())
1100 if (!tlw || !tlwExtra)
1157 if (exposedWidget !=
tlw)
1187 bool repaintAllWidgets =
false;
1196 if ((
fullUpdatePending || inTopLevelResize || surfaceGeometry.size() != tlwRect.
size()) && !updatesDisabled) {
1199 const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());
1202 newVisible -= staticRegion;
1203 dirty += newVisible;
1211 repaintAllWidgets =
true;
1216 if (inTopLevelResize || surfaceGeometry.size() != tlwRect.
size())
1219 if (inTopLevelResize || surfaceGeometry != tlwRect)
1223 if (updatesDisabled)
1248 bool hasDirtySiblingsAbove =
false;
1263 toClean += widgetDirty;
1265 #ifndef QT_NO_GRAPHICSVIEW 1266 if (
tlw->d_func()->extra->proxyWidget) {
1273 opaqueNonOverlappedWidgets.
append(w);
1276 dirty += widgetDirty;
1291 #ifndef QT_NO_GRAPHICSVIEW 1292 if (
tlw->d_func()->extra->proxyWidget) {
1296 for (
int i = 0; i < rects.size(); ++i)
1297 tlw->d_func()->extra->proxyWidget->
update(rects.at(i));
1302 #ifndef Q_BACKINGSTORE_SUBSURFACES 1306 for (
int i = 0; i < opaqueNonOverlappedWidgets.
size(); ++i)
1320 for (
int i = 0; i < opaqueNonOverlappedWidgets.
size(); ++i) {
1321 QWidget *w = opaqueNonOverlappedWidgets[i];
1334 #ifdef Q_BACKINGSTORE_SUBSURFACES 1340 beginPaint(toBePainted, w, subSurface, &beginPaintInfo,
true);
1360 endPaint(toBePainted, subSurface, &beginPaintInfo);
1370 #ifndef Q_BACKINGSTORE_SUBSURFACES 1371 if (repaintAllWidgets || !dirtyCopy.
isEmpty()) {
1378 if (!repaintAllWidgets && dirtyCopy.
isEmpty())
1387 for (
int i = 0; i < surfaceList.
size(); ++i) {
1396 toClean = dirtyCopy;
1398 beginPaint(toClean, w, subSurface, &beginPaintInfo);
1415 endPaint(toClean, subSurface, &beginPaintInfo);
1427 #if defined(Q_WS_QWS) && !defined(QT_NO_QWS_MANAGER) 1428 paintWindowDecoration();
1477 const bool sizeDecreased = (
data.crect.width() < oldSize.
width())
1480 const QPoint offset(
data.crect.x() - oldPos.
x(),
data.crect.y() - oldPos.
y());
1481 const bool parentAreaExposed = !offset.
isNull() || sizeDecreased;
1482 const QRect newWidgetRect(q->rect());
1485 if (!staticContents || graphicsEffect) {
1488 if (offset.isNull() && (bs = maybeBackingStore()))
1490 const bool hasStaticChildren = !staticChildren.
isEmpty();
1492 if (hasStaticChildren) {
1494 dirty -= staticChildren;
1495 invalidateBuffer(dirty);
1498 invalidateBuffer(newWidgetRect);
1501 if (!parentAreaExposed)
1505 if (!graphicsEffect && extra && extra->hasMask) {
1506 QRegion parentExpose(extra->mask.translated(oldPos));
1507 parentExpose &=
QRect(oldPos, oldSize);
1508 if (hasStaticChildren)
1509 parentExpose -=
data.crect;
1510 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);
1512 if (hasStaticChildren && !graphicsEffect) {
1514 parentExpose -=
data.crect;
1515 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);
1517 q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(
QRect(oldPos, oldSize)));
1524 if (!offset.isNull()) {
1525 if (sizeDecreased) {
1528 moveRect(
QRect(oldPos, minSize), offset.
x(), offset.y());
1530 moveRect(
QRect(oldPos, oldSize), offset.
x(), offset.y());
1535 if (!sizeDecreased || !oldWidgetRect.contains(newWidgetRect)) {
1536 QRegion newVisible(newWidgetRect);
1537 newVisible -= oldWidgetRect;
1538 invalidateBuffer(newVisible);
1541 if (!parentAreaExposed)
1545 const QRect oldRect(oldPos, oldSize);
1546 if (extra && extra->hasMask) {
1547 QRegion parentExpose(oldRect);
1548 parentExpose &= extra->mask.
translated(oldPos);
1549 parentExpose -= (extra->mask.translated(
data.crect.topLeft()) &
data.crect);
1550 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);
1552 QRegion parentExpose(oldRect);
1553 parentExpose -=
data.crect;
1554 q->parentWidget()->d_func()->invalidateBuffer(parentExpose);
1569 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData();
1575 if (!graphicsEffect && extra && extra->hasMask)
1576 wrgn &= extra->mask;
1594 QTLWExtra *tlwExtra = q->window()->d_func()->maybeTopData();
1599 wRect &= clipRect();
1603 if (graphicsEffect || !extra || !extra->hasMask) {
1618 if (
data.in_destructor)
1625 extra->staticContentsSize =
data.crect.size();
1628 #ifdef Q_WS_QPA //Don't even call q->p 1638 && (usesDoubleBufferedGLContext || q->autoFillBackground());
1639 QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);
1643 update_sys(toBePainted);
1647 toBePainted &= clipRect();
1648 clipToEffectiveMask(toBePainted);
1649 if (toBePainted.isEmpty())
1652 #ifndef QT_NO_PAINT_DEBUG 1658 #ifndef QT_NO_PAINT_DEBUG 1664 qWarning(
"QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
T qobject_cast(QObject *object)
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
QRect geometry() const
Returns the currently allocated area on the screen.
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
virtual bool paint(QPainter *p, const QWidget *w, int decorationRegion=All, DecorationState state=Normal)=0
Implement this function to paint the border and title decoration for the specified top level widget u...
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
QRegion intersected(const QRegion &r) const
Returns a region which is the intersection of this region and r.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
const QRegion clipRegion() const
Returns the region currently visible on the screen.
QPointer< QWidget > widget
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
QRegion qt_dirtyRegion(QWidget *)
int left() const
Returns the x-coordinate of the rectangle's left edge.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
int width() const
Returns the width of the rectangle.
void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)
Flushes the given region from the specified widget onto the screen.
int count(const T &t) const
Returns the number of occurrences of value in the list.
static void qt_flush(QWidget *widget, const QRegion ®ion, QWindowSurface *windowSurface, QWidget *tlw, const QPoint &tlwOffset)
QRect intersected(const QRect &other) const
Returns the intersection of this rectangle and the given rectangle.
QRect boundingRect() const
Returns the bounding rectangle of this region.
bool isBuffered() const
Returns true if the QWSWindowSurface::Buffered is set; otherwise returns false.
qreal x() const
Returns the x coordinate of this point.
int height() const
Returns the height of the rectangle.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
virtual QRegion region(const QWidget *w, const QRect &rect, int decorationRegion=All)=0
Implement this function to return the region specified by decorationRegion for the given top level wi...
virtual void beginPaint(const QRegion &)
This function is called before painting onto the surface begins, with the region in which the paintin...
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
int restart()
Sets this time to the current time and returns the number of milliseconds that have elapsed since the...
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
virtual void releaseSurface()
static QFont font()
Returns the default application font.
The QDecoration class is a base class for window decorations in Qt for Embedded Linux.
int width() const
Returns the width.
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
uint windowSurfaceRecreated
virtual void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)=0
Flushes the given region from the specified widget onto the screen.
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
void prepend(const T &t)
Inserts value at the beginning of the list.
QSize size() const
Returns the size of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
virtual Type type() const =0
Reimplement this function to return the paint engine Type.
bool isNull() const
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
static void showYellowThing_win(QWidget *widget, const QRegion ®ion, int msec)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
The QRegion class specifies a clip region for a painter.
static bool discardInvalidateBufferRequest(QWidget *widget, QTLWExtra *tlwExtra)
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
void setSystemClip(const QRegion &baseClip)
Sets the system clip for this engine.
The QWindowSurface class provides the drawing area for top-level windows.
const T & at(int i) const
Returns the item at index position i in the vector.
virtual bool isValid() const =0
Implement this function to return true if the surface is a valid surface for the given top-level wind...
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
int elapsed() const
Returns the number of milliseconds that have elapsed since the last time start() or restart() was cal...
static bool qRectIntersects(const QRect &r1, const QRect &r2)
virtual QPaintEngine * paintEngine() const =0
int top() const
Returns the y-coordinate of the rectangle's top edge.
virtual QPoint painterOffset() const
Returns the offset to be used when painting.
void setStaticContents(const QRegion ®ion)
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
static bool closingDown()
Returns true if the application objects are being destroyed; otherwise returns false.
int right() const
Returns the x-coordinate of the rectangle's right edge.
virtual void endPaint(const QRegion &)
This function is called after painting onto the surface has ended, with the region in which the paint...
static QTime currentTime()
Returns the current time as reported by the system clock.
static void syncX()
Synchronizes with the X server in the X11 implementation.
int x() const
Returns the x-coordinate of the rectangle's left edge.
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...
Q_GUI_EXPORT bool qt_region_strictContains(const QRegion ®ion, const QRect &rect)
Returns true if rect is guaranteed to be fully contained in region.
The QPoint class defines a point in the plane using integer precision.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
int size() const
Returns the number of items in the list.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
static bool discardSyncRequest(QWidget *tlw, QTLWExtra *tlwExtra)
const QObjectList & children() const
Returns a list of child objects.
int y() const
Returns the y coordinate of this point.
bool hasFeature(WindowSurfaceFeature feature) const
bool intersects(const QRegion &r) const
Returns true if this region intersects with region, otherwise returns false.
void translate(int dx, int dy)
Translates (moves) the region dx along the X axis and dy along the Y axis.
The QSize class defines the size of a two-dimensional object using integer point precision.
void setFont(const QFont &f)
Sets the painter's font to the given font.
QRegion translated(int dx, int dy) const
Returns a copy of the region that is translated dx along the x axis and dy along the y axis...
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
static void flushUpdate(QWidget *widget, const QRegion ®ion, const QPoint &offset)
int x() const
Returns the x coordinate of this point.
bool isEmpty() const
Returns true if either of the width and height is less than or equal to 0; otherwise returns false...
static void sendUpdateRequest(QWidget *widget, bool updateImmediately)
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
The QEvent class is the base class of all event classes.
QRegion systemClip() const
Returns the system clip.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
int size() const
Returns the number of items in the vector.
virtual bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative...
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
virtual QPaintDevice * paintDevice()=0
Implement this function to return the appropriate paint device.
The QList class is a template class that provides lists.
static int area(const QSize &s)
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.