#ifndef MAINVIEW_H
#define MAINVIEW_H
-// Application headers.
-#include "UserAgentHelper.h"
-
// Qt framework headers.
#include <QPushButton>
#include <QWebEngineHistory>
// The primary contructor.
explicit MainView(QWidget *parent);
+ // The public functions.
+ void applyOnTheFlyZoomFactor(const double &zoomFactor) const;
+ void loadInitialWebsite();
+
signals:
- // Define the signals.
- void linkHovered(const QString &linkUrl);
+ // The signals.
+ void linkHovered(const QString &linkUrl) const;
+ void userAgentUpdated(const QString &userAgent) const;
+ void searchEngineUpdated(const QString &searchEngine) const;
+ void zoomFactorUpdated(const double &zoomFactor) const;
public Q_SLOTS:
- // Define the public slots.
+ // The public slots.
void applyApplicationSettings();
- void applyDomainSettingsAndReload();
+ void applyDomainSettingsAndReload() const;
+ void applyDomainSettingsWithoutReloading() const;
+ void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer);
+ void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const;
private Q_SLOTS:
- // Define the private slots.
- void goHome();
- void loadUrl(const QString &urlFromUser);
- void pageLinkHovered(const QString &linkUrl);
- void toggleJavaScript();
- void updateInterface();
+ // The private slots.
+ void goHome() const;
+ void loadUrlFromTextBox(QString urlFromUser) const;
+ void pageLinkHovered(const QString &linkUrl) const;
+ void toggleJavaScript() const;
+ void updateInterface() const;
private:
- // Define the private variables.
+ // The private variables.
QPushButton *backButtonPointer;
QPushButton *forwardButtonPointer;
QPushButton *javaScriptButtonPointer;
+ QString searchEngineUrl;
KLineEdit *urlLineEditPointer;
QWebEngineHistory *webEngineHistoryPointer;
QWebEngineProfile *webEngineProfilePointer;
QWebEngineSettings *webEngineSettingsPointer;
QWebEngineView *webEngineViewPointer;
- UserAgentHelper *userAgentHelperPointer;
- // Define the private functions.
- void applyDomainSettings(bool reloadWebsite);
+ // The private functions.
+ void applyDomainSettings(bool reloadWebsite) const;
};
#endif