┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-03-25 23:57:51 +0200
committerPeter Penz <[email protected]>2012-03-26 00:00:12 +0200
commitb7f0091733ec558ced0eacf0708c0146e3961bb3 (patch)
tree47cff440872d820d77003d2099f889b470451c1b /src/kitemviews/kitemlistview.h
parente70c2f8aa472c01433f9416c363c698677c5b45f (diff)
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.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h18
1 files changed, 12 insertions, 6 deletions
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<QByteArray, qreal> 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
@@ -525,6 +522,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<QByteArray, qreal> preferredColumnWidths(const KItemRangeList& itemRanges) const;
+
+ /**
* Applies the column-widths from m_headerWidget to the layout
* of the view.
*/