#include "config-dolphin.h"
#include "dolphinurlnavigator.h"
+#include "selectionmode/selectionmodebottombar.h"
#include "views/dolphinview.h"
#include <KFileItem>
class FilterBar;
class KMessageWidget;
+class QAction;
+class QGridLayout;
class QUrl;
class DolphinSearchBox;
class DolphinStatusBar;
+class SelectionModeTopBar;
/**
* @short Represents a view for the directory content
*/
void disconnectUrlNavigator();
+ void setSelectionModeEnabled(bool enabled, KActionCollection *actionCollection = nullptr, SelectionModeBottomBar::Contents bottomBarContents = SelectionModeBottomBar::Contents::GeneralContents);
+ bool isSelectionModeEnabled() const;
+
/**
* Shows the message \msg with the given type non-modal above
* the view-content.
*/
void setSearchModeEnabled(bool enabled);
+ /** Used to notify the m_selectionModeBottomBar that there is no other ViewContainer in the tab. */
+ void slotSplitTabDisabled();
+
Q_SIGNALS:
/**
* Is emitted whenever the filter bar has changed its visibility state.
*/
void searchModeEnabledChanged(bool enabled);
+ void selectionModeChanged(bool enabled);
+
/**
* Is emitted when the write state of the folder has been changed. The application
* should disable all actions like "Create New..." that depend on the write
void tryRestoreViewState();
private:
- QVBoxLayout* m_topLayout;
+ QGridLayout *m_topLayout;
/**
* The internal UrlNavigator which is never visible to the user.
* Otherwise it's one of the UrlNavigators visible in the toolbar.
*/
QPointer<DolphinUrlNavigator> m_urlNavigatorConnected;
+
DolphinSearchBox* m_searchBox;
bool m_searchModeEnabled;
+
KMessageWidget* m_messageWidget;
+ /// A bar shown at the top of the view to signify that selection mode is currently active.
+ SelectionModeTopBar *m_selectionModeTopBar;
+
DolphinView* m_view;
FilterBar* m_filterBar;
+ /// A bar shown at the bottom of the view whose contents depend on what the user is currently doing.
+ SelectionModeBottomBar *m_selectionModeBottomBar;
+
DolphinStatusBar* m_statusBar;
QTimer* m_statusBarTimer; // Triggers a delayed update
QElapsedTimer m_statusBarTimestamp; // Time in ms since last update