X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fdialogs%2FBookmarksDialog.h;h=0df090333a48033842db0375c42522bcd1566aa4;hb=5e66d268d985552aeeae3e9ae7d0967d359a557f;hp=e81d0b41cf008f38ce07e398a67eae0b69c5b2a9;hpb=f18185adbdce9891be0cbd2197838441aaa5ed3e;p=PrivacyBrowserPC.git diff --git a/src/dialogs/BookmarksDialog.h b/src/dialogs/BookmarksDialog.h index e81d0b4..0df0903 100644 --- a/src/dialogs/BookmarksDialog.h +++ b/src/dialogs/BookmarksDialog.h @@ -1,5 +1,5 @@ /* - * Copyright 2023 Soren Stoutner . + * Copyright 2023-2024 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -36,13 +36,15 @@ class BookmarksDialog : public QDialog public: // The primary constructor. - explicit BookmarksDialog(QIcon currentWebsiteFavoriteIcon); + BookmarksDialog(QWidget *parentWidgetPointer, QIcon currentWebsiteFavorieIcon, QString currentWebsiteTitle, QString currentWebsiteUrl); // 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. @@ -52,15 +54,13 @@ private Q_SLOTS: // The private slots. void deleteItems() const; void refreshBookmarks() const; - void showAddBookmarkDialog() const; + void showAddBookmarkDialog(); + void showAddFolderDialog(); 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