ginebra2/PageSnippet.h
changeset 6 1c3b8676e58c
parent 5 0f2326c2a325
child 15 73c48011b8c7
equal deleted inserted replaced
5:0f2326c2a325 6:1c3b8676e58c
    47 class PageSnippet : public ChromeSnippet {
    47 class PageSnippet : public ChromeSnippet {
    48   Q_OBJECT
    48   Q_OBJECT
    49 public:
    49 public:
    50   PageSnippet(const QString & elementId, ChromeWidget * chrome,
    50   PageSnippet(const QString & elementId, ChromeWidget * chrome,
    51               QGraphicsWidget * widget, const QWebElement & element);
    51               QGraphicsWidget * widget, const QWebElement & element);
       
    52   ~PageSnippet();
       
    53 
       
    54   static PageSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
    52 
    55 
    53   // ChromeSnippet overrides:
    56   // ChromeSnippet overrides:
    54   virtual void setVisible(bool visiblity, bool animate = true);
    57   virtual void setVisible(bool visiblity, bool animate = true);
    55   virtual void setWidget(QGraphicsWidget * widget);
    58   virtual void setChromeWidget(QGraphicsWidget * widget);
    56 
    59 
    57   /// The URL of the web page.
    60   /// The URL of the web page.
    58   QString url() const;
    61   QString url() const;
    59   void setUrl(const QString &url);
    62   void setUrl(const QString &url);
    60   Q_PROPERTY(QString url READ url WRITE setUrl)
    63   Q_PROPERTY(QString url READ url WRITE setUrl)
    76   void instantiate();
    79   void instantiate();
    77 
    80 
    78   /// Destroys the web view, web page, etc. to free up memory.
    81   /// Destroys the web view, web page, etc. to free up memory.
    79   void cleanUp();
    82   void cleanUp();
    80 
    83 
    81 private slots:
       
    82   /// Called when the page has finished loading.
       
    83   void onLoadFinished(bool ok);
       
    84 
       
    85 private:
    84 private:
    86   PageItem *pageItem();
    85   PageItem *pageItem();
    87   PageItem const *constPageItem() const;
    86   PageItem const *constPageItem() const;
       
    87 
       
    88   ExternalEventCharm *m_externalEventCharm;
    88 };
    89 };
    89 
    90 
    90 }
    91 }
    91 
    92 
    92 #endif /* PAGESNIPPET_H_ */
    93 #endif /* PAGESNIPPET_H_ */