From b7f0091733ec558ced0eacf0708c0146e3961bb3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 25 Mar 2012 23:57:51 +0200 Subject: Internal interface cleanup Let derived classes from KItemListView just implement preferredColumnWidth() for one role of an item instead of returning a hashtable for a given item-range. --- src/kitemviews/kitemlistview.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/kitemviews/kitemlistview.h') diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index a3c2059d1..402692585 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -193,13 +193,10 @@ public: virtual QSizeF itemSizeHint(int index) const; /** - * @param itemRanges Items that must be checked for getting the widths of columns. - * @return The preferred width of the column of each visible role. The width will - * be respected if the width of the item size is <= 0 (see - * KItemListView::setItemSize()). Per default an empty hash - * is returned. + * @return The preferred column-width of the item with the index \a index + * for the given \a role that is shown in the column. */ - virtual QHash preferredColumnWidths(const KItemRangeList& itemRanges) const; + virtual qreal preferredColumnWidth(int index, const QByteArray& role) const; /** * If set to true, items having child-items can be expanded to show the child-items as @@ -524,6 +521,15 @@ private: */ bool useAlternateBackgrounds() const; + /** + * @param itemRanges Items that must be checked for getting the widths of columns. + * @return The preferred width of the column of each visible role. The width will + * be respected if the width of the item size is <= 0 (see + * KItemListView::setItemSize()). Per default an empty hash + * is returned. + */ + QHash preferredColumnWidths(const KItemRangeList& itemRanges) const; + /** * Applies the column-widths from m_headerWidget to the layout * of the view. -- cgit v1.3.1