pqIconListModel is a model for list of icons.
More...
#include <pqIconListModel.h>
Inherits QAbstractListModel.
pqIconListModel is a model for list of icons.
Icons may have different origins like application resources or user directory. Supported file format are defined based on the file extension.
Definition at line 22 of file pqIconListModel.h.
◆ IconRoles
◆ pqIconListModel()
pqIconListModel::pqIconListModel |
( |
QObject * |
parent | ) |
|
◆ ~pqIconListModel()
pqIconListModel::~pqIconListModel |
( |
| ) |
|
|
override |
◆ rowCount()
int pqIconListModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Returns the number of icons.
◆ data()
QVariant pqIconListModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ insertRows()
bool pqIconListModel::insertRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ addIcons()
◆ addIcon()
void pqIconListModel::addIcon |
( |
const QFileInfo & |
iconInfo | ) |
|
Add a single icon in the model.
◆ clearAll()
void pqIconListModel::clearAll |
( |
| ) |
|
Clear the model: remove all icons items.
◆ getSupportedIconFormats()
static QStringList pqIconListModel::getSupportedIconFormats |
( |
| ) |
|
|
inlinestatic |
Returns the list of file extensions that can be used for icons.
Definition at line 71 of file pqIconListModel.h.
◆ getAvailableOrigins()
static QMap<QString, QString> pqIconListModel::getAvailableOrigins |
( |
| ) |
|
|
inlinestatic |
Returns available extensions as a map of {name: display name}.
Definition at line 80 of file pqIconListModel.h.
◆ isUserDefined()
static bool pqIconListModel::isUserDefined |
( |
const QModelIndex & |
index | ) |
|
|
static |
Returns true if index matches a user defined icon.
The documentation for this class was generated from the following file: