mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
194 lines
5.2 KiB
Plaintext
194 lines
5.2 KiB
Plaintext
/************************************************************************
|
|
* 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
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsfeaturelistmodel.h"
|
|
%End
|
|
public:
|
|
struct FeatureInfo
|
|
{
|
|
public:
|
|
|
|
FeatureInfo();
|
|
%Docstring
|
|
Constructor for FeatureInfo.
|
|
%End
|
|
|
|
bool isNew;
|
|
|
|
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 );
|
|
|
|
QgsVectorLayerCache *layerCache();
|
|
%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;
|
|
|
|
|
|
void setInjectNull( bool injectNull );
|
|
%Docstring
|
|
If true is specified, a NULL value will be injected
|
|
|
|
:param injectNull: state of null value injection
|
|
|
|
.. versionadded:: 2.9
|
|
%End
|
|
|
|
bool injectNull();
|
|
%Docstring
|
|
Returns the current state of null value injection
|
|
|
|
:return: If a NULL value is added
|
|
|
|
.. versionadded:: 2.9
|
|
%End
|
|
|
|
QgsAttributeTableModel *masterModel();
|
|
|
|
bool setDisplayExpression( const QString &expression );
|
|
%Docstring
|
|
|
|
:param expression: A QgsExpression compatible string.
|
|
|
|
: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.
|
|
%End
|
|
|
|
QString parserErrorString();
|
|
%Docstring
|
|
Returns a detailed message about errors while parsing a :py:class:`QgsExpression`.
|
|
|
|
:return: A message containing information about the parser error.
|
|
%End
|
|
|
|
QString displayExpression() const;
|
|
bool featureByIndex( const QModelIndex &index, QgsFeature &feat );
|
|
|
|
QgsFeatureId idxToFid( const QModelIndex &index ) const;
|
|
%Docstring
|
|
Returns the feature ID corresponding to an ``index`` from the model.
|
|
|
|
.. seealso:: :py:func:`fidToIdx`
|
|
%End
|
|
|
|
QModelIndex fidToIdx( QgsFeatureId fid ) const;
|
|
%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;
|
|
|
|
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
|
|
|
|
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
|
|
|
|
|
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:
|
|
|
|
void onBeginRemoveRows( const QModelIndex &parent, int first, int last );
|
|
%Docstring
|
|
Does nothing except for calling beginRemoveRows()
|
|
|
|
.. deprecated:: Use beginRemoveRows() instead
|
|
%End
|
|
|
|
void onEndRemoveRows( const QModelIndex &parent, int first, int last );
|
|
%Docstring
|
|
Does nothing except for calling endRemoveRows()
|
|
|
|
.. deprecated:: Use endRemoveRows() instead
|
|
%End
|
|
|
|
void onBeginInsertRows( const QModelIndex &parent, int first, int last );
|
|
%Docstring
|
|
Does nothing except for calling beginInsertRows()
|
|
|
|
.. deprecated:: use beginInsertRows() instead
|
|
%End
|
|
|
|
void onEndInsertRows( const QModelIndex &parent, int first, int last );
|
|
%Docstring
|
|
Does nothing except for calling endInsertRows()
|
|
|
|
.. deprecated:: use endInsertRows() instead
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/attributetable/qgsfeaturelistmodel.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|