]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/BookmarksDialog.h
Add bookmark folders.
[PrivacyBrowserPC.git] / src / dialogs / BookmarksDialog.h
index e81d0b41cf008f38ce07e398a67eae0b69c5b2a9..78a48963da485afde9e6fc259e5cdccd50753e53 100644 (file)
@@ -36,13 +36,15 @@ class BookmarksDialog : public QDialog
 
 public:
     // The primary constructor.
-    explicit BookmarksDialog(QIcon currentWebsiteFavoriteIcon);
+    explicit BookmarksDialog(QString currentWebsiteTitle, QString currentWebsiteUrl, QIcon currentWebsiteFavoriteIcon);
 
     // The public constants.
-    static const int BOOKMARK_NAME_COLUMN = 0;
-    static const int BOOKMARK_URL_COLUMN = 1;
+    static const int NAME_COLUMN = 0;
+    static const int URL_COLUMN = 1;
     static const int DATABASE_ID_COLUMN = 2;
-    static const int DISPLAY_ORDER = 3;
+    static const int DISPLAY_ORDER_COLUMN = 3;
+    static const int IS_FOLDER_COLUMN = 4;
+    static const int FOLDER_ID_COLUMN = 5;
 
 signals:
     // The signals.
@@ -53,14 +55,12 @@ private Q_SLOTS:
     void deleteItems() const;
     void refreshBookmarks() const;
     void showAddBookmarkDialog() const;
+    void showAddFolderDialog() const;
     void showEditDialog();
     void updateBookmarkFromTree(QStandardItem *modifiedStandardItem);
-    void updateUi() const;
+    void updateSelection() const;
 
 private:
-    // The private functions.
-    void populateBookmarks() const;
-
     // The private variables.
     QPushButton *deleteItemsButtonPointer;
     QPushButton *editButtonPointer;
@@ -68,5 +68,13 @@ private:
     QItemSelectionModel *treeSelectionModelPointer;
     DraggableTreeView *draggableTreeViewPointer;
     QIcon websiteFavoriteIcon;
+    QString websiteTitle;
+    QString websiteUrl;
+
+    // The private functions.
+    void populateBookmarks() const;
+    void populateSubfolders(QStandardItem *folderItemNamePointer, const double folderId) const;
+    void selectSubfolderContents(const QModelIndex &parentModelIndex) const;
+    void updateUi() const;
 };
 #endif