diff options
Diffstat (limited to 'src/kitemviews/kitemlistgroupheader.h')
| -rw-r--r-- | src/kitemviews/kitemlistgroupheader.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistgroupheader.h b/src/kitemviews/kitemlistgroupheader.h index 5ddf20896..c996a4870 100644 --- a/src/kitemviews/kitemlistgroupheader.h +++ b/src/kitemviews/kitemlistgroupheader.h @@ -62,6 +62,9 @@ public: void setScrollOrientation(Qt::Orientation orientation); Qt::Orientation scrollOrientation() const; + void setItemIndex(int index); + int itemIndex() const; + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); protected: @@ -95,19 +98,29 @@ protected: */ virtual void scrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous); + /** + * Is called after the item index has been changed and allows the derived class to react on + * this change. + */ + virtual void itemIndexChanged(int current, int previous); + /** @reimp */ virtual void resizeEvent(QGraphicsSceneResizeEvent* event); private: void updateCache(); + static QColor mixedColor(const QColor& c1, const QColor& c2, int c1Percent = 50); + private: bool m_dirtyCache; QByteArray m_role; QVariant m_data; KItemListStyleOption m_styleOption; Qt::Orientation m_scrollOrientation; + int m_itemIndex; + QColor m_lineColor; QColor m_roleColor; QRectF m_roleBounds; }; |
