┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-02-06 23:26:20 +0100
committerPeter Penz <[email protected]>2012-02-06 23:31:49 +0100
commit5369ee6819a26d9d3f106521c525c03f81a943ce (patch)
treeb6a31372f7fa6cd58aac1c7faeca6d5d96d50e32 /src/kitemviews/kitemlistview.h
parent7af39fb960352e0504153c627db0615d80758ebe (diff)
Group header improvements
- Use a simpler background and colors as suggested by Martin Zilz. This is just an early draft, I need to post some comparison screenshots to Martin for review. - Fixes of some layout issues that have been revealed because of adjusting the group header heights. - More clever animation/no-animation detection when doing listview-property changes in parallel.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index e675df221..50d8908e5 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -202,8 +202,20 @@ public:
*/
void scrollToItem(int index);
+ /**
+ * If several properties of KItemListView are changed synchronously, it is
+ * recommended to encapsulate the calls between beginTransaction() and endTransaction().
+ * This prevents unnecessary and expensive layout-calculations.
+ */
void beginTransaction();
+
+ /**
+ * Counterpart to beginTransaction(). The layout changes will only be animated if
+ * all property changes between beginTransaction() and endTransaction() support
+ * animations.
+ */
void endTransaction();
+
bool isTransactionActive() const;
/**
@@ -469,6 +481,12 @@ private:
bool scrollBarRequired(const QSizeF& size) const;
/**
+ * Applies the height of the group header to the layouter. The height
+ * depends on the used scroll orientation.
+ */
+ void updateGroupHeaderHeight();
+
+ /**
* Helper function for triggerAutoScrolling().
* @param pos Logical position of the mouse relative to the range.
* @param range Range of the visible area.
@@ -484,6 +502,7 @@ private:
bool m_enabledSelectionToggles;
bool m_grouped;
int m_activeTransactions; // Counter for beginTransaction()/endTransaction()
+ LayoutAnimationHint m_endTransactionAnimationHint;
QSizeF m_itemSize;
KItemListController* m_controller;