QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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.
 
virtual QStringList columns () const =0
 Returns the list of columns in the table.
 
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)
 
virtual bool searchableColumn (int column) const
 Returns if the column should be searchable at the given index.
 
virtual void setSql (const QModelIndex &index, const QString &sql)=0
 Sets an sql statement that belongs to a cell specified by a model index.
 

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 33 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 44 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: