From 93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 15:21:32 +1000 Subject: More docs for FolderListModel --- .../qdeclarativefolderlistmodel.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 9c71004..7b05bc5 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -190,6 +190,12 @@ QVariant QDeclarativeFolderListModel::data(const QModelIndex &index, int role) c return rv; } +/*! + \qmlproperty int FolderListModel::count + + Returns the number of items in the current folder that match the + filter criteria. +*/ int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); @@ -225,6 +231,11 @@ void QDeclarativeFolderListModel::setFolder(const QUrl &folder) } } +/*! + \qmlproperty url FolderListModel::parentFolder + + Returns the URL of the parent of of the current \l folder. +*/ QUrl QDeclarativeFolderListModel::parentFolder() const { QString localFile = d->folder.toLocalFile(); @@ -286,6 +297,21 @@ void QDeclarativeFolderListModel::componentComplete() QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection); } +/*! + \qmlproperty enumeration FolderListModel::sortField + + The \a sortField property contains field to use for sorting. sortField + may be one of: + \list + \o Unsorted - no sorting is applied. The order is system default. + \o Name - sort by filename + \o Time - sort by time modified + \o Size - sort by file size + \o Type - sort by file type (extension) + \endlist + + \sa sortReversed +*/ QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const { return d->sortField; @@ -299,6 +325,13 @@ void QDeclarativeFolderListModel::setSortField(SortField field) } } +/*! + \qmlproperty bool FolderListModel::sortReversed + + If set to true, reverses the sort order. The default is false. + + \sa sortField +*/ bool QDeclarativeFolderListModel::sortReversed() const { return d->sortReversed; -- cgit v0.12