#include <PythonPluginsModel.h>
|
| int | columnCount (const QModelIndex &) const override |
| |
| QVariant | data (const QModelIndex &, int) const override |
| |
| Qt::ItemFlags | flags (const QModelIndex &) const override |
| |
| QVariant | headerData (int, Qt::Orientation, int) const override |
| |
| QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
| |
| int | rowCount (const QModelIndex &) const override |
| |
| bool | setData (const QModelIndex &, const QVariant &, int) override |
| |
Definition at line 19 of file PythonPluginsModel.h.
◆ Column
◆ PythonPluginsModel()
| PythonPluginsModel::PythonPluginsModel |
( |
QObject * | parent, |
|
|
PythonPluginManager * | pluginManager ) |
Definition at line 18 of file PythonPluginsModel.cpp.
19 : QAbstractTableModel(parent)
21{
22}
PythonPluginManager * m_pluginManager
◆ columnCount()
| int PythonPluginsModel::columnCount |
( |
const QModelIndex & | | ) |
const |
|
overrideprotected |
◆ data()
| QVariant PythonPluginsModel::data |
( |
const QModelIndex & | index, |
|
|
int | role ) const |
|
overrideprotected |
Definition at line 61 of file PythonPluginsModel.cpp.
62{
63 if (
index.isValid()) {
66
67 switch (role) {
68 case Qt::DisplayRole:
69 switch (
index.column()) {
74 default:
75 break;
76 }
77 break;
78 case Qt::CheckStateRole:
81 return checked ? Qt::Checked : Qt::Unchecked;
82 }
83 break;
84 case Qt::ToolTipRole:
85 {
87 if (!error.isEmpty()) {
88 return error;
89 }
90 }
91 break;
92 case Qt::ForegroundRole:
96 }
97 break;
98 default:
99 break;
100 }
101 }
102
103 return QVariant();
104}
const QString & errorReason() const
PythonPlugin * plugin(const QModelIndex &) const
QModelIndex index(int row, int column, const QModelIndex &parent) const override
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
References COL_COMMENT, COl_NAME, PythonPlugin::comment(), PythonPlugin::errorReason(), KColorScheme::foreground(), index(), PythonPlugin::isEnabled(), PythonPlugin::isUnstable(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, PythonPlugin::name(), KColorScheme::NegativeText, plugin(), and KColorScheme::View.
◆ flags()
| Qt::ItemFlags PythonPluginsModel::flags |
( |
const QModelIndex & | index | ) |
const |
|
overrideprotected |
◆ headerData()
| QVariant PythonPluginsModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role ) const |
|
overrideprotected |
Definition at line 46 of file PythonPluginsModel.cpp.
47{
48 if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
49 switch (section) {
51 return i18nc("@title:column", "Name");
53 return i18nc("@title:column", "Comment");
54 default:
55 break;
56 }
57 }
58 return QVariant();
59}
References COL_COMMENT, and COl_NAME.
◆ index()
| QModelIndex PythonPluginsModel::index |
( |
int | row, |
|
|
int | column, |
|
|
const QModelIndex & | parent ) const |
|
overrideprotected |
◆ plugin()
| PythonPlugin * PythonPluginsModel::plugin |
( |
const QModelIndex & | index | ) |
const |
◆ rowCount()
| int PythonPluginsModel::rowCount |
( |
const QModelIndex & | | ) |
const |
|
overrideprotected |
◆ setData()
| bool PythonPluginsModel::setData |
( |
const QModelIndex & | index, |
|
|
const QVariant & | value, |
|
|
int | role ) |
|
overrideprotected |
◆ m_pluginManager
The documentation for this class was generated from the following files: