KActionCollection *actionCollectionPointer = this->actionCollection();
// Add the standard actions.
+ QAction *backActionPointer = KStandardAction::back(this, SLOT(back()), actionCollectionPointer);
+ QAction *forwardActionPointer = KStandardAction::forward(this, SLOT(forward()), actionCollectionPointer);
+ KStandardAction::home(this, SLOT(home()), actionCollectionPointer);
KStandardAction::openNew(this, SLOT(fileNew()), actionCollectionPointer);
KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollectionPointer);
KStandardAction::preferences(this, SLOT(settingsConfigure()), actionCollectionPointer);
+ KStandardAction::redisplay(this, SLOT(refresh()), actionCollectionPointer);
// Add the custom actions.
userAgentPrivacyBrowserActionPointer = actionCollectionPointer->addAction(QStringLiteral("user_agent_privacy_browser"));
searchEngineBingActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_bing"));
searchEngineYahooActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_yahoo"));
searchEngineCustomActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_custom"));
- backActionPointer = actionCollectionPointer->addAction(QStringLiteral("back"));
- forwardActionPointer = actionCollectionPointer->addAction(QStringLiteral("forward"));
- refreshActionPointer = actionCollectionPointer->addAction(QStringLiteral("refresh"));
- homeActionPointer = actionCollectionPointer->addAction(QStringLiteral("home"));
javaScriptActionPointer = actionCollectionPointer->addAction(QStringLiteral("javascript"));
domainSettingsActionPointer = actionCollectionPointer->addAction(QStringLiteral("domain_settings"));
searchEngineGoogleActionPointer->setText(i18nc("Search engine", "Google"));
searchEngineBingActionPointer->setText(i18nc("Search engine", "Bing"));
searchEngineYahooActionPointer->setText(i18nc("Search engine", "Yahoo"));
- backActionPointer->setText(i18nc("Back button", "Back"));
- forwardActionPointer->setText(i18nc("Forward button", "Forward"));
- refreshActionPointer->setText(i18nc("Refresh button", "Refresh"));
- homeActionPointer->setText(i18nc("Home button", "Home"));
javaScriptActionPointer->setText(i18nc("JavaScript button", "JavaScript"));
domainSettingsActionPointer->setText(i18nc("Domain Settings button", "Domain Settings"));
// Set the action icons.
- backActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("arrow-left")));
- forwardActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right")));
- refreshActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
- homeActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("home")));
+ //refreshActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
domainSettingsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("network-server-symbolic")));
// Update the on-the-fly menus.
connect(zoomFactorActionPointer, SIGNAL(triggered()), this, SLOT(getZoomFactorFromUser()));
// Connect the URL toolbar actions.
- connect(backActionPointer, SIGNAL(triggered()), this, SLOT(back()));
- connect(forwardActionPointer, SIGNAL(triggered()), this, SLOT(forward()));
- connect(refreshActionPointer, SIGNAL(triggered()), this, SLOT(refresh()));
- connect(homeActionPointer, SIGNAL(triggered()), this, SLOT(home()));
connect(javaScriptActionPointer, SIGNAL(triggered()), this, SLOT(toggleJavaScript()));
connect(domainSettingsActionPointer, SIGNAL(triggered()), this, SLOT(openDomainSettings()));
browserViewPointer->toggleJavaScript();
}
+QSize BrowserWindow::sizeHint() const
+{
+ // Return the default window size.
+ return QSize(1500, 1200);
+}
+
void BrowserWindow::settingsConfigure()
{
// Check to make sure the dialog box isn't already displayed.
// The default constructor.
BrowserWindow();
+ // The public functions.
+ QSize sizeHint() const override;
+
private Q_SLOTS:
// The private slots.
void back() const;
private:
// The private variables.
- QAction *backActionPointer;
BrowserView *browserViewPointer;
KConfigDialog *configDialogPointer;
QAction *domainSettingsActionPointer;
QPalette domainSettingsPalette;
double currentZoomFactor;
- QAction *forwardActionPointer;
- QAction *homeActionPointer;
QAction *javaScriptActionPointer;
QPalette noDomainSettingsPalette;
QLabel *searchEngineLabelPointer;
QAction *searchEngineBingActionPointer;
QAction *searchEngineYahooActionPointer;
QAction *searchEngineCustomActionPointer;
- QAction *refreshActionPointer;
QLabel *userAgentLabelPointer;
QAction *userAgentPrivacyBrowserActionPointer;
QAction *userAgentFirefoxLinuxActionPointer;