summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-12-23 05:21:32 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-12-23 05:21:32 (GMT)
commit93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8 (patch)
treed9fcacb3b8daf80e674cbf918df9b89c3f529e9e /src/imports
parent508d52477fe16f3b425e5d3ec65584e86ed939b3 (diff)
downloadQt-93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8.zip
Qt-93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8.tar.gz
Qt-93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8.tar.bz2
More docs for FolderListModel
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp33
1 files changed, 33 insertions, 0 deletions
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;