From 0b8d83230e6b461d0e32f467e360b31d6d75e296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Thu, 19 Aug 2010 23:47:48 +0200 Subject: Bookmarks panel code clean-up --- src/bookmarks/bookmarkstreemodel.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/bookmarks/bookmarkstreemodel.h') diff --git a/src/bookmarks/bookmarkstreemodel.h b/src/bookmarks/bookmarkstreemodel.h index c509840b..0f115272 100644 --- a/src/bookmarks/bookmarkstreemodel.h +++ b/src/bookmarks/bookmarkstreemodel.h @@ -36,7 +36,7 @@ #include // Qt Includes -#include +#include class BtmItem { @@ -66,22 +66,33 @@ class REKONQ_TESTS_EXPORT BookmarksTreeModel : public QAbstractItemModel public: explicit BookmarksTreeModel(QObject *parent = 0); - ~BookmarksTreeModel(); + virtual ~BookmarksTreeModel(); + /** + * @return number of rows under the given parent. + */ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; + /** + * @return number of columns (always 1). + */ virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; - virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; virtual Qt::ItemFlags flags(const QModelIndex &index) const; + /** + * @return index in the model specified by the given row, column and parent. + */ virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + /** + * @return parent of the given index. + */ virtual QModelIndex parent(const QModelIndex &index) const; virtual QVariant data(const QModelIndex &index, int role) const; virtual QStringList mimeTypes() const; - virtual bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent); + virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); virtual Qt::DropActions supportedDropActions() const; - virtual QMimeData *mimeData(const QModelIndexList & indexes) const; + virtual QMimeData *mimeData(const QModelIndexList &indexes) const; private slots: void bookmarksChanged(const QString &groupAddress); -- cgit v1.2.1