summaryrefslogtreecommitdiff
path: root/src/cookiejar.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cookiejar.h')
-rw-r--r--src/cookiejar.h107
1 files changed, 4 insertions, 103 deletions
diff --git a/src/cookiejar.h b/src/cookiejar.h
index 03802df1..08c65218 100644
--- a/src/cookiejar.h
+++ b/src/cookiejar.h
@@ -25,14 +25,10 @@
// Qt Includes
-#include <QNetworkCookieJar>
-#include <QAbstractItemModel>
-#include <QStringList>
-#include <QTableView>
+#include <QtCore/QStringList>
+#include <QtNetwork/QNetworkCookieJar>
// Forward Declarations
-class QSortFilterProxyModel;
-class QKeyEvent;
class AutoSaver;
class QUrl;
@@ -41,11 +37,13 @@ class CookieJar : public QNetworkCookieJar
{
friend class CookieModel;
Q_OBJECT
+
Q_PROPERTY(AcceptPolicy acceptPolicy READ acceptPolicy WRITE setAcceptPolicy)
Q_PROPERTY(KeepPolicy keepPolicy READ keepPolicy WRITE setKeepPolicy)
Q_PROPERTY(QStringList blockedCookies READ blockedCookies WRITE setBlockedCookies)
Q_PROPERTY(QStringList allowedCookies READ allowedCookies WRITE setAllowedCookies)
Q_PROPERTY(QStringList allowForSessionCookies READ allowForSessionCookies WRITE setAllowForSessionCookies)
+
Q_ENUMS(KeepPolicy)
Q_ENUMS(AcceptPolicy)
@@ -96,9 +94,6 @@ private slots:
private:
void purgeOldCookies();
- void load();
- bool m_loaded;
- AutoSaver *m_saveTimer;
AcceptPolicy m_acceptCookies;
KeepPolicy m_keepCookies;
@@ -108,98 +103,4 @@ private:
QStringList m_exceptions_allowForSession;
};
-
-// -------------------------------------------------------------------------------------------------------------
-
-
-class CookieModel : public QAbstractTableModel
-{
- Q_OBJECT
-
-public:
- explicit CookieModel(CookieJar *jar, QObject *parent = 0);
-
- QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
-
-private slots:
- void cookiesChanged();
-
-private:
- CookieJar *m_cookieJar;
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-
-#include "ui_cookies.h"
-
-class CookiesDialog : public QDialog, public Ui_CookiesDialog
-{
- Q_OBJECT
-
-public:
- explicit CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0);
-
-private:
- QSortFilterProxyModel *m_proxyModel;
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-
-class CookieExceptionsModel : public QAbstractTableModel
-{
- Q_OBJECT
- friend class CookiesExceptionsDialog;
-
-public:
- explicit CookieExceptionsModel(CookieJar *cookieJar, QObject *parent = 0);
-
- QVariant headerData(int section, Qt::Orientation orientation, int role) const;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
-
-private:
- CookieJar *m_cookieJar;
-
- // Domains we allow, Domains we block, Domains we allow for this session
- QStringList m_allowedCookies;
- QStringList m_blockedCookies;
- QStringList m_sessionCookies;
-};
-
-
-// -----------------------------------------------------------------------------------------------------------------
-
-
-#include "ui_cookiesexceptions.h"
-
-class CookiesExceptionsDialog : public QDialog, public Ui_CookiesExceptionsDialog
-{
- Q_OBJECT
-
-public:
- explicit CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0);
-
-private slots:
- void block();
- void allow();
- void allowForSession();
- void textChanged(const QString &text);
-
-private:
- CookieExceptionsModel *m_exceptionsModel;
- QSortFilterProxyModel *m_proxyModel;
- CookieJar *m_cookieJar;
-};
-
#endif // COOKIEJAR_H
-