QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | List of all members
QgsAbstractDbTableModel Class Referenceabstract

The QgsAbstractDbTableModel class is a pure virtual model class for results in a database source widget selector. More...

#include <qgsabstractdbtablemodel.h>

Inheritance diagram for QgsAbstractDbTableModel:
Inheritance graph
[legend]

Public Member Functions

 QgsAbstractDbTableModel (QObject *parent=nullptr)
 Constructor. More...
 
virtual QStringList columns () const =0
 Returns the list of columns in the table. More...
 
virtual int defaultSearchColumn () const =0
 Returns the index of the column used by default to filter the results (probably the table name column if it exists) More...
 
virtual bool searchableColumn (int column) const
 Returns if the column should be searchable at the given index. More...
 
virtual void setSql (const QModelIndex &index, const QString &sql)=0
 Sets an sql statement that belongs to a cell specified by a model index. More...
 

Detailed Description

The QgsAbstractDbTableModel class is a pure virtual model class for results in a database source widget selector.

Since
QGIS 3.24

Definition at line 28 of file qgsabstractdbtablemodel.h.

Constructor & Destructor Documentation

◆ QgsAbstractDbTableModel()

QgsAbstractDbTableModel::QgsAbstractDbTableModel ( QObject *  parent = nullptr)
inlineexplicit

Constructor.

Definition at line 46 of file qgsabstractdbtablemodel.h.

Member Function Documentation

◆ columns()

virtual QStringList QgsAbstractDbTableModel::columns ( ) const
pure virtual

Returns the list of columns in the table.

◆ defaultSearchColumn()

virtual int QgsAbstractDbTableModel::defaultSearchColumn ( ) const
pure virtual

Returns the index of the column used by default to filter the results (probably the table name column if it exists)

◆ searchableColumn()

virtual bool QgsAbstractDbTableModel::searchableColumn ( int  column) const
inlinevirtual

Returns if the column should be searchable at the given index.

Definition at line 57 of file qgsabstractdbtablemodel.h.

◆ setSql()

virtual void QgsAbstractDbTableModel::setSql ( const QModelIndex &  index,
const QString &  sql 
)
pure virtual

Sets an sql statement that belongs to a cell specified by a model index.


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