class KFileItemDelegate


Module kio
Namespace
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 is a list that can be set by calling setShowInformation(), and read by calling showInformation(). By default this list is empty.

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