From 5b015f037c934563ae316b76d2c84cfb1b912f94 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 2 Oct 2011 16:42:26 +0200 Subject: Fix layout when the header has been adjusted by the user --- src/kitemviews/kitemlistview.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/kitemviews/kitemlistview.h') diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 3ddfabde6..47de53e20 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -100,13 +100,6 @@ public: void setAutoScroll(bool enabled); bool autoScroll() const; - /** - * Turns on the header if \p show is true. Per default the - * header is not shown. - */ - void setHeaderShown(bool show); - bool isHeaderShown() const; - /** * @return Controller of the item-list. The controller gets * initialized by KItemListController::setView() and will @@ -328,12 +321,6 @@ private: */ void updateWidgetProperties(KItemListWidget* widget, int index); - /** - * Updates the width of the KItemListHeader corresponding to the required width of - * the roles. - */ - void updateHeaderWidth(); - /** * @return The widths of each visible role that is shown in the KItemListHeader. */ @@ -359,6 +346,22 @@ private: */ void updateStretchedVisibleRolesSizes(); + /** + * Turns on the header if \p show is true. Per default the + * header is not shown. + */ + void setHeaderShown(bool show); + + /** + * @return Sum of the widths of all visible roles. + */ + qreal visibleRolesSizesWidthSum() const; + + /** + * @return Sum of the heights of all visible roles. + */ + qreal visibleRolesSizesHeightSum() const; + /** * Helper function for triggerAutoScrolling(). * @param pos Logical position of the mouse relative to the range. -- cgit v1.3