┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistviewlayouter_p.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-02-22 18:28:11 +0100
committerPeter Penz <[email protected]>2012-02-22 18:31:03 +0100
commitdbc5fd7a491f95ca4084a113d0f902ea975478fd (patch)
treef9c43d6008e48189f39bd58cd7f0982a5f177065 /src/kitemviews/kitemlistviewlayouter_p.h
parentbdd0fdf2460232fe17b0e54e42fcda4cc18b811a (diff)
Fix alternate backgrounds when enabling grouping
Up to now the alternating backgrounds just have been calculated by checking whether the item index is odd. This does not work well when grouping is enabled: In this case the alternate background color of the first item of a group should stay consistent.
Diffstat (limited to 'src/kitemviews/kitemlistviewlayouter_p.h')
-rw-r--r--src/kitemviews/kitemlistviewlayouter_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistviewlayouter_p.h b/src/kitemviews/kitemlistviewlayouter_p.h
index 017f520fe..0d7c0d040 100644
--- a/src/kitemviews/kitemlistviewlayouter_p.h
+++ b/src/kitemviews/kitemlistviewlayouter_p.h
@@ -139,6 +139,15 @@ public:
void markAsDirty();
+#ifndef QT_NO_DEBUG
+ /**
+ * @return True if the layouter has been marked as dirty and hence has
+ * not called yet doLayout(). Is enabled only in the debugging
+ * mode, as it is not useful to check the dirty state otherwise.
+ */
+ bool isDirty();
+#endif
+
private:
void doLayout();
void updateVisibleIndexes();