QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsCodedValueTableModel Class Reference

A table model for representing the values in a QgsCodedValue list. More...

#include <qgsfielddomainwidget.h>

Inheritance diagram for QgsCodedValueTableModel:
Inheritance graph
[legend]

Public Member Functions

 QgsCodedValueTableModel (QObject *parent)
 Constructor for QgsCodedValueTableModel, with the specified parent object.
 
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
 
bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
void setValues (const QList< QgsCodedValue > &values)
 Sets the values to show in the model.
 
QList< QgsCodedValuevalues () const
 Returns the values from the model.
 

Detailed Description

A table model for representing the values in a QgsCodedValue list.

Note
Not available in Python bindings
Since
QGIS 3.26

Definition at line 143 of file qgsfielddomainwidget.h.

Constructor & Destructor Documentation

◆ QgsCodedValueTableModel()

QgsCodedValueTableModel::QgsCodedValueTableModel ( QObject *  parent)

Constructor for QgsCodedValueTableModel, with the specified parent object.

Definition at line 178 of file qgsfielddomainwidget.cpp.

Member Function Documentation

◆ columnCount()

int QgsCodedValueTableModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 189 of file qgsfielddomainwidget.cpp.

◆ data()

QVariant QgsCodedValueTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 194 of file qgsfielddomainwidget.cpp.

◆ flags()

Qt::ItemFlags QgsCodedValueTableModel::flags ( const QModelIndex &  index) const
override

Definition at line 261 of file qgsfielddomainwidget.cpp.

◆ headerData()

QVariant QgsCodedValueTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Definition at line 272 of file qgsfielddomainwidget.cpp.

◆ insertRows()

bool QgsCodedValueTableModel::insertRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

Definition at line 304 of file qgsfielddomainwidget.cpp.

◆ removeRows()

bool QgsCodedValueTableModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

Definition at line 318 of file qgsfielddomainwidget.cpp.

◆ rowCount()

int QgsCodedValueTableModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 184 of file qgsfielddomainwidget.cpp.

◆ setData()

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

Definition at line 223 of file qgsfielddomainwidget.cpp.

◆ setValues()

void QgsCodedValueTableModel::setValues ( const QList< QgsCodedValue > &  values)

Sets the values to show in the model.

See also
values()

Definition at line 335 of file qgsfielddomainwidget.cpp.

◆ values()

QList< QgsCodedValue > QgsCodedValueTableModel::values ( ) const
inline

Returns the values from the model.

See also
setValues()

Definition at line 175 of file qgsfielddomainwidget.h.


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