#include <QUrl>
#include <QWidget>
+#include <memory>
+
typedef KIO::FileUndoManager::CommandType CommandType;
class QVBoxLayout;
class DolphinItemListView;
class QLabel;
class QGraphicsSceneDragDropEvent;
class QHelpEvent;
+class QProxyStyle;
class QRegularExpression;
/**
* (GeneralSettings::globalViewProps() returns false), then the
* changed view mode will be stored automatically.
*/
- void setMode(Mode mode);
- Mode mode() const;
+ void setViewMode(Mode mode);
+ Mode viewMode() const;
+
+ /**
+ * Enables or disables a mode for quick and easy selection of items.
+ */
+ void setSelectionModeEnabled(bool enabled);
+ bool selectionMode() const;
/**
* Turns on the file preview for the all files of the current directory,
*/
void goForwardRequested();
+ /**
+ * Used to request either entering or leaving of selection mode
+ * Entering is typically requested on press and hold.
+ * Leaving by pressing Escape when no item is selected.
+ */
+ void selectionModeChangeRequested(bool enabled);
+
/**
* Is emitted when the user wants to move the focus to another view.
*/
QLabel* m_placeholderLabel;
QTimer* m_showLoadingPlaceholderTimer;
+ /// Used for selection mode. @see setSelectionMode()
+ std::unique_ptr<QProxyStyle> m_proxyStyle;
+
// For unit tests
friend class TestBase;
friend class DolphinDetailsViewTest;