#ifndef KITEMLISTSELECTIONTOGGLE_H
#define KITEMLISTSELECTIONTOGGLE_H
-#include <libdolphin_export.h>
+#include "libdolphin_export.h"
#include <QGraphicsWidget>
#include <QPixmap>
-class QPropertyAnimation;
/**
* @brief Allows to toggle between the selected and unselected state of an item.
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;