┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2020-09-20 18:53:59 +0200
committerElvis Angelaccio <[email protected]>2020-11-09 23:49:07 +0100
commit37327c9b0aae112c5890703cba1f0157043007e0 (patch)
tree5cda9876f310a258b95226bc0d9681acc665f98e /src/dolphinviewcontainer.h
parent6151a7aec0516570926cb1d15da48936e38e6765 (diff)
Make UrlNavigators in the toolbar the only option
The UrlNavigators will be automatically added to the toolbar. The Sort By action is removed from the default toolbar to make space. Remove all options to have UrlNavigators outside the toolbar and remove those code paths. Make it so the new NavigatorsWidgetAction contains two UrlNavigators when in split view mode. Spacing was also added to align these UrlNavigators with the ViewContainers when enough space is available. Force the toolbar to be either at the top or bottom of the window. Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this in KUrlNavigator in the future. This commit also contains a changes which should be moved to a separate merge requests before this gets merged: - Add an expansion animation when split view is enabled by the user
Diffstat (limited to 'src/dolphinviewcontainer.h')
-rw-r--r--src/dolphinviewcontainer.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index 2fe6b5f89..77b74d189 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -90,7 +90,7 @@ public:
* or nullptr if there is none.
* @see connectUrlNavigator()
* @see disconnectUrlNavigator()
- *
+ *
* Use urlNavigatorInternalWithHistory() if you want to access the history.
* @see urlNavigatorInternalWithHistory()
*/
@@ -100,7 +100,7 @@ public:
* or nullptr if there is none.
* @see connectUrlNavigator()
* @see disconnectUrlNavigator()
- *
+ *
* Use urlNavigatorInternalWithHistory() if you want to access the history.
* @see urlNavigatorInternalWithHistory()
*/
@@ -126,11 +126,6 @@ public:
*/
void connectUrlNavigator(DolphinUrlNavigator *urlNavigator);
- inline void connectToInternalUrlNavigator()
- {
- connectUrlNavigator(m_urlNavigator);
- }
-
/**
* Disconnects the navigator that is currently controling the view.
* This method completely reverses connectUrlNavigator().
@@ -140,9 +135,8 @@ public:
/**
* Shows the message \msg with the given type non-modal above
* the view-content.
- * @return the KMessageWidget used to show the message
*/
- KMessageWidget *showMessage(const QString& msg, MessageType type);
+ void showMessage(const QString& msg, MessageType type);
/**
* Refreshes the view container to get synchronized with the (updated) Dolphin settings.
@@ -244,8 +238,6 @@ private slots:
void updateDirectorySortingProgress(int percent);
- void updateNavigatorWidgetVisibility();
-
/**
* Updates the statusbar to show an undetermined progress with the correct
* context information whether a searching or a directory loading is done.
@@ -369,21 +361,20 @@ private:
private:
QVBoxLayout* m_topLayout;
- QWidget* m_navigatorWidget;
/**
- * The UrlNavigator within the m_navigatorWidget. m_urlNavigator is
- * used even when another UrlNavigator is controlling the view to keep
- * track of this view containers history.
+ * The internal UrlNavigator which is never visible to the user.
+ * m_urlNavigator is used even when another UrlNavigator is controlling
+ * the view to keep track of this object's history.
*/
- DolphinUrlNavigator *m_urlNavigator;
+ std::unique_ptr<DolphinUrlNavigator> m_urlNavigator;
/**
- * The UrlNavigator that is currently connected to the view. This could
- * either be m_urlNavigator, the urlNavigator in the toolbar or nullptr.
+ * The UrlNavigator that is currently connected to the view.
+ * This is a nullptr if no UrlNavigator is connected.
+ * Otherwise it's one of the UrlNavigators visible in the toolbar.
*/
QPointer<DolphinUrlNavigator> m_urlNavigatorConnected;
- QPushButton* m_emptyTrashButton;
DolphinSearchBox* m_searchBox;
bool m_searchModeEnabled;
KMessageWidget* m_messageWidget;
@@ -396,6 +387,11 @@ private:
QTimer* m_statusBarTimer; // Triggers a delayed update
QElapsedTimer m_statusBarTimestamp; // Time in ms since last update
bool m_autoGrabFocus;
+ /**
+ * The visual state to be applied to the next UrlNavigator that gets
+ * connected to this ViewContainer.
+ */
+ std::unique_ptr<DolphinUrlNavigator::VisualState> m_urlNavigatorVisualState;
#ifdef HAVE_KACTIVITIES
private: