// Qt framework headers.
#include <QPushButton>
#include <QWebEngineHistory>
+#include <QWebEngineProfile>
#include <QWebEngineSettings>
#include <QWebEngineView>
// The primary contructor.
explicit BrowserView(QWidget *parent);
+ // The destructor.
+ ~BrowserView();
+
// The public functions.
void applyOnTheFlyZoomFactor(const double &zoomFactor);
void loadInitialWebsite();
void toggleJavaScript() const;
void toggleLocalStorage() const;
+ // The public static variables.
+ static QString webEngineDefaultUserAgent;
+
signals:
// The signals.
+ void addCookie(const QNetworkCookie &cookie) const;
+ void removeCookie(const QNetworkCookie &cookie) const;
+ void clearUrlLineEditFocus() const;
void hideProgressBar() const;
void linkHovered(const QString &linkUrl) const;
void showProgressBar(const int &progress) const;
void updateBackAction(const bool &isEnabled) const;
- void updateDomainSettingsIndicator(const bool status) const;
+ void updateDomainSettingsIndicator(const bool &status, const QString &domainSettingsDomain) const;
void updateForwardAction(const bool &isEnabled) const;
void updateJavaScriptAction(const bool &isEnabled) const;
void updateLocalStorageAction(const bool &isEnabled) const;
void updateSearchEngineActions(const QString &searchEngine) const;
- void updateUrlLineEdit(const QString &newUrl) const;
+ void updateUrlLineEdit(const QUrl &newUrl) const;
void updateUserAgentActions(const QString &userAgent) const;
void updateZoomFactorAction(const double &zoomFactor) const;
public Q_SLOTS:
// The public slots.
+ void addCookieToStore(QNetworkCookie cookie) const;
void applyApplicationSettings();
void applyDomainSettingsAndReload();
void applyDomainSettingsWithoutReloading(const QString &hostname);
void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer);
void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const;
void back() const;
+ void deleteAllCookies() const;
+ void deleteCookieFromStore(const QNetworkCookie &cookie) const;
void forward() const;
void home() const;
void loadUrlFromLineEdit(QString url) const;
+ void mouseBack() const;
+ void mouseForward() const;
void refresh() const;
private Q_SLOTS:
// The private slots.
+ void cookieAdded(const QNetworkCookie &cookie) const;
+ void cookieRemoved(const QNetworkCookie &cookie) const;
void loadFinished() const;
void loadProgress(const int &progress) const;
void loadStarted() const;
// The private variables.
double currentZoomFactor; // This can be removed once <https://redmine.stoutner.com/issues/799> has been resolved.
QString searchEngineUrl;
+ QWebEngineCookieStore *webEngineCookieStorePointer;
QWebEngineHistory *webEngineHistoryPointer;
+ QWebEnginePage *webEnginePagePointer;
QWebEngineProfile *webEngineProfilePointer;
QWebEngineSettings *webEngineSettingsPointer;
QWebEngineView *webEngineViewPointer;