svn path=/trunk/KDE/kdebase/apps/; revision=649451
return data(index, MountNeededRole).toBool();
}
+KIcon KFilePlacesModel::icon(const QModelIndex &index) const
+{
+ return KIcon(data(index, Qt::DecorationRole).value<QIcon>());
+}
+
+QString KFilePlacesModel::text(const QModelIndex &index) const
+{
+ return data(index, Qt::DisplayRole).toString();
+}
+
QVariant KFilePlacesModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
#include <QAbstractItemModel>
#include <kurl.h>
+#include <kicon.h>
/**
* This class is a list view model. Each entry represents a "place"
KUrl url(const QModelIndex &index) const;
bool mountNeeded(const QModelIndex &index) const;
+ KIcon icon(const QModelIndex &index) const;
+ QString text(const QModelIndex &index) const;
/**
* @brief Get a visible data based on Qt role for the given index.