KIO
kdirmodel.h
29 * Note that there are some cases when using QPersistentModelIndexes from this model will not give
30 * expected results. QPersistentIndexes will remain valid and updated if its siblings are added or
31 * removed. However, if the QPersistentIndex or one of its ancestors is moved, the QPersistentIndex will become
32 * invalid. For example, if a file or directory is renamed after storing a QPersistentModelIndex for it,
33 * the index (along with any stored children) will become invalid even though it is still in the model. The reason
34 * for this is that moves of files and directories are treated as separate insert and remove actions.
73 * Apart from the support for the ShowRoot flag, this is equivalent to dirLister()->openUrl(url, flags)
75 * Unless ShowRoot is set, the item for this directory will NOT be shown, the model starts at its children.
82 * Set the directory lister to use by this model, instead of the default KDirLister created internally.
108 * @short Lists subdirectories using fetchMore() as needed until the given @p url exists in the model.
112 * However if you want the tree to show a given URL (i.e. open the tree recursively until that URL),
126 * Note that for most things (renaming, changing size etc.), KDirLister's signals tell the model already.
160 FileItemRole = 0x07A263FF, ///< returns the KFileItem for a given index. roleName is "fileItem".
161 ChildCountRole = 0x2C4D0A40, ///< returns the number of items in a directory, or ChildCountUnknown. roleName is "childCount".
162 HasJobRole = 0x01E555A5, ///< returns whether or not there is a job on an item (file/directory). roleName is "hasJob".
172 DropOnLocalExecutable = 4, ///< allow drops on local executables, shell scripts and desktop files. Can be used with DropOnDirectory.
191 bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
199 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
201 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
214 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
225 * For example, for a list of "/home/foo/a", "/home/foo/a/a.txt", "/home/foo/a/a/a.txt", "/home/foo/a/b/b.txt",
239 * @param sequenceIndex Index in the sequence. If it is zero, the standard icon will be assigned.
Subclass of KCoreDirLister which uses QWidgets to show error messages and to associate jobs with wind...
Definition kdirlister.h:25
void expand(const QModelIndex &index)
Emitted for each subdirectory that is a parent of a url passed to expandToUrl This allows to asynchro...
void needSequenceIcon(const QModelIndex &index, int sequenceIndex)
Emitted when another icon sequence index is requested.
virtual bool canFetchMore(const QModelIndex &parent) const const
virtual int columnCount(const QModelIndex &parent) const const=0
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual void fetchMore(const QModelIndex &parent)
virtual Qt::ItemFlags flags(const QModelIndex &index) const const
virtual bool hasChildren(const QModelIndex &parent) const const
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual bool insertColumns(int column, int count, const QModelIndex &parent)
virtual bool insertRows(int row, int count, const QModelIndex &parent)
virtual QMimeData * mimeData(const QModelIndexList &indexes) const const
virtual QStringList mimeTypes() const const
virtual bool removeColumns(int column, int count, const QModelIndex &parent)
virtual bool removeRows(int row, int count, const QModelIndex &parent)
virtual QHash< int, QByteArray > roleNames() const const
virtual int rowCount(const QModelIndex &parent) const const=0
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
virtual QModelIndex sibling(int row, int column, const QModelIndex &index) const const
virtual void sort(int column, Qt::SortOrder order)
virtual Qt::DropActions supportedDropActions() const const
Q_FLAG(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
DropAction
DisplayRole
typedef ItemFlags
Orientation
SortOrder
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.