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

« back to all changes in this revision

Viewing changes to plasma/generic/scriptengines/webkit/webpage.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 WEBPAGE_H
 
23
#define WEBPAGE_H
 
24
 
 
25
#include <QObject>
 
26
#include <QtWebKit/QWebPage>
 
27
 
 
28
namespace Plasma
 
29
{
 
30
 
 
31
class WebPage : public QWebPage
 
32
{
 
33
    Q_OBJECT
 
34
public:
 
35
    WebPage(QObject *parent=0);
 
36
 
 
37
    QWebPage *createWindow(QWebPage::WebWindowType);
 
38
 
 
39
    void javaScriptAlert(QWebFrame *frame, const QString& message);
 
40
    void javaScriptConsoleMessage(const QString& message, int lineNumber,
 
41
                                  const QString& sourceID);
 
42
    bool javaScriptConfirm(QWebFrame *frame, const QString& msg);
 
43
    bool javaScriptPrompt(QWebFrame *frame, const QString& msg,
 
44
                          const QString& defaultValue, QString* result);
 
45
};
 
46
 
 
47
} // namespace Plasma
 
48
 
 
49
#endif