]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontroller.h
If an item is clicked to trigger it, clear the rest of the selection
[dolphin.git] / src / kitemviews / kitemlistcontroller.h
index b8de195eb62eded031c4eb5f51d21572732eb3fe..d0e5f72ec7882b11905462467159cd32320c1f99 100644 (file)
@@ -104,6 +104,15 @@ public:
     void setAutoActivationDelay(int delay);
     int autoActivationDelay() const;
 
+    /**
+     * If set to true, the signals itemActivated() and itemsActivated() are emitted
+     * after a single-click of the left mouse button. If set to false, a double-click
+     * is required. Per default the setting from KGlobalSettings::singleClick() is
+     * used.
+     */
+    void setSingleClickActivation(bool singleClick);
+    bool singleClickActivation() const;
+
     virtual bool showEvent(QShowEvent* event);
     virtual bool hideEvent(QHideEvent* event);
     virtual bool keyPressEvent(QKeyEvent* event);
@@ -249,7 +258,9 @@ private:
     qreal keyboardAnchorPos(int index) const;
 
 private:
+    bool m_singleClickActivation;
     bool m_selectionTogglePressed;
+    bool m_clearSelectionIfItemsAreNotDragged;
     SelectionBehavior m_selectionBehavior;
     KItemModelBase* m_model;
     KItemListView* m_view;