19#include "ui_historysidebar.h"
43void HistorySideBar::urlActivated(
const QUrl &url)
48void HistorySideBar::urlCtrlActivated(
const QUrl &url)
53void HistorySideBar::urlShiftActivated(
const QUrl &url)
55 openUrlInNewWindow(url);
58void HistorySideBar::openUrl(
const QUrl &url)
60 const QUrl u = !url.isEmpty() ? url : ui->historyTree->selectedUrl();
64void HistorySideBar::openUrlInNewTab(
const QUrl &url)
66 const QUrl u = !url.isEmpty() ? url : ui->historyTree->selectedUrl();
70void HistorySideBar::openUrlInNewWindow(
const QUrl &url)
72 const QUrl u = !url.isEmpty() ? url : ui->historyTree->selectedUrl();
76void HistorySideBar::openUrlInNewPrivateWindow(
const QUrl &url)
78 const QUrl u = !url.isEmpty() ? url : ui->historyTree->selectedUrl();
79 mApp->startPrivateBrowsing(u);
82void HistorySideBar::createContextMenu(
const QPoint &pos)
90 QAction* actDelete = menu.addAction(QIcon::fromTheme(
QSL(
"edit-delete")), tr(
"Delete"));
92 connect(actNewTab, SIGNAL(triggered()),
this, SLOT(openUrlInNewTab()));
93 connect(actNewWindow, SIGNAL(triggered()),
this, SLOT(openUrlInNewWindow()));
94 connect(actNewPrivateWindow, SIGNAL(triggered()),
this, SLOT(openUrlInNewPrivateWindow()));
97 if (ui->historyTree->selectedUrl().isEmpty()) {
98 actNewTab->setDisabled(
true);
99 actNewWindow->setDisabled(
true);
100 actNewPrivateWindow->setDisabled(
true);
106void HistorySideBar::showEvent(QShowEvent *event)
108 QWidget::showEvent(event);
109 ui->search->setFocus();
TabWidget * tabWidget() const
TabbedWebView * weView() const
~HistorySideBar() override
HistorySideBar(BrowserWindow *window, QWidget *parent=nullptr)
void urlCtrlActivated(const QUrl &url)
void urlShiftActivated(const QUrl &url)
void removeSelectedItems()
void contextMenuRequested(const QPoint &point)
void urlActivated(const QUrl &url)
void search(const QString &string)
static QIcon privateBrowsingIcon()
static QIcon newWindowIcon()
static QIcon newTabIcon()
void load(const QUrl &url)