ask for a repaint of the area that is scrolled

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=851011
This commit is contained in:
Marco Martin 2008-08-22 18:38:50 +00:00
parent 8d6f5e7196
commit 0d8fbe145b
2 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,7 @@ public:
void loadingFinished(bool success);
void updateRequested(const QRect& dirtyRect);
void scrollRequested(int dx, int dy, const QRect &scrollRect);
WebContent *q;
QWebPage *page;
@ -113,6 +114,7 @@ void WebContent::setPage(QWebPage *page)
connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int)));
connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(loadingFinished(bool)));
connect(d->page, SIGNAL(repaintRequested(const QRect&)), this, SLOT(updateRequested(const QRect&)));
connect(d->page, SIGNAL(scrollRequested(int, int, const QRect &)), this, SLOT(scrollRequested(int, int, const QRect &)));
}
}
@ -361,6 +363,11 @@ void WebContentPrivate::updateRequested(const QRect& dirtyRect)
}
}
void WebContentPrivate::scrollRequested(int dx, int dy, const QRect &scrollRect)
{
updateRequested(scrollRect);
}
} // namespace Plasma
#include "webcontent.moc"

View File

@ -140,6 +140,7 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
private:
Q_PRIVATE_SLOT(d, void loadingFinished(bool success))
Q_PRIVATE_SLOT(d, void updateRequested(const QRect& dirtyRect))
Q_PRIVATE_SLOT(d, void scrollRequested(int dx, int dy, const QRect &scrollRect))
WebContentPrivate * const d;
friend class WebContentPrivate;