]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditemlistwidget.h
"Group by" exists, group sorting rule is separate from sorting rule. Very WIP and...
[dolphin.git] / src / kitemviews / kstandarditemlistwidget.h
index a09f0c7a83090ae384f8d36dcff20c37a0c2fd03..35392b42068551ac7c9a7a19d33f1278db64e70f 100644 (file)
 #include "kitemviews/kitemlistwidget.h"
 
 #include <QPixmap>
+#include <QPointer>
 #include <QPointF>
 #include <QStaticText>
 
 class KItemListRoleEditor;
 class KItemListStyleOption;
 class KItemListView;
+class QVariantAnimation;
 
+/**
+ * @brief standard implementation of the ItemList widget informant for use with KStandardItemListView and KStandardItemModel.
+ *
+ * @see KItemListWidgetInformant
+ */
 class DOLPHIN_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetInformant
 {
 public:
@@ -67,7 +74,9 @@ protected:
 };
 
 /**
- * @brief ItemList widget implementation for KStandardItemListView and KStandardItemModel.
+ * @brief standard implementation of an ItemList widget for KStandardItemListView and KStandardItemModel.
+ *
+ * @see KItemListWidget
  */
 class DOLPHIN_EXPORT KStandardItemListWidget : public KItemListWidget
 {
@@ -80,7 +89,6 @@ public:
     ~KStandardItemListWidget() override;
 
     void setLayout(Layout layout);
-    Layout layout() const;
 
     void setHighlightEntireRow(bool highlightEntireRow);
     bool highlightEntireRow() const;
@@ -97,6 +105,8 @@ public:
     QRectF expansionToggleRect() const override;
     QRectF selectionToggleRect() const override;
     QPixmap createDragPixmap(const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
+    /** @see KItemListWidget::startActivateSoonAnimation() */
+    void startActivateSoonAnimation(int timeUntilActivation) override;
 
     static KItemListWidgetInformant *createInformant();
 
@@ -236,6 +246,9 @@ private:
      */
     static qreal columnPadding(const KItemListStyleOption &option);
 
+    /** @returns whether the usual icon should be shown or not. */
+    bool isIconControlledByActivateSoonAnimation() const;
+
 protected:
     QHash<QByteArray, TextInfo *> m_textInfo; // PlacesItemListWidget needs to access this
 
@@ -276,6 +289,9 @@ private:
     KItemListRoleEditor *m_roleEditor;
     KItemListRoleEditor *m_oldRoleEditor;
 
+    /** @see startActivateSoonAnimation() */
+    QPointer<QVariantAnimation> m_activateSoonAnimation;
+
     friend class KStandardItemListWidgetInformant; // Accesses private static methods to be able to
                                                    // share a common layout calculation
 };