]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/CookiesDialog.h
Rename Local Storage to DOM Storage. https://redmine.stoutner.com/issues/852
[PrivacyBrowserPC.git] / src / dialogs / CookiesDialog.h
index 17498ca0f5b38fc1bce087b561547d1c2177882c..f34beca66ad7b95153b93030472a7649f6069e69 100644 (file)
 
 // Qt toolkit headers.
 #include <QDialog>
+#include <QItemSelectionModel>
 #include <QNetworkCookie>
-#include <QVBoxLayout>
+#include <QStandardItemModel>
+#include <QTreeView>
+
+// C++ headers.
+#include <list>
 
 class CookiesDialog : public QDialog
 {
@@ -31,23 +36,37 @@ class CookiesDialog : public QDialog
     Q_OBJECT
 
 public:
-    // The default constructor.
-    explicit CookiesDialog(QList<QNetworkCookie> *cookieListPointer);
+    // The primary constructor.
+    explicit CookiesDialog(std::list<QNetworkCookie> *cookieListPointer);
 
 signals:
+    // The signals.
+    void addCookie(const QNetworkCookie &cookie) const;
     void deleteAllCookies() const;
+    void deleteCookie(const QNetworkCookie &cookie) const;
 
 private Q_SLOTS:
     // The private slots.
+    void addCookieFromDialog(const QNetworkCookie &cookie) const;
+    void deleteCookieFromDialog(const QNetworkCookie &cookie) const;
+    void showAddCookieDialog() const;
     void showDeleteAllMessageBox() const;
+    void showDeleteCookieMessageBox() const;
+    void showEditCookieDialog() const;
+    void updateUi() const;
 
 private:
     // The private variables.
-    QList<QNetworkCookie> *cookieListPointer;
-    QVBoxLayout *cookiesVBoxLayoutPointer;
+    QItemSelectionModel *treeViewSelectionModelPointer;
+    QPushButton *addCookieButtonPointer;
+    std::list<QNetworkCookie> *cookieListPointer;
     QPushButton *deleteAllButtonPointer;
+    QPushButton *deleteCookieButtonPointer;
+    QPushButton *editCookieButtonPointer;
+    QStandardItemModel *standardItemModelPointer;
+    QTreeView *treeViewPointer;
 
     // The private functions.
-    void updateUi() const;
+    void deleteCookie(const QModelIndex &modelIndex) const;
 };
 #endif