mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			108 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			108 lines
		
	
	
		
			2.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 : QAbstractTableModel
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
The :py:class:`QgsQueryResultModel` class is a model for :py:class:`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;
 | 
						|
 | 
						|
    virtual QVariant headerData( int section, Qt::Orientation orientation, int role ) const;
 | 
						|
 | 
						|
 | 
						|
    virtual void fetchMore( const QModelIndex &parent );
 | 
						|
 | 
						|
    virtual bool canFetchMore( const QModelIndex &parent ) const;
 | 
						|
 | 
						|
 | 
						|
    QStringList columns() const;
 | 
						|
%Docstring
 | 
						|
Returns the column names
 | 
						|
%End
 | 
						|
 | 
						|
    QgsAbstractDatabaseProviderConnection::QueryResult queryResult() const;
 | 
						|
%Docstring
 | 
						|
Returns the query result
 | 
						|
 | 
						|
.. versionadded:: 3.22
 | 
						|
%End
 | 
						|
 | 
						|
  public slots:
 | 
						|
 | 
						|
    void rowsReady( const QList<QList<QVariant> > &rows );
 | 
						|
%Docstring
 | 
						|
Triggered when ``newRows`` have been fetched and can be added to the model.
 | 
						|
%End
 | 
						|
 | 
						|
    void cancel();
 | 
						|
%Docstring
 | 
						|
Cancels the row fetching.
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
    void fetchingComplete();
 | 
						|
%Docstring
 | 
						|
Emitted when rows have been fetched (all of them or a batch if `maxRows` was passed to :py:func:`~QgsQueryResultModel.fetchMoreRows` )
 | 
						|
or when the fetching has been stopped (canceled).
 | 
						|
 | 
						|
.. seealso:: :py:func:`fetchMoreRows`
 | 
						|
%End
 | 
						|
 | 
						|
    void fetchMoreRows( qlonglong maxRows );
 | 
						|
%Docstring
 | 
						|
Emitted when more rows are requested.
 | 
						|
 | 
						|
:param maxRows: the number of rows that will be fetched.
 | 
						|
%End
 | 
						|
 | 
						|
    void fetchingStarted();
 | 
						|
%Docstring
 | 
						|
Emitted when fetching of rows has started
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgsqueryresultmodel.h                                       *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |