┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/klistview.h
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-06-17 15:32:31 +0000
committerRafael Fernández López <[email protected]>2007-06-17 15:32:31 +0000
commit11f0a8c50310ebbcaa93318cb097077482268cdd (patch)
tree06df222f3e7812bea96db8b8c1a40256547ec7b0 /src/klistview.h
parent1c0341958df6d5cea0a2725afb6245ce498422b2 (diff)
New and powerful KListView. Still pending class renaming. There are two
methods that I need to think about it, and boost. Small issues like reloading all data when sorting role suddenly changes. In general terms it will work nice when you sort by name or size. We have to work further when we sort by other roles. Nice times. svn path=/trunk/KDE/kdebase/apps/; revision=676732
Diffstat (limited to 'src/klistview.h')
-rw-r--r--src/klistview.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/klistview.h b/src/klistview.h
index c8bd5215e..ee02b5ff7 100644
--- a/src/klistview.h
+++ b/src/klistview.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __KLISTVIEW_H__
-#define __KLISTVIEW_H__
+#ifndef KLISTVIEW_H
+#define KLISTVIEW_H
#include <QtGui/QListView>
@@ -37,9 +37,9 @@ public:
~KListView();
- void setModel(QAbstractItemModel *model);
+ virtual void setModel(QAbstractItemModel *model);
- QRect visualRect(const QModelIndex &index) const;
+ virtual QRect visualRect(const QModelIndex &index) const;
KItemCategorizer *itemCategorizer() const;
@@ -47,42 +47,41 @@ public:
virtual QModelIndex indexAt(const QPoint &point) const;
- virtual int sizeHintForRow(int row) const;
-
+public Q_SLOTS:
+ virtual void reset();
protected:
- virtual void drawNewCategory(const QString &category,
- const QStyleOptionViewItem &option,
- QPainter *painter);
-
- virtual int categoryHeight(const QStyleOptionViewItem &option) const;
-
virtual void paintEvent(QPaintEvent *event);
+ virtual void resizeEvent(QResizeEvent *event);
+
virtual void setSelection(const QRect &rect,
QItemSelectionModel::SelectionFlags flags);
- virtual void timerEvent(QTimerEvent *event);
+ virtual void mouseMoveEvent(QMouseEvent *event);
+ virtual void mousePressEvent(QMouseEvent *event);
+
+ virtual void mouseReleaseEvent(QMouseEvent *event);
+
+ virtual void leaveEvent(QEvent *event);
protected Q_SLOTS:
virtual void rowsInserted(const QModelIndex &parent,
int start,
int end);
- virtual void rowsAboutToBeRemoved(const QModelIndex &parent,
- int start,
- int end);
-
virtual void rowsInsertedArtifficial(const QModelIndex &parent,
int start,
int end);
- virtual void rowsAboutToBeRemovedArtifficial(const QModelIndex &parent,
- int start,
- int end);
+ virtual void rowsRemoved(const QModelIndex &parent,
+ int start,
+ int end);
+
+ virtual void updateGeometries();
- virtual void itemsLayoutChanged();
+ virtual void slotSortingRoleChanged();
private: