~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/scriptengines/webkit/webapplet.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 2007 Zack Rusin <zack@kde.org>
 
3
 
 
4
Permission is hereby granted, free of charge, to any person obtaining a copy
 
5
of this software and associated documentation files (the "Software"), to deal
 
6
in the Software without restriction, including without limitation the rights
 
7
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
8
copies of the Software, and to permit persons to whom the Software is
 
9
furnished to do so, subject to the following conditions:
 
10
 
 
11
The above copyright notice and this permission notice shall be included in
 
12
all copies or substantial portions of the Software.
 
13
 
 
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
17
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
18
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
20
THE SOFTWARE.
 
21
 */
 
22
#ifndef WEBAPPLET_H
 
23
#define WEBAPPLET_H
 
24
 
 
25
#include <QUrl>
 
26
 
 
27
#include <Plasma/DataEngine>
 
28
#include <Plasma/AppletScript>
 
29
 
 
30
class QWebFrame;
 
31
class QWebPage;
 
32
 
 
33
namespace Plasma
 
34
{
 
35
    class WebView;
 
36
} // namespace Plasma
 
37
 
 
38
class WebApplet : public Plasma::AppletScript
 
39
{
 
40
    Q_OBJECT
 
41
public:
 
42
    WebApplet(QObject *parent, const QVariantList &args);
 
43
    ~WebApplet();
 
44
 
 
45
    bool init();
 
46
 
 
47
protected:
 
48
    Plasma::WebView *view() const;
 
49
    void paintInterface(QPainter *painter,
 
50
                                const QStyleOptionGraphicsItem *option,
 
51
                                const QRect &contentsRect);
 
52
    virtual QByteArray dataFor(const QString &str);
 
53
    QWebPage *page();
 
54
    bool loaded();
 
55
 
 
56
protected slots:
 
57
    void connectFrame(QWebFrame *);
 
58
    virtual void loadFinished(bool);
 
59
    virtual void initJsObjects();
 
60
 
 
61
private:
 
62
    class Private;
 
63
    Private *const d;
 
64
};
 
65
 
 
66
#endif