ginebra2/ContentViews/GWebContentViewWidget.h
changeset 16 3c88a81ff781
parent 3 0954f5dd2cd0
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
    26 #include <QWebElement>
    26 #include <QWebElement>
    27 #include <QImage>
    27 #include <QImage>
    28 #include <QGraphicsWebView>
    28 #include <QGraphicsWebView>
    29 #include <QWebFrame>
    29 #include <QWebFrame>
    30 #include <QTime>
    30 #include <QTime>
       
    31 #include "webpagedata.h"
    31 
    32 
    32 #include "WebViewEventContext.h"
    33 #include "WebViewEventContext.h"
    33 #include "ZoomMetaData.h"
       
    34 
    34 
    35 class QGraphicsSceneContextMenuEvent;
    35 class QGraphicsSceneContextMenuEvent;
    36 
    36 
    37 namespace GVA {
    37 namespace GVA {
    38 #ifndef NO_QSTM_GESTURE
       
    39 class WebTouchNavigation;
       
    40 #endif
       
    41 
       
    42 class GWebContentView;
    38 class GWebContentView;
    43 
    39 
    44 class GWebContentViewWidget : public QGraphicsWebView
    40 class GWebContentViewWidget : public QGraphicsWebView
    45 {
    41 {
    46     Q_OBJECT
    42     Q_OBJECT
   103     QPointF mapFromGlobal(const QPointF& p);
    99     QPointF mapFromGlobal(const QPointF& p);
   104 
   100 
   105     void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) ;
   101     void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) ;
   106     void setPageZoomFactor(qreal zoom);
   102     void setPageZoomFactor(qreal zoom);
   107 
   103 
   108     ZoomMetaData pageZoomMetaData();
   104     WebPageData pageZoomMetaData();
   109     void setPageZoomMetaData(ZoomMetaData params);
   105     void setPageZoomMetaData(const WebPageData& params);
   110     ZoomMetaData defaultZoomData();
   106     const WebPageData& defaultZoomData();
   111     void setCheckeredPixmap();
   107     void setCheckeredPixmap();
   112 
   108 
   113     void onLoadStarted();
   109     void onLoadStarted();
   114     void onLoadFinished();
   110     void onLoadFinished();
   115 
   111 
   144 
   140 
   145 signals:
   141 signals:
   146     void contextEvent(::WebViewEventContext *context);
   142     void contextEvent(::WebViewEventContext *context);
   147     void BlockFocusChanged(QPoint element);
   143     void BlockFocusChanged(QPoint element);
   148 
   144 
   149     void pageZoomMetaDataChange(QWebFrame* frame, ZoomMetaData data);protected:
   145 //    void pageZoomMetaDataChange(QWebFrame* frame, WebPageData data);
       
   146 
       
   147 protected:
   150     void paintEvent(QPaintEvent *event);
   148     void paintEvent(QPaintEvent *event);
   151     void longPressEvent(::WebViewEventContext *context);
   149     void longPressEvent(::WebViewEventContext *context);
   152 
   150 
   153 private slots:
   151 private slots:
   154     /*!
   152     /*!
   187     qreal       m_bitmapZoomFactor;
   185     qreal       m_bitmapZoomFactor;
   188     QPixmap*    m_checkeredBoxPixmap;
   186     QPixmap*    m_checkeredBoxPixmap;
   189 
   187 
   190     bool        m_inLoading;
   188     bool        m_inLoading;
   191     QTime       m_loadingTime;
   189     QTime       m_loadingTime;
   192 #ifndef NO_QSTM_GESTURE
       
   193     WebTouchNavigation* m_touchNavigation;
       
   194 #endif
       
   195 };
   190 };
   196 
   191 
   197 }
   192 }
   198 
   193 
   199 #endif /* GWebContentViewWidget_H_ */
   194 #endif /* GWebContentViewWidget_H_ */