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

KDEWebKit

kwebpage.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the KDE project.
00003  *
00004  * Copyright (C) 2008 Dirk Mueller <mueller@kde.org>
00005  * Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org>
00006  * Copyright (C) 2008 Michael Howell <mhowell123@gmail.com>
00007  * Copyright (C) 2009,2010 Dawit Alemayehu <adawit @ kde.org>
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Library General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Library General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Library General Public License
00020  * along with this library; see the file COPYING.LIB.  If not, write to
00021  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00022  * Boston, MA 02110-1301, USA.
00023  *
00024  */
00025 #ifndef KWEBPAGE_H
00026 #define KWEBPAGE_H
00027 
00028 #include <kdewebkit_export.h>
00029 
00030 #include <QtWebKit/QWebPage>
00031 
00032 class KWebWallet;
00033 class KUrl;
00034 class KJob;
00035 
00070 class KDEWEBKIT_EXPORT KWebPage : public QWebPage
00071 {
00072     Q_OBJECT
00073     Q_FLAGS (Integration)
00074 
00075 public:
00079     enum IntegrationFlags
00080     {
00085         NoIntegration = 0x01,
00091         KIOIntegration = 0x02,
00096         KPartsIntegration = 0x04,
00103         KWalletIntegration = 0x08
00104     };
00105     Q_DECLARE_FLAGS(Integration, IntegrationFlags)
00106 
00107     
00119     explicit KWebPage(QObject *parent = 0, Integration flags = Integration());
00120 
00124     ~KWebPage();
00125 
00139     bool isExternalContentAllowed() const;
00140 
00151     KWebWallet *wallet() const;
00152 
00164     void setAllowExternalContent(bool allow);
00165 
00179     void setWallet(KWebWallet* wallet);
00180 
00181 public Q_SLOTS:
00188     virtual void downloadRequest(const QNetworkRequest &request);
00189 
00196     virtual void downloadUrl(const KUrl &url);
00197 
00206     void downloadResponse(QNetworkReply *reply);
00207 
00208 protected:
00223     QString sessionMetaData(const QString &key) const;
00224 
00239     QString requestMetaData(const QString &key) const;
00240 
00254     void setSessionMetaData(const QString &key, const QString &value);
00255 
00270     void setRequestMetaData(const QString &key, const QString &value);
00271 
00282     void removeSessionMetaData(const QString &key);
00283 
00294     void removeRequestMetaData(const QString &key);
00295 
00309     virtual QString userAgentForUrl(const QUrl& url) const;
00310 
00326     virtual bool acceptNavigationRequest(QWebFrame * frame, const QNetworkRequest & request, NavigationType type);
00327 
00328 private:
00329     class KWebPagePrivate;
00330     KWebPagePrivate* const d;
00331     Q_PRIVATE_SLOT(d, void _k_copyResultToTempFile(KJob *))
00332 };
00333 
00334 Q_DECLARE_OPERATORS_FOR_FLAGS(KWebPage::Integration)
00335 
00336 #endif // KWEBPAGE_H

KDEWebKit

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal