mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-17 00:09:36 -04:00
Store rows in the model, remove rewind and random access from query result class. This implementation is way simpler but the (forward) iterator can be used only once. I'm still convinced that the old implementation was better and more flexible but I need to move forward. Client code will need to store the results from the iterator.
61 lines
1.9 KiB
Plaintext
61 lines
1.9 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsqueryresultmodel.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsQueryResultModel : QAbstractListModel
|
|
{
|
|
%Docstring
|
|
The QgsQueryResultModel class is a model for QgsAbstractDatabaseProviderConnection.QueryResult
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsqueryresultmodel.h"
|
|
%End
|
|
public:
|
|
|
|
QgsQueryResultModel( const QgsAbstractDatabaseProviderConnection::QueryResult &queryResult, QObject *parent = 0 );
|
|
%Docstring
|
|
Constructs a QgsQueryResultModel from a ``queryResult`` with optional ``parent``
|
|
%End
|
|
|
|
~QgsQueryResultModel();
|
|
|
|
public:
|
|
|
|
virtual int rowCount( const QModelIndex &parent ) const;
|
|
|
|
virtual int columnCount( const QModelIndex &parent ) const;
|
|
|
|
virtual QVariant data( const QModelIndex &index, int role ) const;
|
|
|
|
|
|
public slots:
|
|
|
|
void rowsReady( const QList<QList<QVariant> > &rows );
|
|
%Docstring
|
|
Triggered when ``newRows`` have been fetched and can be added to the model
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsqueryresultmodel.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|