Qt 5.10 Book Examples
Public Member Functions | List of all members
IntListModel Class Reference

#include <IntListModel.h>

Inheritance diagram for IntListModel:

Public Member Functions

 IntListModel (const QList< int > &list, QObject *pobj=0)
 
QVariant data (const QModelIndex &index, int nRole) const
 
bool setData (const QModelIndex &index, const QVariant &value, int nRole)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant headerData (int nSection, Qt::Orientation orientation, int nRole=Qt::DisplayRole) const
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
bool insertRows (int nRow, int nCount, const QModelIndex &parent=QModelIndex())
 
bool removeRows (int nRow, int nCount, const QModelIndex &parent=QModelIndex())
 

Detailed Description

Definition at line 16 of file IntListModel.h.

Constructor & Destructor Documentation

◆ IntListModel()

IntListModel::IntListModel ( const QList< int > &  list,
QObject *  pobj = 0 
)

Definition at line 15 of file IntListModel.cpp.

Member Function Documentation

◆ data()

QVariant IntListModel::data ( const QModelIndex &  index,
int  nRole 
) const

Definition at line 22 of file IntListModel.cpp.

◆ flags()

Qt::ItemFlags IntListModel::flags ( const QModelIndex &  index) const

Definition at line 74 of file IntListModel.cpp.

◆ headerData()

QVariant IntListModel::headerData ( int  nSection,
Qt::Orientation  orientation,
int  nRole = Qt::DisplayRole 
) const

Definition at line 61 of file IntListModel.cpp.

◆ insertRows()

bool IntListModel::insertRows ( int  nRow,
int  nCount,
const QModelIndex &  parent = QModelIndex() 
)

Definition at line 82 of file IntListModel.cpp.

◆ removeRows()

bool IntListModel::removeRows ( int  nRow,
int  nCount,
const QModelIndex &  parent = QModelIndex() 
)

Definition at line 101 of file IntListModel.cpp.

◆ rowCount()

int IntListModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 50 of file IntListModel.cpp.

◆ setData()

bool IntListModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  nRole 
)

Definition at line 36 of file IntListModel.cpp.


The documentation for this class was generated from the following files: