/*
- * Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2023-2024 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
*
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.
// 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;
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