X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7a593fc92bf28fbdcdec0e241e18ee8ba2ad7334..2b895e7e2bd096e55faa1032ebc6a355a72c2325:/src/kitemviews/kitemlistwidget.h diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index a06bb5c9c..ae99a1f29 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTWIDGET_H #define KITEMLISTWIDGET_H -#include +#include "dolphin_export.h" #include @@ -43,7 +43,7 @@ class QPropertyAnimation; * size for the invisible items must be accessible. KItemListWidgetInformant * provides this information. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidgetInformant +class DOLPHIN_EXPORT KItemListWidgetInformant { public: KItemListWidgetInformant(); @@ -63,7 +63,7 @@ public: * All properties are set by KItemListView, for each property there is a corresponding * virtual protected method that allows to react on property changes. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidget : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListWidget : public QGraphicsWidget { Q_OBJECT @@ -82,7 +82,7 @@ public: * to show the data of the custom model provided by KItemListWidget::data(). * @reimp */ - virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE; void setVisibleRoles(const QList& roles); QList visibleRoles() const; @@ -163,6 +163,11 @@ public: */ virtual QRectF textFocusRect() const; + /** + * @return Rectangle around which a selection box should be drawn if the item is selected. + */ + virtual QRectF selectionRect() const = 0; + /** * @return Rectangle for the selection-toggle that is used to select or deselect an item. * Per default an empty rectangle is returned which means that no selection-toggle @@ -198,7 +203,7 @@ protected: virtual void alternateBackgroundChanged(bool enabled); virtual void siblingsInformationChanged(const QBitArray& current, const QBitArray& previous); virtual void editedRoleChanged(const QByteArray& current, const QByteArray& previous); - virtual void resizeEvent(QGraphicsSceneResizeEvent* event); + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) Q_DECL_OVERRIDE; /** * @return The current opacity of the hover-animation. When implementing a custom painting-code for a hover-state