class KDirModel |
|
|
A model for a KIO-based directory tree. KDirModel implements the QAbstractItemModel interface (for use with Qt's model/view widgets) around the directory listing for one directory or a tree of directories. See also KDirSortFilterProxyModel Author David Faure Based on work by Hamish Rodda and Pascal Letourneau |
|
parent - parent qobject |
|
Reimplemented from QAbstractItemModel . Returns true for empty directories . |
|
Reimplemented from QAbstractItemModel . Returns ColumnCount . |
|
Reimplemented from QAbstractItemModel . |
|
Return the directory lister used by this model. |
|
Reimplemented from QAbstractItemModel . Not implemented yet . |
|
Emitted for each subdirectory that is a parent of a url passed to expandToUrl This allows to asynchronously open a tree view down to a given directory. |
|
Lists subdirectories using fetchMore() as needed until the given url exists in the model. When the model is used by a treeview, call KDirLister.openUrl with the base url of the tree, then the treeview will take care of calling fetchMore() when the user opens directories. However if you want the tree to show a given URL (i.e. open the tree recursively until that URL), call expandToUrl(). Note that this is asynchronous; the necessary listing of subdirectories will take time so the model will not immediately have this url available. The model emits the signal expand() when an index has become available; this can be connected to the treeview in order to let it open that index. url - the url of a subdirectory of the directory model |
|
Reimplemented from QAbstractItemModel . Lists the subdirectory . |
|
Reimplemented from QAbstractItemModel . |
|
Reimplemented from QAbstractItemModel . Returns true for directories . |
|
Reimplemented from QAbstractItemModel . Returns the column titles . |
|
Reimplemented from QAbstractItemModel . O ( 1 ) |
|
Return the index for a given kfileitem. This can be slow. Deprecated use the method that takes a KFileItem by value |
|
Return the index for a given kfileitem. This can be slow. Deprecated use the method that takes a KFileItem by value |
|
Return the index for a given url. This can be slow. |
|
Notify the model that the item at this index has changed. For instance because KMimeTypeResolver called determineMimeType on it. This makes the model emit its dataChanged signal at this index, so that views repaint. Note that for most things (renaming, changing size etc.), KDirLister's signals tell the model already. |
|
Return the fileitem for a given index. This is O(1), i.e. fast. |
|
Reimplemented from QAbstractItemModel . |
|
Reimplemented from QAbstractItemModel . |
|
Reimplemented from QAbstractItemModel . |
|
Reimplemented from QAbstractItemModel . |
|
Call this to set a new icon , e . g . a preview Reimplemented from QAbstractItemModel . |
|
Set the directory lister to use by this model, instead of the default KDirLister created internally. The model takes ownership. |
|
Drops are disabled by default . Set whether dropping onto items should be allowed , and for which kind of item |
|
Reimplemented from QAbstractItemModel . Not implemented . See also KDirSortFilterProxyModel |
ChildCountUnknown | - |
FileItemRole | - | returns the KFileItem for a given index | |
ChildCountRole | - | returns the number of items in a directory , or ChildCountUnknown |
NoDrops | - | ||
DropOnDirectory | - | allow drops on any directory | |
DropOnAnyFile | - | allow drops on any file | |
DropOnLocalExecutable | - | allow drops on local executables , shell scripts and desktop files . Can be used with DropOnDirectory . |
Name | - | ||
Size | - | ||
ModifiedTime | - | ||
Permissions | - | ||
Owner | - | ||
Group | - | ||
Type | - | ||
ColumnCount | - |