Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeFolderListModelPrivate Class Reference

[code] More...

Public Functions

 QDeclarativeFolderListModelPrivate ()
 
void updateSorting ()
 

Public Variables

int count
 
QUrl folder
 
QModelIndex folderIndex
 
QDirModel model
 
QStringList nameFilters
 
QDeclarativeFolderListModel::SortField sortField
 
bool sortReversed
 

Detailed Description

[code]

Definition at line 52 of file qdeclarativefolderlistmodel.cpp.

Constructors and Destructors

◆ QDeclarativeFolderListModelPrivate()

QDeclarativeFolderListModelPrivate::QDeclarativeFolderListModelPrivate ( )
inline

Functions

◆ updateSorting()

void QDeclarativeFolderListModelPrivate::updateSorting ( )
inline

Definition at line 60 of file qdeclarativefolderlistmodel.cpp.

Referenced by QDeclarativeFolderListModel::setSortField(), and QDeclarativeFolderListModel::setSortReversed().

60  {
61  QDir::SortFlags flags = 0;
62  switch(sortField) {
64  flags |= QDir::Unsorted;
65  break;
67  flags |= QDir::Name;
68  break;
70  flags |= QDir::Time;
71  break;
73  flags |= QDir::Size;
74  break;
76  flags |= QDir::Type;
77  break;
78  }
79 
80  if (sortReversed)
81  flags |= QDir::Reversed;
82 
83  model.setSorting(flags);
84  }
QDeclarativeFolderListModel::SortField sortField
void setSorting(QDir::SortFlags sort)
Sets the directory model's sorting order to that specified by sort.
Definition: qdirmodel.cpp:724

Properties

◆ count

int QDeclarativeFolderListModelPrivate::count

◆ folder

QUrl QDeclarativeFolderListModelPrivate::folder

◆ folderIndex

QModelIndex QDeclarativeFolderListModelPrivate::folderIndex

◆ model

QDirModel QDeclarativeFolderListModelPrivate::model

◆ nameFilters

QStringList QDeclarativeFolderListModelPrivate::nameFilters

◆ sortField

QDeclarativeFolderListModel::SortField QDeclarativeFolderListModelPrivate::sortField

◆ sortReversed

bool QDeclarativeFolderListModelPrivate::sortReversed

The documentation for this class was generated from the following file: