mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			187 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			187 lines
		
	
	
		
			5.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/pointcloud/qgspointcloudattributemodel.h                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsPointCloudAttributeModel : QAbstractItemModel
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
A model for display of available attributes from a point cloud.
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgspointcloudattributemodel.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
 | 
						|
    enum class CustomRole
 | 
						|
    {
 | 
						|
      AttributeName,
 | 
						|
      AttributeIndex,
 | 
						|
      AttributeSize,
 | 
						|
      AttributeType,
 | 
						|
      IsEmpty,
 | 
						|
      IsNumeric,
 | 
						|
    };
 | 
						|
 | 
						|
    explicit QgsPointCloudAttributeModel( QObject *parent /TransferThis/ = 0 );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsPointCloudAttributeModel, with the specified ``parent`` object.
 | 
						|
%End
 | 
						|
 | 
						|
    void setLayer( QgsPointCloudLayer *layer );
 | 
						|
%Docstring
 | 
						|
Sets the ``layer`` associated with the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAttributes`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointCloudLayer *layer();
 | 
						|
%Docstring
 | 
						|
Returns the layer associated with the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setLayer`
 | 
						|
%End
 | 
						|
 | 
						|
    void setAttributes( const QgsPointCloudAttributeCollection &attributes );
 | 
						|
%Docstring
 | 
						|
Sets the ``attributes`` to include in the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setLayer`
 | 
						|
 | 
						|
.. seealso:: :py:func:`attributes`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointCloudAttributeCollection attributes() const;
 | 
						|
%Docstring
 | 
						|
Returns the attributes associated with the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAttributes`
 | 
						|
%End
 | 
						|
 | 
						|
    void setAllowEmptyAttributeName( bool allowEmpty );
 | 
						|
%Docstring
 | 
						|
Sets whether an optional empty attribute ("not set") option is present in the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`allowEmptyAttributeName`
 | 
						|
%End
 | 
						|
 | 
						|
    QModelIndex indexFromName( const QString &name );
 | 
						|
%Docstring
 | 
						|
Returns the index corresponding to a given attribute ``name``.
 | 
						|
%End
 | 
						|
 | 
						|
    bool allowEmptyAttributeName() const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if the model allows the empty attribute ("not set") choice.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAllowEmptyAttributeName`
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
 | 
						|
 | 
						|
    virtual QModelIndex parent( const QModelIndex &child ) const;
 | 
						|
 | 
						|
    virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
 | 
						|
 | 
						|
    virtual int columnCount( const QModelIndex &parent ) const;
 | 
						|
 | 
						|
    virtual QVariant data( const QModelIndex &index, int role ) const;
 | 
						|
 | 
						|
 | 
						|
    static QString attributeToolTip( const QgsPointCloudAttribute &attribute );
 | 
						|
%Docstring
 | 
						|
Returns a HTML formatted tooltip string for a ``attribute``, containing details
 | 
						|
like the attribute name and type.
 | 
						|
%End
 | 
						|
 | 
						|
    static QIcon iconForAttributeType( QgsPointCloudAttribute::DataType type );
 | 
						|
%Docstring
 | 
						|
Returns an icon corresponding to an attribute ``type``
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
class QgsPointCloudAttributeProxyModel : QSortFilterProxyModel
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
A proxy model for filtering available attributes from a point cloud attribute model.
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgspointcloudattributemodel.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    enum Filter
 | 
						|
    {
 | 
						|
      Char,
 | 
						|
      Short,
 | 
						|
      Int32,
 | 
						|
      Float,
 | 
						|
      Double,
 | 
						|
      Numeric,
 | 
						|
      AllTypes,
 | 
						|
    };
 | 
						|
    typedef QFlags<QgsPointCloudAttributeProxyModel::Filter> Filters;
 | 
						|
 | 
						|
 | 
						|
    explicit QgsPointCloudAttributeProxyModel( QgsPointCloudAttributeModel *source, QObject *parent /TransferThis/ = 0 );
 | 
						|
%Docstring
 | 
						|
Constructor for QgsPointCloudAttributeProxyModel, with the specified ``source``
 | 
						|
model and ``parent`` object.
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointCloudAttributeModel *sourceAttributeModel();
 | 
						|
%Docstring
 | 
						|
Returns the :py:class:`QgsPointCloudAttributeModel` used in this QSortFilterProxyModel.
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointCloudAttributeProxyModel *setFilters( QgsPointCloudAttributeProxyModel::Filters filters );
 | 
						|
%Docstring
 | 
						|
Set flags that affect how fields are filtered in the model.
 | 
						|
 | 
						|
.. seealso:: :py:func:`filters`
 | 
						|
%End
 | 
						|
 | 
						|
    Filters filters() const;
 | 
						|
%Docstring
 | 
						|
Returns the filters controlling displayed attributes.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setFilters`
 | 
						|
%End
 | 
						|
 | 
						|
  public:
 | 
						|
    virtual bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;
 | 
						|
 | 
						|
    virtual bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
 | 
						|
 | 
						|
};
 | 
						|
QFlags<QgsPointCloudAttributeProxyModel::Filter> operator|(QgsPointCloudAttributeProxyModel::Filter f1, QFlags<QgsPointCloudAttributeProxyModel::Filter> f2);
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/pointcloud/qgspointcloudattributemodel.h                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |