diff options
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 19 |
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; |
