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

KDEWebKit

  • 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
32class KWebWallet;
33class KUrl;
34class KJob;
35
36namespace KIO {
37 class MetaData;
38 class Job;
39}
40
75class KDEWEBKIT_EXPORT KWebPage : public QWebPage
76{
77 Q_OBJECT
78 Q_FLAGS (Integration)
79
80public:
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
186public Q_SLOTS:
193 virtual void downloadRequest(const QNetworkRequest &request);
194
201 virtual void downloadUrl(const KUrl &url);
202
220 void downloadResponse(QNetworkReply *reply);
221
222protected:
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
358private:
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
366Q_DECLARE_OPERATORS_FOR_FLAGS(KWebPage::Integration)
367
368#endif // KWEBPAGE_H
KIO::Job
KIO::MetaData
KJob
KUrl
KWebPage
An enhanced QWebPage that provides integration into the KDE environment.
Definition: kwebpage.h:76
KWebPage::IntegrationFlags
IntegrationFlags
Flags for setting the desired level of integration.
Definition: kwebpage.h:85
KWebWallet
A class that provides KDE wallet integration for QWebFrame.
Definition: kwebwallet.h:65
QNetworkReply
QObject
QUrl
QWebPage
kdewebkit_export.h
KIO
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

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