QGIS/python/gui/auto_generated/attributetable/qgsfeaturelistmodel.sip.in

194 lines
5.2 KiB
Plaintext
Raw Normal View History

2017-06-08 15:51:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsfeaturelistmodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsFeatureListModel : QSortFilterProxyModel, QgsFeatureModel
{
2017-06-08 15:51:05 +02:00
%TypeHeaderCode
2017-06-08 15:51:05 +02:00
#include "qgsfeaturelistmodel.h"
%End
public:
struct FeatureInfo
{
2017-06-08 15:51:05 +02:00
public:
2017-06-08 15:51:05 +02:00
FeatureInfo();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for FeatureInfo.
%End
2017-06-08 15:51:05 +02:00
bool isNew;
2018-06-05 08:29:29 +10:00
2017-06-08 15:51:05 +02:00
bool isEdited;
};
enum Role
{
FeatureInfoRole,
FeatureRole
};
public:
explicit QgsFeatureListModel( QgsAttributeTableFilterModel *sourceModel, QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsFeatureListModel
%End
virtual void setSourceModel( QgsAttributeTableFilterModel *sourceModel );
2018-06-05 08:29:29 +10:00
QgsVectorLayerCache *layerCache();
2018-06-05 08:29:29 +10:00
%Docstring
Returns the vector layer cache which is being used to populate the model.
%End
virtual QVariant data( const QModelIndex &index, int role ) const;
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
2015-12-01 11:45:30 +01:00
void setInjectNull( bool injectNull );
2017-06-08 15:51:05 +02:00
%Docstring
If true is specified, a NULL value will be injected
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param injectNull: state of null value injection
2017-06-08 15:51:05 +02:00
.. versionadded:: 2.9
%End
2015-12-01 11:45:30 +01:00
bool injectNull();
2017-06-08 15:51:05 +02:00
%Docstring
Returns the current state of null value injection
2017-12-15 10:36:55 -04:00
:return: If a NULL value is added
2017-06-08 15:51:05 +02:00
.. versionadded:: 2.9
%End
2015-12-01 11:45:30 +01:00
QgsAttributeTableModel *masterModel();
bool setDisplayExpression( const QString &expression );
2017-06-08 15:51:05 +02:00
%Docstring
:param expression: A QgsExpression compatible string.
2017-12-15 10:36:55 -04:00
:return: true if the expression could be set, false if there was a parse error.
If it fails, the old expression will still be applied. Call parserErrorString()
for a meaningful error message.
2017-06-08 15:51:05 +02:00
%End
QString parserErrorString();
2017-06-08 15:51:05 +02:00
%Docstring
Returns a detailed message about errors while parsing a :py:class:`QgsExpression`.
2017-12-15 10:36:55 -04:00
:return: A message containing information about the parser error.
2017-06-08 15:51:05 +02:00
%End
2014-01-26 18:35:21 +01:00
QString displayExpression() const;
bool featureByIndex( const QModelIndex &index, QgsFeature &feat );
2018-06-05 08:29:29 +10:00
QgsFeatureId idxToFid( const QModelIndex &index ) const;
2018-06-05 08:29:29 +10:00
%Docstring
Returns the feature ID corresponding to an ``index`` from the model.
.. seealso:: :py:func:`fidToIdx`
%End
QModelIndex fidToIdx( QgsFeatureId fid ) const;
2018-06-05 08:29:29 +10:00
%Docstring
Returns the model index corresponding to a feature ID.
.. seealso:: :py:func:`idxToFid`
%End
virtual QModelIndex mapToSource( const QModelIndex &proxyIndex ) const;
virtual QModelIndex mapFromSource( const QModelIndex &sourceIndex ) const;
virtual QModelIndex mapToMaster( const QModelIndex &proxyIndex ) const;
virtual QModelIndex mapFromMaster( const QModelIndex &sourceIndex ) const;
virtual QItemSelection mapSelectionFromMaster( const QItemSelection &selection ) const;
virtual QItemSelection mapSelectionToMaster( const QItemSelection &selection ) const;
virtual QModelIndex parent( const QModelIndex &child ) const;
2017-06-08 15:51:05 +02:00
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
2017-06-08 15:51:05 +02:00
virtual QModelIndex fidToIndex( QgsFeatureId fid );
QModelIndexList fidToIndexList( QgsFeatureId fid );
bool sortByDisplayExpression() const;
%Docstring
Sort this model by its display expression.
.. versionadded:: 3.2
%End
void setSortByDisplayExpression( bool sortByDisplayExpression );
%Docstring
Sort this model by its display expression.
.. note::
Not compatible with injectNull, if sorting by display expression is enabled,
injectNull will automatically turned off.
.. versionadded:: 3.2
%End
public slots:
2018-05-15 18:03:21 +02:00
void onBeginRemoveRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling beginRemoveRows()
.. deprecated:: Use beginRemoveRows() instead
2018-05-15 18:03:21 +02:00
%End
void onEndRemoveRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling endRemoveRows()
.. deprecated:: Use endRemoveRows() instead
2018-05-15 18:03:21 +02:00
%End
void onBeginInsertRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling beginInsertRows()
.. deprecated:: use beginInsertRows() instead
2018-05-15 18:03:21 +02:00
%End
void onEndInsertRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling endInsertRows()
.. deprecated:: use endInsertRows() instead
2018-05-15 18:03:21 +02:00
%End
2017-06-08 15:51:05 +02:00
};
2017-06-08 15:51:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsfeaturelistmodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/