┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinurlnavigatorwidgetaction.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2020-08-27 18:55:18 +0200
committerElvis Angelaccio <[email protected]>2020-11-09 23:49:07 +0100
commit6151a7aec0516570926cb1d15da48936e38e6765 (patch)
treeccafc99ee507a90fa36bfc7c148af02c06525551 /src/views/dolphinurlnavigatorwidgetaction.h
parentb6fc58c3c32b03f504a5f697b62c4834dc3f650a (diff)
Add the UrlNavigator to the toolbar automatically if needed
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave() method which changes the users toolbar configuration to contain an Url Navigator. This way the user doesn't need to do anything manually. Aside from that a bunch of minor fixes like renaming and reordering
Diffstat (limited to 'src/views/dolphinurlnavigatorwidgetaction.h')
-rw-r--r--src/views/dolphinurlnavigatorwidgetaction.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/views/dolphinurlnavigatorwidgetaction.h b/src/views/dolphinurlnavigatorwidgetaction.h
index 517afc05a..ed07115a6 100644
--- a/src/views/dolphinurlnavigatorwidgetaction.h
+++ b/src/views/dolphinurlnavigatorwidgetaction.h
@@ -24,7 +24,9 @@
#include "dolphinurlnavigator.h"
#include <QWidgetAction>
-#include <QStackedWidget>
+
+class KXmlGuiWindow;
+class QStackedWidget;
/**
* @brief QWidgetAction that allows to use a KUrlNavigator in a toolbar.
@@ -45,11 +47,20 @@ public:
DolphinUrlNavigator *urlNavigator() const;
/**
- * Set the QStackedWidget which is the defaultWidget() to either
+ * Sets the QStackedWidget which is the defaultWidget() to either
* show a KUrlNavigator or an expanding spacer.
*/
void setUrlNavigatorVisible(bool visible);
+ /**
+ * Adds this action to the mainWindow's toolbar and saves the change
+ * in the users ui configuration file.
+ * @return true if successful. Otherwise false.
+ * @note This method does multiple things which are discouraged in
+ * the API documentation.
+ */
+ bool addToToolbarAndSave(KXmlGuiWindow *mainWindow);
+
private:
QStackedWidget *m_stackedWidget;
};