/*
- * Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
*
// The public variables.
TabWidget *tabWidgetPointer;
+public Q_SLOTS:
+ // The public slots.
+ void populateBookmarksInThisWindow(); // This is public so that the bookmarks can be repopulated over D-Bus when changed by another instance of Privacy Browser.
+
private Q_SLOTS:
// The private slots.
void addOrEditDomainSettings() const;
void fullScreenRequested(const bool toggleOn);
void getZoomFactorFromUser();
void hideFindTextActions() const;
+ void hideProgressBar() const;
void home() const;
void incrementZoom();
void loadUrlFromLineEdit(const QString &url) const;
void newWindow() const;
- void populateBookmarks();
+ void populateBookmarksInAllWindows() const;
void refresh() const;
void reloadAndBypassCache() const;
- void showAddBookmarkDialog() const;
- void showAddFolderDialog() const;
void showBookmarkContextMenu(const QPoint &point);
void showCookiesDialog();
- void showDownloadLocationBrowseDialog() const;
+ void showDownloadDirectoryBrowseDialog() const;
void showDomainSettingsDialog() const;
void showFindTextActions() const;
void showProgressBar(const int &progress) const;
void showSettingsDialog();
+ void toggleBookmark();
+ void toggleDeveloperTools() const;
void toggleDomStorage() const;
void toggleFindCaseSensitive() const;
void toggleJavaScript() const;
void toggleViewSource() const;
void toggleViewSourceInNewTab() const;
void updateCookiesAction(const int numberOfCookies) const;
- void updateDefaultZoomFactor(const double newDefaultZoomFactor);
+ void updateDefaultZoomFactor(const double newDefaultZoomFactorDouble);
void updateDomStorageAction(const bool &isEnabled) const;
void updateDomainSettingsIndicator(const bool status);
void updateFindText(const QString &text, const bool findCaseSensitive) const;
void updateLocalStorageAction(const bool &isEnabled);
void updateSearchEngineActions(const QString &searchEngine, const bool &updateCustomSearchEngineStatus);
void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus);
- void updateZoomActions(const double &zoomFactor);
+ void updateZoomActions(const double zoomFactorDouble);
void updateSearchEngineLabel(const QString &searchEngineString) const;
void updateUrlLineEdit(const QUrl &newUrl);
void updateUserAgentLabel(const QString &userAgentDatabaseName) const;
private:
// The private variables.
+ KActionCollection *actionCollectionPointer;
+ QAction *bookmarkedActionPointer;
QList<QPair<QMenu *, QAction *> *> bookmarksMenuActionList;
QMenu *bookmarksMenuPointer;
QList<QPair<QMenu *, QMenu *> *> bookmarksMenuSubmenuList;
QAction *cookiesActionPointer;
QUrl currentUrl;
QPushButton *currentZoomButtonPointer;
- double currentZoomFactor;
+ double currentZoomFactorDouble;
bool customSearchEngineEnabled;
bool customUserAgentEnabled;
- double defaultZoomFactor;
+ double defaultZoomFactorDouble;
+ QAction *developerToolsActionPointer;
QAction *domStorageActionPointer;
- QComboBox *downloadLocationComboBoxPointer;
+ QComboBox *downloadDirectoryComboBoxPointer;
+ QList<QPair<QMenu *, QAction *> *> finalBookmarkFolderMenuActionList;
QAction *findCaseSensitiveActionPointer;
QAction *findNextActionPointer;
QAction *findPreviousActionPointer;
QPalette normalBackgroundPalette;
QPalette positiveBackgroundPalette;
QProgressBar *progressBarPointer;
+ QAction *refreshActionPointer;
QLabel *searchEngineLabelPointer;
QAction *searchEngineMenuActionPointer;
QAction *searchEngineMojeekActionPointer;
QAction *searchEngineBingActionPointer;
QAction *searchEngineYahooActionPointer;
QAction *searchEngineCustomActionPointer;
+ QAction *stopActionPointer;
QLabel *userAgentLabelPointer;
QAction *userAgentMenuActionPointer;
QAction *userAgentPrivacyBrowserActionPointer;
QPushButton *zoomPlusButtonPointer;
// The private functions.
+ void addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double folderId);
+ int calculateSettingsInt(const bool settingCurrentlyEnabled, const bool settingEnabledByDefault) const;
void populateBookmarksMenuSubfolders(const double folderId, QMenu *menuPointer);
void populateBookmarksToolBar();
void populateBookmarksToolBarSubfolders(const double folderId, QMenu *menuPointer);
+ void updateBookmarkedAction() const;
};
#endif