X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a4be53fb997ea2f844f2ca4a590c073a50fcbbf6..f645e6b4b2053926bcea3f9ae6985a53b28caab1:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 40101852b..1a3ec4efb 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -11,8 +11,8 @@ #include "dolphintabwidget.h" #include +#include #include -#include #include #ifdef HAVE_BALOO @@ -95,6 +95,12 @@ public: */ KNewFileMenu* newFileMenu() const; + /** + * Augments Qt's build-in QMainWindow context menu to add + * Dolphin-specific actions, such as "unlock panels". + */ + QMenu *createPopupMenu() override; + /** * Switch the window's view containers' locations to display the home path * for any which are currently displaying a location corresponding to or @@ -105,12 +111,6 @@ public: */ void setViewsToHomeIfMountPathOpen(const QString& mountPath); - /** - * Sets any of the window's view containers which are currently displaying - * invalid locations to the home path - */ - void setViewsWithInvalidPathsToHome(); - bool isFoldersPanelEnabled() const; bool isInformationPanelEnabled() const; @@ -177,6 +177,19 @@ public Q_SLOTS: */ void openNewTab(const QUrl& url); + /** + * Opens a new tab showing the URL \a url and activate it. + */ + void openNewTabAndActivate(const QUrl &url); + + /** + * Opens a new window showing the URL \a url. + */ + void openNewWindow(const QUrl &url); + + /** @see GeneralSettings::splitViewChanged() */ + void slotSplitViewChanged(); + Q_SIGNALS: /** * Is sent if the selection of the currently active view has @@ -225,6 +238,9 @@ protected: /** Handles QWhatsThisClickedEvent and passes all others on. */ bool eventFilter(QObject*, QEvent*) override; + /** Sets a sane initial window size **/ + QSize sizeHint() const override; + protected Q_SLOTS: /** * Calls the base method KXmlGuiWindow::saveNewToolbarConfig(). @@ -470,6 +486,11 @@ private Q_SLOTS: /** * Updates the menu that is by default at the right end of the toolbar. + * + * In true "simple by default" fashion, the menu only contains the most important + * and necessary actions to be able to use Dolphin. This is supposed to hold true even + * if the user does not know how to open a context menu. More advanced actions can be + * discovered through a sub-menu (@see KConfigWidgets::KHamburgerMenu::setMenuBarAdvertised()). */ void updateHamburgerMenu(); @@ -561,6 +582,12 @@ private Q_SLOTS: * to go to. */ void slotGoForward(QAction* action); + + /** + * Is called when configuring the keyboard shortcuts + */ + void slotKeyBindings(); + private: /** * Sets up the various menus and actions and connects them. @@ -663,10 +690,9 @@ private: KToolBarPopupAction* m_backAction; KToolBarPopupAction* m_forwardAction; - /** Makes sure that only one object is ever connected to the history. */ - QMetaObject::Connection m_updateHistoryConnection; - QMenu m_searchTools; + KFileItemActions m_fileItemActions; + }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const