48 #ifndef QT_NO_DIRMODEL 61 QDir::SortFlags flags = 0;
256 #if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN) 262 localFile = dir.
path();
515 #endif // QT_NO_DIRMODEL The QVariant class acts like a union for the most common Qt data types.
The QDir class provides access to directory structures and their contents.
QDir::Filters filter() const
Returns the filter specification for the directory model.
QDeclarativeFolderListModel::SortField sortField
QDeclarativeFolderListModelPrivate * d
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
void handleDataChanged(const QModelIndex &start, const QModelIndex &end)
#define QT_END_NAMESPACE
This macro expands to.
void inserted(const QModelIndex &index, int start, int end)
void setFolder(const QUrl &folder)
void setPath(const QString &path)
Sets the path of the directory to path.
void setNameFilters(const QStringList &filters)
Q_INVOKABLE bool isFolder(int index) const
[prop funcs]
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QAbstractListModel class provides an abstract model that can be subclassed to create one-dimensio...
int rowCount(const QModelIndex &parent) const
Returns the number of rows under the given parent.
void endInsertRows()
Ends a row insertion operation.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
void setShowDotAndDotDot(bool)
static QString currentPath()
Returns the absolute path of the application's current directory.
The QObject class is the base class of all Qt objects.
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
bool exists() const
Returns true if the directory exists; otherwise returns false.
QModelIndex index(int row, int column=0, const QModelIndex &parent=QModelIndex()) const
Returns the index of the data in row and column with parent.
void setSortField(SortField field)
QString path() const
Returns the path of the URL.
bool cdUp()
Changes directory by moving one directory up from the QDir's current directory.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool showOnlyReadable() const
void setSortReversed(bool rev)
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int row() const
Returns the row this model index refers to.
The QStringList class provides a list of strings.
virtual void classBegin()
[isfolder]
bool sortReversed() const
bool showDotAndDotDot() const
QDeclarativeFolderListModel(QObject *parent=0)
[class props]
void setFilter(QDir::Filters filters)
Sets the directory model's filter to that specified by filters.
void endRemoveRows()
Ends a row removal operation.
void layoutChanged()
This signal is emitted whenever the layout of items exposed by the model has changed; for example...
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
void setSorting(QDir::SortFlags sort)
Sets the directory model's sorting order to that specified by sort.
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
bool isDir(const QModelIndex &index) const
Returns true if the model item index represents a directory; otherwise returns false.
~QDeclarativeFolderListModel()
QUrl parentFolder() const
static const char *const filters[3]
QVariant data(const QModelIndex &index, int role) const
Returns the data stored under the given role for the item referred to by the index.
void rowsInserted(const QModelIndex &parent, int first, int last)
This signal is emitted after rows have been inserted into the model.
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QObject * parent() const
Returns a pointer to the parent object.
void beginRemoveRows(const QModelIndex &parent, int first, int last)
Begins a row removal operation.
The QModelIndex class is used to locate data in a data model.
void modelReset()
This signal is emitted when reset() is called, after the model's internal state (e.
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
This signal is emitted whenever the data in an existing item changes.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Returns the model item index for the item in the parent with the given row and column.
SortField sortField() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Returns the data for the model item index with the given role.
void setNameFilters(const QStringList &filters)
Sets the name filters for the directory model.
virtual void componentComplete()
Invoked after the root component that caused this instantiation has completed construction.
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
void setRoleNames(const QHash< int, QByteArray > &roleNames)
Sets the model's role names to roleNames.
QString path() const
Returns the path.
void setShowOnlyReadable(bool)
static const KeyPair *const end
bool isRoot() const
Returns true if the directory is the root directory; otherwise returns false.
void folderChanged()
[parserstatus]
void rowsRemoved(const QModelIndex &parent, int first, int last)
This signal is emitted after rows have been removed from the model.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows in the parent model item.
The QDirModel class provides a data model for the local filesystem.
QDeclarativeFolderListModelPrivate()
QUrl folder() const
[count]
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
void removed(const QModelIndex &index, int start, int end)
void beginInsertRows(const QModelIndex &parent, int first, int last)
Begins a row insertion operation.
QStringList nameFilters() const