ginebra2/ContentViews/GWebContentViewWidget.h
changeset 6 1c3b8676e58c
parent 5 0f2326c2a325
equal deleted inserted replaced
5:0f2326c2a325 6:1c3b8676e58c
   107 
   107 
   108     ZoomMetaData pageZoomMetaData();
   108     ZoomMetaData pageZoomMetaData();
   109     void setPageZoomMetaData(ZoomMetaData params);
   109     void setPageZoomMetaData(ZoomMetaData params);
   110     ZoomMetaData defaultZoomData();
   110     ZoomMetaData defaultZoomData();
   111     void setCheckeredPixmap();
   111     void setCheckeredPixmap();
       
   112 
       
   113     void onLoadStarted();
       
   114     void onLoadFinished();
       
   115 
       
   116     /*!
       
   117      * \brief Freeze the on-screen state of the window.
       
   118      * Takes a snapshot of the window in its current state.  The paint() method will then use
       
   119      * this snapshot for all further paints, until unfreeze() is called.  Freeze() increments
       
   120      * a counter and unfreeze() decrements the counter so that nested calls to them are handled
       
   121      * correctly.
       
   122      * \sa unfreeze
       
   123      */
       
   124     void freeze();
       
   125 
       
   126     /*!
       
   127      * \brief Unfreeze the on-screen state of the window.
       
   128      * \sa freeze
       
   129      */
       
   130     void unfreeze();
       
   131 
       
   132     /*!
       
   133      * \brief Returns true if the window is currently frozen.
       
   134      * \sa freeze
       
   135      * \sa unfreeze
       
   136      */
       
   137     bool frozen() const { return m_frozenCount > 0; }
       
   138 
   112 public slots:
   139 public slots:
   113     void setViewportSize();
   140     void setViewportSize();
   114 
   141 
   115     void onInitLayout();
   142     void onInitLayout();
       
   143     void onLongPressEvent(QPoint pos);
   116 
   144 
   117 signals:
   145 signals:
   118     void contextEvent(::WebViewEventContext *context);
   146     void contextEvent(::WebViewEventContext *context);
   119     void BlockFocusChanged(QPoint element);
   147     void BlockFocusChanged(QPoint element);
   120 
   148 
   121     void pageZoomMetaDataChange(QWebFrame* frame, ZoomMetaData data);protected:
   149     void pageZoomMetaDataChange(QWebFrame* frame, ZoomMetaData data);protected:
   122     void paintEvent(QPaintEvent *event);
   150     void paintEvent(QPaintEvent *event);
       
   151     void longPressEvent(::WebViewEventContext *context);
   123 
   152 
   124 public:
   153 private slots:
   125     void onLoadStarted();
   154     /*!
   126     void onLoadFinished();
   155      * \brief Update the "frozen" image of this window.
   127 
   156      */
   128     bool frozen() const { return m_frozenCount > 0; }
   157     void updateFrozenImage();
   129     void freeze();
       
   130     void unfreeze();
       
   131 
   158 
   132 private:
   159 private:
   133     void updateViewportSize(QGraphicsSceneResizeEvent *e);
   160     void updateViewportSize(QGraphicsSceneResizeEvent *e);
   134     virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
   161     virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
   135     void updateFrozenImage();
       
   136 
   162 
   137     GVA::GWebContentView* m_webContentView;
   163     GVA::GWebContentView* m_webContentView;
   138     qreal       m_dirtyZoomFactor;
   164     qreal       m_dirtyZoomFactor;
   139     QPixmap     *m_frozenPixmap;
   165     QPixmap     *m_frozenPixmap;
   140     int         m_frozenCount;
   166     int         m_frozenCount;