]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontroller.h
[Places Panel] Make use of KFilePlacesView::dragAutoActivationDelay
[dolphin.git] / src / kitemviews / kitemlistcontroller.h
index eb6d85e8a6b734c0976346c4652b661c7db4584f..5fe195e9f490b7411b592f2cebd01f9c79332c9c 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef KITEMLISTCONTROLLER_H
 #define KITEMLISTCONTROLLER_H
 
+#include <optional>
+
 #include "dolphin_export.h"
 #include "kitemset.h"
 
@@ -32,6 +34,7 @@ class QInputMethodEvent;
 class QKeyEvent;
 class QTapGesture;
 class QTransform;
+class QTouchEvent;
 
 /**
  * @brief Controls the view, model and selection of an item-list.
@@ -125,7 +128,7 @@ public:
 
     bool processEvent(QEvent* event, const QTransform& transform);
 
-signals:
+Q_SIGNALS:
     /**
      * Is emitted if exactly one item has been activated by e.g. a mouse-click
      * or by pressing Return/Enter.
@@ -136,7 +139,7 @@ signals:
      * Is emitted if more than one item has been activated by pressing Return/Enter
      * when having a selection.
      */
-    void itemsActivated(const KItemSetindexes);
+    void itemsActivated(const KItemSet &indexes);
 
     void itemMiddleClicked(int index);
 
@@ -216,10 +219,10 @@ signals:
     void decreaseZoom();
     void swipeUp();
 
-public slots:
+public Q_SLOTS:
     void slotStateChanged(QScroller::State newState);
 
-private slots:
+private Q_SLOTS:
     void slotViewScrollOffsetChanged(qreal current, qreal previous);
 
     /**
@@ -301,7 +304,7 @@ private:
     bool wheelEvent(QGraphicsSceneWheelEvent* event, const QTransform& transform);
     bool resizeEvent(QGraphicsSceneResizeEvent* event, const QTransform& transform);
     bool gestureEvent(QGestureEvent* event, const QTransform& transform);
-    bool touchBeginEvent(QGestureEvent* event, const QTransform& transform);
+    bool touchBeginEvent(QTouchEvent* event, const QTransform& transform);
     void tapTriggered(QTapGesture* tap, const QTransform& transform);
     void tapAndHoldTriggered(QGestureEvent* event, const QTransform& transform);
     void pinchTriggered(QGestureEvent* event, const QTransform& transform);
@@ -328,7 +331,7 @@ private:
     KItemListView* m_view;
     KItemListSelectionManager* m_selectionManager;
     KItemListKeyboardSearchManager* m_keyboardManager;
-    int m_pressedIndex;
+    std::optional<int> m_pressedIndex;
     QPointF m_pressedMousePos;
 
     QTimer* m_autoActivationTimer;