class KFileItemDelegate


Table of contents
Modules
kio Classes
All Classes
Module kio
Namespace global
Class KFileItemDelegate
Inherits QAbstractItemDelegate

KFileItemDelegate is intended to be used to provide a KDE file system view, when using one of the standard item views in Qt with KDirModel.

While primarily intended to be used with KDirModel, it uses Qt.DecorationRole and Qt.DisplayRole for the icons and text labels, just like QItemDelegate, and can thus be used with any standard model.

When used with KDirModel however, KFileItemDelegate can change the way the display and/or decoration roles are drawn, based on properties of the file items. For example, if the file item is a symbolic link, it will use an italic font to draw the file name.

KFileItemDelegate also supports showing additional information about the file items below the icon labels.

Which information should be shown, if any, is controlled by the information property, which can be set by calling setAdditionalInformation(), and read by calling additionalInformation(). The default value for this property is NoInformation.

To use KFileItemDelegate, instantiate an object from the delegate, and call setItemDelegate() in one of the standard item views in Qt:

QListView *listview = new QListView(this);
KFileItemDelegate *delegate = new KFileItemDelegate(this);
listview->setItemDelegate(delegate);



enums

enum details

methods