]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistselectiontoggle.h
Merge branch 'Applications/16.04'
[dolphin.git] / src / kitemviews / private / kitemlistselectiontoggle.h
index a8050d811f23ebfcafa5ff8fa8b8e14f40b60837..d058ee988d5db97e7aa9e982a75ab7c4e3309b19 100644 (file)
 #ifndef KITEMLISTSELECTIONTOGGLE_H
 #define KITEMLISTSELECTIONTOGGLE_H
 
-#include <libdolphin_export.h>
+#include "dolphin_export.h"
 
 #include <QGraphicsWidget>
 #include <QPixmap>
 
-class QPropertyAnimation;
 
 /**
  * @brief Allows to toggle between the selected and unselected state of an item.
  */
-class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionToggle : public QGraphicsWidget
+class DOLPHIN_EXPORT KItemListSelectionToggle : public QGraphicsWidget
 {
     Q_OBJECT
 
@@ -41,14 +40,16 @@ public:
     void setChecked(bool checked);
     bool isChecked() const;
 
+    void setHovered(bool hovered);
+
     virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
 
 protected:
-    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
-    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
+    virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
 
 private:
     void updatePixmap();
+    int iconSize() const;
 
 private:
     bool m_checked;