X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/c288a48fdc591bf047e2d66f089bde557d948657..2e588733c759cccd2d86e34a3a394b9a8ab0c800:/src/views/dolphinview.h diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index d1ecf74ba..2ecd75957 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -23,6 +23,8 @@ #include #include +#include + typedef KIO::FileUndoManager::CommandType CommandType; class QVBoxLayout; class DolphinItemListView; @@ -36,6 +38,7 @@ class ViewProperties; class QLabel; class QGraphicsSceneDragDropEvent; class QHelpEvent; +class QProxyStyle; class QRegularExpression; /** @@ -106,8 +109,14 @@ public: * (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, @@ -599,6 +608,13 @@ Q_SIGNALS: */ 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. */ @@ -916,6 +932,9 @@ private: QLabel* m_placeholderLabel; QTimer* m_showLoadingPlaceholderTimer; + /// Used for selection mode. @see setSelectionMode() + std::unique_ptr m_proxyStyle; + // For unit tests friend class TestBase; friend class DolphinDetailsViewTest;