• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 API Reference
  • 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 
00036 namespace KIO {
00037     class MetaData;
00038 }
00039 
00074 class KDEWEBKIT_EXPORT KWebPage : public QWebPage
00075 {
00076     Q_OBJECT
00077     Q_FLAGS (Integration)
00078 
00079 public:
00083     enum IntegrationFlags
00084     {
00089         NoIntegration = 0x01,
00095         KIOIntegration = 0x02,
00100         KPartsIntegration = 0x04,
00107         KWalletIntegration = 0x08
00108     };
00109     Q_DECLARE_FLAGS(Integration, IntegrationFlags)
00110 
00111     
00123     explicit KWebPage(QObject *parent = 0, Integration flags = Integration());
00124 
00128     ~KWebPage();
00129 
00143     bool isExternalContentAllowed() const;
00144 
00155     KWebWallet *wallet() const;
00156 
00168     void setAllowExternalContent(bool allow);
00169 
00183     void setWallet(KWebWallet* wallet);
00184 
00185 public Q_SLOTS:
00192     virtual void downloadRequest(const QNetworkRequest &request);
00193 
00200     virtual void downloadUrl(const KUrl &url);
00201 
00219     void downloadResponse(QNetworkReply *reply);
00220 
00221 protected:
00236     QString sessionMetaData(const QString &key) const;
00237 
00252     QString requestMetaData(const QString &key) const;
00253 
00267     void setSessionMetaData(const QString &key, const QString &value);
00268 
00283     void setRequestMetaData(const QString &key, const QString &value);
00284 
00295     void removeSessionMetaData(const QString &key);
00296 
00307     void removeRequestMetaData(const QString &key);
00308 
00322     virtual QString userAgentForUrl(const QUrl& url) const;
00323 
00337     virtual bool acceptNavigationRequest(QWebFrame * frame, const QNetworkRequest & request, NavigationType type);
00338 
00355     bool handleReply (QNetworkReply* reply, QString* contentType = 0, KIO::MetaData* metaData = 0);
00356 
00357 private:
00358     class KWebPagePrivate;
00359     KWebPagePrivate* const d;
00360     Q_PRIVATE_SLOT(d, void _k_copyResultToTempFile(KJob *))
00361 };
00362 
00363 Q_DECLARE_OPERATORS_FOR_FLAGS(KWebPage::Integration)
00364 
00365 #endif // KWEBPAGE_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:58:22 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEWebKit

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

kdelibs-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 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
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