add more spacing
[personal-kdebase.git] / apps / konqueror / settings / kio / kcookiespolicies.h
blob4d8c5bb4b929d3a5d7509b45b56484cced651751
1 /**
2 * kcookiespolicies.h - Cookies configuration
4 * Original Authors
5 * Copyright (c) Waldo Bastian <bastian@kde.org>
6 * Copyright (c) 1999 David Faure <faure@kde.org>
8 * Re-written by:
9 * Copyright (c) 2000- Dawit Alemayehu <adawit@kde.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #ifndef KCOOKIESPOLICIES_H
27 #define KCOOKIESPOLICIES_H
29 #include <QtCore/QMap>
30 #include <kcmodule.h>
32 #include "policydlg.h"
33 #include "ui_kcookiespoliciesdlg.h"
35 class QTreeWidgetItem;
37 class KCookiesPolicyDlgUI : public QWidget, public Ui::KCookiesPolicyDlgUI
39 public:
40 KCookiesPolicyDlgUI( QWidget *parent ) : QWidget( parent ) {
41 setupUi( this );
46 class KCookiesPolicies : public KCModule
48 Q_OBJECT
50 public:
51 KCookiesPolicies(const KComponentData &componentData, QWidget *parent);
52 ~KCookiesPolicies();
54 virtual void load();
55 virtual void save();
56 virtual void defaults();
57 virtual QString quickHelp() const;
59 void addNewPolicy(const QString& domain);
61 protected Q_SLOTS:
62 void autoAcceptSessionCookies ( bool );
63 void ignoreCookieExpirationDate ( bool );
64 void cookiesEnabled( bool );
65 void configChanged();
67 void selectionChanged();
68 void updateButtons();
70 void deleteAllPressed();
71 void deletePressed();
72 void changePressed();
73 void addPressed();
75 private:
76 void updateDomainList(const QStringList& list);
77 bool handleDuplicate( const QString& domain, int );
78 void splitDomainAdvice (const QString& configStr, QString &domain,
79 KCookieAdvice::Value &advice);
81 private:
82 int d_itemsSelected;
83 KCookiesPolicyDlgUI* dlg;
84 QMap<QTreeWidgetItem*, const char*> m_pDomainPolicy;
87 #endif // KCOOKIESPOLICIES_H