4 #ifndef pqIconListModel_h 5 #define pqIconListModel_h 9 #include <QAbstractListModel> 25 typedef QAbstractListModel Superclass;
33 PathRole = Qt::UserRole + 1,
40 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
45 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
50 bool insertRows(
int row,
int count,
const QModelIndex& parent = QModelIndex())
override;
60 void addIcon(
const QFileInfo& iconInfo);
73 return QStringList() <<
".svg" 82 QMap<QString, QString> origins;
83 origins[
"Resources"] = tr(
"Application resources");
84 origins[
"UserDefined"] = tr(
"User icons");
91 static bool isUserDefined(
const QModelIndex&
index);
95 std::unique_ptr<pqInternal> Internal;
QList< QFileInfo > QFileInfoList
static QMap< QString, QString > getAvailableOrigins()
Returns available extensions as a map of {name: display name}.
pqIconListModel is a model for list of icons.
static QStringList getSupportedIconFormats()
Returns the list of file extensions that can be used for icons.