Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/*
* This file is part of PyKrita, Krita' Python scripting plugin.
*
* SPDX-FileCopyrightText: 2013 Alex Turbov <[email protected]>
* SPDX-FileCopyrightText: 2014-2016 Boudewijn Rempt <[email protected]>
* SPDX-FileCopyrightText: 2017 Jouni Pentikäinen ([email protected])
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KRITA_PYTHONPLUGINSMODEL_H
#define KRITA_PYTHONPLUGINSMODEL_H
#include <QtCore/QAbstractTableModel>
class PythonPluginManager;
class PythonPlugin;
class PythonPluginsModel : public QAbstractTableModel
{
public:
PythonPluginsModel(QObject *parent, PythonPluginManager *pluginManager);
PythonPlugin *plugin(const QModelIndex &) const;
enum Column {
COL_ENABLED,
COL_NAME,
COL_COMMENT,
COL_STATUS,
COLUMN_COUNT
};
protected:
int columnCount(const QModelIndex&) const override;
int rowCount(const QModelIndex&) const override;
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
QVariant headerData(int, Qt::Orientation, int) const override;
QVariant data(const QModelIndex&, int) const override;
Qt::ItemFlags flags(const QModelIndex&) const override;
bool setData(const QModelIndex&, const QVariant&, int) override;
private:
PythonPluginManager *m_pluginManager;
};
#endif //KRITA_PYTHONPLUGINSMODEL_H