#include <tasksetmodel.h>
|
| QAction * | actionFromIndex (const QModelIndex &index) |
| |
| QVector< QAction * > | actions () |
| |
| void | addAction (QAction *action) |
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| | TasksetModel (QObject *parent=0) |
| |
| | ~TasksetModel () override |
| |
Definition at line 15 of file tasksetmodel.h.
◆ TasksetModel()
| TasksetModel::TasksetModel |
( |
QObject * | parent = 0 | ) |
|
◆ ~TasksetModel()
| TasksetModel::~TasksetModel |
( |
| ) |
|
|
override |
◆ actionFromIndex()
| QAction * TasksetModel::actionFromIndex |
( |
const QModelIndex & | index | ) |
|
Definition at line 77 of file tasksetmodel.cpp.
78{
79 if(index.isValid()) {
81 }
82 return 0;
83}
QVector< QAction * > m_actions
References m_actions.
◆ actions()
| QVector< QAction * > TasksetModel::actions |
( |
| ) |
|
◆ addAction()
| void TasksetModel::addAction |
( |
QAction * | action | ) |
|
◆ clear
| void TasksetModel::clear |
( |
| ) |
|
|
slot |
◆ columnCount()
| int TasksetModel::columnCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ data()
| QVariant TasksetModel::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Definition at line 21 of file tasksetmodel.cpp.
22{
23 if (index.isValid()) {
24
25 switch (role) {
26 case Qt::DisplayRole:
27 {
28 return m_actions.at(index.row())->iconText();
29 }
30 case Qt::DecorationRole:
31 {
32 const QIcon icon =
m_actions.at(index.row())->icon();
33 if (icon.isNull()) {
35 }
36 return icon;
37 }
38 }
39 }
40 return QVariant();
41}
QIcon loadIcon(const QString &name)
References KisIconUtils::loadIcon(), and m_actions.
◆ flags()
| Qt::ItemFlags TasksetModel::flags |
( |
const QModelIndex & | index | ) |
const |
|
override |
Definition at line 59 of file tasksetmodel.cpp.
60{
61 Qt::ItemFlags
flags = Qt::ItemIsEnabled;
63}
Qt::ItemFlags flags(const QModelIndex &index) const override
References flags().
◆ headerData()
| QVariant TasksetModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
◆ rowCount()
| int TasksetModel::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ m_actions
| QVector<QAction*> TasksetModel::m_actions |
|
private |
The documentation for this class was generated from the following files: