domainSettingsActionPointer->setText(i18nc("Domain Settings button", "Domain Settings"));
// Set the action icons.
- //refreshActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
+ userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode"));
+ userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("firefox-esr")));
+ userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("chromium")));
+ userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("firefox-esr")));
+ userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("chromium")));
+ userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+ userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+ userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+ searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+ searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+ searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+ searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("im-google")));
+ searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+ searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("im-yahoo")));
+ searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+ zoomFactorActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("zoom")));
domainSettingsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("network-server-symbolic")));
// Update the on-the-fly menus.
- connect(browserViewPointer, SIGNAL(userAgentUpdated(QString)), this, SLOT(updateOnTheFlyUserAgent(QString)));
- connect(browserViewPointer, SIGNAL(zoomFactorUpdated(double)), this, SLOT(updateOnTheFlyZoomFactor(double)));
- connect(browserViewPointer, SIGNAL(searchEngineUpdated(QString)), this, SLOT(updateOnTheFlySearchEngine(QString)));
+ connect(browserViewPointer, SIGNAL(updateUserAgentActions(QString)), this, SLOT(updateUserAgentActions(QString)));
+ connect(browserViewPointer, SIGNAL(updateZoomFactorAction(double)), this, SLOT(updateZoomFactorAction(double)));
+ connect(browserViewPointer, SIGNAL(updateSearchEngineActions(QString)), this, SLOT(updateSearchEngineActions(QString)));
// Apply the on-the-fly settings when selected.
connect(userAgentActionGroupPointer, SIGNAL(triggered(QAction*)), browserViewPointer, SLOT(applyOnTheFlyUserAgent(QAction*)));
// Get a handle for the status bar.
QStatusBar *statusBarPointer = statusBar();
+ // Create a progress bar.
+ progressBarPointer = new QProgressBar();
+
+ // Add the progress bar to to the status bar.
+ statusBarPointer->addPermanentWidget(progressBarPointer);
+
// Update the status bar with the URL when a link is hovered.
connect(browserViewPointer, SIGNAL(linkHovered(QString)), statusBarPointer, SLOT(showMessage(QString)));
+ // Update the progress bar.
+ connect(browserViewPointer, SIGNAL(showProgressBar(const int)), this, SLOT(showProgressBar(const int)));
+ connect(browserViewPointer, SIGNAL(hideProgressBar()), progressBarPointer, SLOT(hide()));
+
// Get the URL line edit palettes.
noDomainSettingsPalette = urlLineEditPointer->palette();
domainSettingsPalette = urlLineEditPointer->palette();
browserViewPointer->applyOnTheFlyZoomFactor(newZoomFactor);
// Update the on-the-fly action text.
- updateOnTheFlyZoomFactor(newZoomFactor);
+ updateZoomFactorAction(newZoomFactor);
}
}
browserViewPointer->refresh();
}
+void BrowserWindow::showProgressBar(const int &progress) const
+{
+ // Set the progress bar value.
+ progressBarPointer->setValue(progress);
+
+ // Show the progress bar.
+ progressBarPointer->show();
+}
+
void BrowserWindow::toggleJavaScript() const
{
// Remove the focus from the URL line edit.
else javaScriptActionPointer->setIcon(QIcon(":/icons/privacy-mode"));
}
-void BrowserWindow::updateOnTheFlySearchEngine(const QString &searchEngine) const
+void BrowserWindow::updateSearchEngineActions(const QString &searchEngine) const
{
// Initialize the custom search engine flag.
bool customSearchEngine = false;
}
}
-void BrowserWindow::updateOnTheFlyUserAgent(const QString &userAgent) const
+void BrowserWindow::updateUserAgentActions(const QString &userAgent) const
{
// Initialize the custom user agent flag.
bool customUserAgent = false;
}
}
-void BrowserWindow::updateOnTheFlyZoomFactor(const double &zoomFactor)
+void BrowserWindow::updateZoomFactorAction(const double &zoomFactor)
{
// Set the current zoom factor.
- currentZoomFactor = Settings::zoomFactor();
+ currentZoomFactor = zoomFactor;
// Update the zoom factor action text, formatting the double with 2 decimal places.
zoomFactorActionPointer->setText(ki18nc("@action", "Zoom Factor - %1").subs(zoomFactor, 0, '0', 2).toString());