diff options
| author | Felix Ernst <[email protected]> | 2020-11-19 21:22:27 +0000 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-11-19 21:22:27 +0000 |
| commit | 50ca5af7e0ec460f9f004a3660efa10bb1dd8cb1 (patch) | |
| tree | f87dde47243cd134a1d106f06e7a2b650cb2edc9 /src/dolphinnavigatorswidgetaction.h | |
| parent | f2d2f325b628f8b831cce076c1a5f5dc43ac21ee (diff) | |
Allow having the UrlNavigators below the tab bar
This commit restores the possibility to have the UrlNavigators below
the tab bar. This will happen automatically whenever the UrlNavigator
is removed from the toolbar.
It is also now again possible to have the toolbar on the side. This
option is disabled while the toolbar contains the UrlNavigators.
This commit makes no changes to the new default which is having the
UrlNavigators in the toolbar but makes sure that upgrading users won't
be affected.
Diffstat (limited to 'src/dolphinnavigatorswidgetaction.h')
| -rw-r--r-- | src/dolphinnavigatorswidgetaction.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/dolphinnavigatorswidgetaction.h b/src/dolphinnavigatorswidgetaction.h index f343e6a1c..bbd8cf127 100644 --- a/src/dolphinnavigatorswidgetaction.h +++ b/src/dolphinnavigatorswidgetaction.h @@ -42,13 +42,6 @@ public: DolphinNavigatorsWidgetAction(QWidget *parent = nullptr); /** - * Adds this action to the mainWindow's toolbar and saves the change - * in the users ui configuration file. - * @return true if successful. Otherwise false. - */ - bool addToToolbarAndSave(KXmlGuiWindow *mainWindow); - - /** * The secondary UrlNavigator is only created on-demand. Such an action is not necessary * for the primary UrlNavigator which is created preemptively. * @@ -71,6 +64,8 @@ public: void followViewContainersGeometry(int globalXOfPrimary, int widthOfPrimary, int globalXOfSecondary, int widthOfSecondary); + bool isInToolbar() const; + /** * @return the primary UrlNavigator. */ @@ -87,6 +82,20 @@ public: */ void setSecondaryNavigatorVisible(bool visible); +protected: + /** + * There should always ever be one navigatorsWidget for this action so + * this method always returns the same widget and reparents it. + * You normally don't have to use this method directly because + * QWidgetAction::requestWidget() is used to obtain the navigatorsWidget + * and to steal it from whereever it was prior. + * @param parent the new parent of the navigatorsWidget. + */ + QWidget *createWidget(QWidget *parent) override; + + /** @see QWidgetAction::deleteWidget() */ + void deleteWidget(QWidget *widget) override; + private: /** * Adjusts the width of the spacings used to align the UrlNavigators with ViewContainers. |
