Skip to content

Class SubModel

ClassList > SubModel

Inherits the following classes: QAbstractItemModel

Public Properties

Type Name
property bool enabled
property QAbstractItemModel * model
property QModelIndex rootIndex

Public Signals

Type Name
signal void enabledChanged
signal void modelChanged
signal void rootIndexChanged

Public Functions

Type Name
SubModel (QObject * parent=nullptr)
int columnCount (const QModelIndex & parent) override const
QVariant data (const QModelIndex & index, int role) override const
bool enabled () const
QModelIndex index (int row, int column, const QModelIndex & parent) override const
bool isInSubModel (const QModelIndex & sourceIndex) const
QAbstractItemModel * model () const
QModelIndex parent (const QModelIndex & child) override const
QHash< int, QByteArray > roleNames () override const
QModelIndex rootIndex () const
int rowCount (const QModelIndex & parent) override const
bool setData (const QModelIndex & index, const QVariant & value, int role=Qt::EditRole) override
void setEnabled (bool enabled)
void setModel (QAbstractItemModel * model)
void setRootIndex (const QModelIndex & rootIndex)

Public Properties Documentation

property enabled [1/2]

bool SubModel::enabled;

property model [1/2]

QAbstractItemModel * SubModel::model;

property rootIndex [1/2]

QModelIndex SubModel::rootIndex;

Public Signals Documentation

signal enabledChanged

void SubModel::enabledChanged;

signal modelChanged

void SubModel::modelChanged;

signal rootIndexChanged

void SubModel::rootIndexChanged;

Public Functions Documentation

function SubModel

explicit SubModel::SubModel (
    QObject * parent=nullptr
) 

function columnCount

int SubModel::columnCount (
    const QModelIndex & parent
) override const

function data

QVariant SubModel::data (
    const QModelIndex & index,
    int role
) override const

function enabled [2/2]

inline bool SubModel::enabled () const

function index

QModelIndex SubModel::index (
    int row,
    int column,
    const QModelIndex & parent
) override const

function isInSubModel

bool SubModel::isInSubModel (
    const QModelIndex & sourceIndex
) const

function model [2/2]

QAbstractItemModel * SubModel::model () const

function parent

QModelIndex SubModel::parent (
    const QModelIndex & child
) override const

function roleNames

QHash< int, QByteArray > SubModel::roleNames () override const

function rootIndex [2/2]

QModelIndex SubModel::rootIndex () const

function rowCount

int SubModel::rowCount (
    const QModelIndex & parent
) override const

function setData

bool SubModel::setData (
    const QModelIndex & index,
    const QVariant & value,
    int role=Qt::EditRole
) override

function setEnabled

void SubModel::setEnabled (
    bool enabled
) 

function setModel

void SubModel::setModel (
    QAbstractItemModel * model
) 

function setRootIndex

void SubModel::setRootIndex (
    const QModelIndex & rootIndex
) 


The documentation for this class was generated from the following file src/core/submodel.h