]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontroller.h
Compact view: Padding- and margin-improvements for grouped alignments
[dolphin.git] / src / kitemviews / kitemlistcontroller.h
index b8de195eb62eded031c4eb5f51d21572732eb3fe..9ac4c76e664b17751e65de09a61893664f4cd376 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);
@@ -229,16 +238,16 @@ private:
     void updateKeyboardAnchor();
 
     /**
-     * @return Index for the next row based on the current index.
-     *         If there is no next row the current index will be returned.
+     * @return Index for the next row based on \a index.
+     *         If there is no next row \a index will be returned.
      */
-    int nextRowIndex() const;
+    int nextRowIndex(int index) const;
 
     /**
-     * @return Index for the previous row based on the current index.
-     *         If there is no previous row the current index will be returned.
+     * @return Index for the previous row based on  \a index.
+     *         If there is no previous row \a index will be returned.
      */
-    int previousRowIndex() const;
+    int previousRowIndex(int index) const;
 
     /**
      * Helper method for updateKeyboardAnchor(), previousRowIndex() and nextRowIndex().
@@ -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;