webwidget.h 784 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * Copyright (c) 2011 Nokia Corporation.
  3. */
  4. #ifndef WEBWIDGET_H
  5. #define WEBWIDGET_H
  6. // Qt includes
  7. #include <QGraphicsView>
  8. #include <QGraphicsWebView>
  9. #include <QUrl>
  10. #include <QWebPage>
  11. // Forward declarations
  12. class QResizeEvent;
  13. class QWebFrame;
  14. class WebWidget : public QGraphicsView
  15. {
  16. Q_OBJECT
  17. public:
  18. WebWidget();
  19. virtual ~WebWidget();
  20. public:
  21. void loadUrl(const QUrl &url);
  22. protected: // From QGraphicsView
  23. void resizeEvent(QResizeEvent *event);
  24. #if QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 1, 0)
  25. public slots:
  26. void handlePermissionRequest(QWebFrame *frame, QWebPage::Feature feature);
  27. #endif
  28. protected: // Data
  29. QGraphicsWebView m_webView;
  30. };
  31. #endif // WEBWIDGET_H
  32. // End of file.