From 98d01c5e23e9f9dc6b6a1071e4c6e6bd740dbab3 Mon Sep 17 00:00:00 2001 From: Rafael Fernández López Date: Fri, 6 Jul 2007 17:41:04 +0000 Subject: Make KListView capable of drawing categories on our own way. This make things easier when we are trying to customize it. We can also benefit from KStyle if some day it supports category drawing. KListView keyboard navigation. Tricier than I thought. Pending renaming to KCategorizedView. Seems a good name. svn path=/trunk/KDE/kdebase/apps/; revision=684478 --- src/klistview.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/klistview.h') diff --git a/src/klistview.h b/src/klistview.h index 6626db3d5..57a414c2f 100644 --- a/src/klistview.h +++ b/src/klistview.h @@ -27,6 +27,17 @@ class KItemCategorizer; +/** + * @short Item view for listing items + * + * KListView allows you to use it as it were a QListView. You can add an + * itemCategorizer to it, so your items became categorized depending on the + * KItemCategorizer inherited class rules. + * + * @see KItemCategorizer, KSortFilterProxyModel + * + * @author Rafael Fernández López + */ class LIBDOLPHINPRIVATE_EXPORT KListView : public QListView { @@ -41,8 +52,15 @@ public: virtual QRect visualRect(const QModelIndex &index) const; + /** + * Will return the current categorizer. If none set, this method will + * return 0 + */ KItemCategorizer *itemCategorizer() const; + /** + * Sets the categorizer to be used. Causes the item view to repaint + */ void setItemCategorizer(KItemCategorizer *itemCategorizer); virtual QModelIndex indexAt(const QPoint &point) const; -- cgit v1.3