diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-02-08 16:08:01 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-02-11 17:28:47 (GMT) |
commit | 2f389a95f5b9e4c7130aa333586d803b639bf259 (patch) | |
tree | b74584ba8fba1a5e0878f74db5bbb14c098f9bf9 /tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h | |
parent | 5906f4dc55e52b233200f7196f4ce7094f764f6a (diff) | |
download | Qt-2f389a95f5b9e4c7130aa333586d803b639bf259.zip Qt-2f389a95f5b9e4c7130aa333586d803b639bf259.tar.gz Qt-2f389a95f5b9e4c7130aa333586d803b639bf259.tar.bz2 |
Add functional Graphics View benchmarks.
Widgets and use cases are externally developed and imported from:
git://gitorious.org/+qt-performance-test-developers/qt/qt-performance-test-developers-clone.git
(master branch, tests/benchmarks/uimodels/GraphicsViewBenchmark)
I couldn't simply import everything because the benchmarks were heavily
dependent on an internal measuring tool involving QtScripts and whatnot,
not suitable for inclusion in the Qt repository. Everything is now converted
into proper QTestLib compatible benchmark functions.
Diffstat (limited to 'tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h')
-rw-r--r-- | tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h new file mode 100644 index 0000000..73d5464 --- /dev/null +++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h @@ -0,0 +1,40 @@ +#ifndef WEBVIEW_H +#define WEBVIEW_H + +#include "scrollbar.h" +#include "abstractscrollarea.h" + +class WebViewPrivate; + +class WebView : public AbstractScrollArea +{ + Q_OBJECT + +public: + + WebView(QGraphicsWidget *parent = 0); + ~WebView(); + +public: + + void setUrl(const QUrl& url); + +private: + + void scrollContentsBy(qreal dx, qreal dy); + void resizeEvent(QGraphicsSceneResizeEvent *event); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint) const; + +private: + + Q_PRIVATE_SLOT(d, void _q_loadStarted()) + Q_PRIVATE_SLOT(d, void _q_loadProgress(int)) + Q_PRIVATE_SLOT(d, void _q_loadFinished(bool)) + Q_PRIVATE_SLOT(d, void _q_viewportChanged(QGraphicsWidget*)) + Q_PRIVATE_SLOT(d, void _q_motionEnded()) + + WebViewPrivate *d; + friend class WebViewPrivate; +}; + +#endif // WEBVIEW_H |