• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEWebKit

  • sources
  • kde-4.14
  • kdelibs
  • kdewebkit
kwebpage.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE project.
3  *
4  * Copyright (C) 2008 Dirk Mueller <mueller@kde.org>
5  * Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org>
6  * Copyright (C) 2008 Michael Howell <mhowell123@gmail.com>
7  * Copyright (C) 2009,2010 Dawit Alemayehu <adawit @ kde.org>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public License
20  * along with this library; see the file COPYING.LIB. If not, write to
21  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  */
25 #ifndef KWEBPAGE_H
26 #define KWEBPAGE_H
27 
28 #include <kdewebkit_export.h>
29 
30 #include <QtWebKit/QWebPage>
31 
32 class KWebWallet;
33 class KUrl;
34 class KJob;
35 
36 namespace KIO {
37  class MetaData;
38  class Job;
39 }
40 
75 class KDEWEBKIT_EXPORT KWebPage : public QWebPage
76 {
77  Q_OBJECT
78  Q_FLAGS (Integration)
79 
80 public:
84  enum IntegrationFlags
85  {
90  NoIntegration = 0x01,
96  KIOIntegration = 0x02,
101  KPartsIntegration = 0x04,
108  KWalletIntegration = 0x08
109  };
110  Q_DECLARE_FLAGS(Integration, IntegrationFlags)
111 
112 
124  explicit KWebPage(QObject *parent = 0, Integration flags = Integration());
125 
129  ~KWebPage();
130 
144  bool isExternalContentAllowed() const;
145 
156  KWebWallet *wallet() const;
157 
169  void setAllowExternalContent(bool allow);
170 
184  void setWallet(KWebWallet* wallet);
185 
186 public Q_SLOTS:
193  virtual void downloadRequest(const QNetworkRequest &request);
194 
201  virtual void downloadUrl(const KUrl &url);
202 
220  void downloadResponse(QNetworkReply *reply);
221 
222 protected:
237  QString sessionMetaData(const QString &key) const;
238 
253  QString requestMetaData(const QString &key) const;
254 
268  void setSessionMetaData(const QString &key, const QString &value);
269 
284  void setRequestMetaData(const QString &key, const QString &value);
285 
296  void removeSessionMetaData(const QString &key);
297 
308  void removeRequestMetaData(const QString &key);
309 
323  virtual QString userAgentForUrl(const QUrl& url) const;
324 
338  virtual bool acceptNavigationRequest(QWebFrame * frame, const QNetworkRequest & request, NavigationType type);
339 
356  bool handleReply (QNetworkReply* reply, QString* contentType = 0, KIO::MetaData* metaData = 0);
357 
358 private:
359  class KWebPagePrivate;
360  KWebPagePrivate* const d;
361  Q_PRIVATE_SLOT(d, void _k_copyResultToTempFile(KJob*))
362  Q_PRIVATE_SLOT(d, void _k_receivedContentType(KIO::Job*, const QString&))
363  Q_PRIVATE_SLOT(d, void _k_contentTypeCheckFailed(KJob*))
364 };
365 
366 Q_DECLARE_OPERATORS_FOR_FLAGS(KWebPage::Integration)
367 
368 #endif // KWEBPAGE_H
QWebFrame
QNetworkReply
KWebPage::IntegrationFlags
IntegrationFlags
Flags for setting the desired level of integration.
Definition: kwebpage.h:84
KUrl
QNetworkRequest
QObject
QWebPage
QString
QUrl
kdewebkit_export.h
KWebPage
An enhanced QWebPage that provides integration into the KDE environment.
Definition: kwebpage.h:75
KWebWallet
A class that provides KDE wallet integration for QWebFrame.
Definition: kwebwallet.h:64
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEWebKit

Skip menu "KDEWebKit"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal