QAction* newWindow = KStandardAction::openNew(this, &DolphinMainWindow::openNewMainWindow, actionCollection());
newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
QAction* newWindow = KStandardAction::openNew(this, &DolphinMainWindow::openNewMainWindow, actionCollection());
newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
newWindow->setWhatsThis(xi18nc("@info:whatsthis", "This opens a new "
"window just like this one with the current location and view."
"<nl/>You can drag and drop items between windows."));
newWindow->setWhatsThis(xi18nc("@info:whatsthis", "This opens a new "
"window just like this one with the current location and view."
"<nl/>You can drag and drop items between windows."));
const QString panelWhatsThis = xi18nc("@info:whatsthis", "<para>To show or "
"hide panels like this go to <interface>Control|Panels</interface> "
"or <interface>View|Panels</interface>.</para>");
const QString panelWhatsThis = xi18nc("@info:whatsthis", "<para>To show or "
"hide panels like this go to <interface>Control|Panels</interface> "
"or <interface>View|Panels</interface>.</para>");
actionCollection()->action(QStringLiteral("show_information_panel"))
->setWhatsThis(xi18nc("@info:whatsthis", "<para> This toggles the "
"<emphasis>information</emphasis> panel at the right side of the "
actionCollection()->action(QStringLiteral("show_information_panel"))
->setWhatsThis(xi18nc("@info:whatsthis", "<para> This toggles the "
"<emphasis>information</emphasis> panel at the right side of the "
"about the items your mouse is hovering over or about the selected "
"items. Otherwise it informs you about the currently viewed folder.<nl/>"
"For single items a preview of their contents is provided.</para>"));
"about the items your mouse is hovering over or about the selected "
"items. Otherwise it informs you about the currently viewed folder.<nl/>"
"For single items a preview of their contents is provided.</para>"));
infoDock->setWhatsThis(xi18nc("@info:whatsthis", "<para>This panel "
"provides in-depth information about the items your mouse is "
"hovering over or about the selected items. Otherwise it informs "
infoDock->setWhatsThis(xi18nc("@info:whatsthis", "<para>This panel "
"provides in-depth information about the items your mouse is "
"hovering over or about the selected items. Otherwise it informs "
m_controlButton = new QToolButton(this);
m_controlButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
m_controlButton = new QToolButton(this);
m_controlButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
m_controlButton->setAttribute(Qt::WidgetAttribute::WA_CustomWhatsThis);
m_controlButton->setPopupMode(QToolButton::InstantPopup);
m_controlButton->setAttribute(Qt::WidgetAttribute::WA_CustomWhatsThis);
m_controlButton->setPopupMode(QToolButton::InstantPopup);
QMenu* controlMenu = new QMenu(m_controlButton);
connect(controlMenu, &QMenu::aboutToShow, this, &DolphinMainWindow::updateControlMenu);
QMenu* controlMenu = new QMenu(m_controlButton);
connect(controlMenu, &QMenu::aboutToShow, this, &DolphinMainWindow::updateControlMenu);
toolBar()->addWidget(m_controlButton);
connect(toolBar(), &KToolBar::iconSizeChanged,
m_controlButton, &QToolButton::setIconSize);
toolBar()->addWidget(m_controlButton);
connect(toolBar(), &KToolBar::iconSizeChanged,
m_controlButton, &QToolButton::setIconSize);
// The added widgets are owned by the toolbar and may get deleted when e.g. the toolbar
// gets edited. In this case we must add them again. The adding is done asynchronously by
// The added widgets are owned by the toolbar and may get deleted when e.g. the toolbar
// gets edited. In this case we must add them again. The adding is done asynchronously by