X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2d4d2ce9a14902ee5a2b236f8510596fc2f86b99..42cd439af882c78e6e3c1f6a58dd8d47ce47ff57:/src/dolphinnavigatorswidgetaction.h diff --git a/src/dolphinnavigatorswidgetaction.h b/src/dolphinnavigatorswidgetaction.h index f343e6a1c..bbd8cf127 100644 --- a/src/dolphinnavigatorswidgetaction.h +++ b/src/dolphinnavigatorswidgetaction.h @@ -41,13 +41,6 @@ class DolphinNavigatorsWidgetAction : public QWidgetAction 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.