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

KDEWebKit

  • kdewebkit
kwebwallet.h
Go to the documentation of this file.
1/*
2 * This file is part of the KDE project.
3 *
4 * Copyright (C) 2009 Dawit Alemayehu <adawit@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22#ifndef KWEBWALLET_H
23#define KWEBWALLET_H
24
25#include <kdewebkit_export.h>
26
27#include <kurl.h>
28
29#include <QtCore/QObject>
30#include <QtCore/QString>
31#include <QtCore/QList>
32#include <QtCore/QPair>
33#include <QtGui/QWidget>
34#include <QtCore/QtGlobal>
35
36class QWebFrame;
37class QWebPage;
38
39
64class KDEWEBKIT_EXPORT KWebWallet : public QObject
65{
66 Q_OBJECT
67
68public:
69
73 struct WebForm
74 {
79 typedef QPair<QString, QString> WebField;
80
82 QUrl url;
84 QString name;
86 QString index;
88 QList<WebField> fields;
89 };
90
94 typedef QList<WebForm> WebFormList;
95
108 explicit KWebWallet(QObject* parent = 0, WId wid = 0);
109
113 virtual ~KWebWallet();
114
131 WebFormList formsWithCachedData(QWebFrame* frame, bool recursive = true) const;
132
145 void saveFormData(QWebFrame *frame, bool recursive = true, bool ignorePasswordFields = false);
146
154 void fillFormData(QWebFrame *frame, bool recursive = true);
155
168 void removeFormData (QWebFrame *frame, bool recursive);
169
178 void removeFormData(const WebFormList &forms);
179
180public Q_SLOTS:
193 void acceptSaveFormDataRequest(const QString &key);
194
203 void rejectSaveFormDataRequest(const QString &key);
204
205Q_SIGNALS:
219 void saveFormDataRequested(const QString &key, const QUrl &url);
220
229 void saveFormDataCompleted(const QUrl &url, bool ok);
230
240 void fillFormRequestCompleted(bool ok);
241
245 void walletClosed();
246
247protected:
254 WebFormList formsToFill(const KUrl &url) const;
255
262 WebFormList formsToSave(const QString &key) const;
263
267 WebFormList formsToDelete() const;
268
273 virtual bool hasCachedFormData(const WebForm &form) const;
274
280 void fillWebForm(const KUrl &url, const WebFormList &forms);
281
292 virtual void fillFormDataFromCache(const KUrl::List &list);
293
302 virtual void saveFormDataToCache(const QString &key);
303
312 virtual void removeFormDataFromCache(const WebFormList &forms);
313
314private:
315 class KWebWalletPrivate;
316 friend class KWebWalletPrivate;
317 KWebWalletPrivate * const d;
318
319 Q_PRIVATE_SLOT(d, void _k_openWalletDone(bool))
320 Q_PRIVATE_SLOT(d, void _k_walletClosed())
321};
322
323#endif // KWEBWALLET_H
KUrl::List
KUrl
KWebWallet
A class that provides KDE wallet integration for QWebFrame.
Definition: kwebwallet.h:65
KWebWallet::fillFormRequestCompleted
void fillFormRequestCompleted(bool ok)
This signal is emitted whenever a fill form data request is completed.
KWebWallet::saveFormDataCompleted
void saveFormDataCompleted(const QUrl &url, bool ok)
This signal is emitted whenever a save form data request is completed.
KWebWallet::walletClosed
void walletClosed()
This signal is emitted whenever the current wallet is closed.
KWebWallet::formsToDelete
WebFormList formsToDelete() const
Returns forms to be removed from persistent storage.
KWebWallet::WebFormList
QList< WebForm > WebFormList
A list of web forms.
Definition: kwebwallet.h:94
KWebWallet::saveFormDataRequested
void saveFormDataRequested(const QString &key, const QUrl &url)
This signal is emitted whenever a save form data request is received.
QList
QObject
QPair
QUrl
QWebPage
kdewebkit_export.h
kurl.h
KWebWallet::WebForm
Holds data from a HTML <form> element.
Definition: kwebwallet.h:74
KWebWallet::WebForm::WebField
QPair< QString, QString > WebField
A typedef for storing the name and value attributes of HTML <input> elements.
Definition: kwebwallet.h:79
KWebWallet::WebForm::name
QString name
The name attribute of the form.
Definition: kwebwallet.h:84
KWebWallet::WebForm::index
QString index
The position of the form on the web page, relative to other forms.
Definition: kwebwallet.h:86
KWebWallet::WebForm::url
QUrl url
The URL the form was found at.
Definition: kwebwallet.h:82
KWebWallet::WebForm::fields
QList< WebField > fields
The name and value attributes of each input element in the form.
Definition: kwebwallet.h:88
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