mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
162 lines
5.2 KiB
Plaintext
162 lines
5.2 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/raster/qgsrasterattributetablemodel.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
class QgsRasterAttributeTableModel : QAbstractTableModel
|
|
{
|
|
%Docstring(signature="appended")
|
|
A model which represents a :py:class:`QgsRasterAttributeTable`.
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsrasterattributetablemodel.h"
|
|
%End
|
|
public:
|
|
explicit QgsRasterAttributeTableModel( QgsRasterAttributeTable *rat, QObject *parent /TransferThis/ = 0 );
|
|
%Docstring
|
|
Creates a new QgsRasterAttributeTableModel from raster attribute table
|
|
``rat`` and optional ``parent``.
|
|
%End
|
|
|
|
bool editable() const;
|
|
%Docstring
|
|
Returns true if the Raster Attribute Table is editable.
|
|
%End
|
|
|
|
void setEditable( bool editable );
|
|
%Docstring
|
|
Sets the Raster Attribute Table editable state to ``editable``.
|
|
%End
|
|
|
|
bool hasColor() const;
|
|
%Docstring
|
|
Returns ``True`` if the Raster Attribute Table has color information.
|
|
%End
|
|
|
|
bool hasRamp() const;
|
|
%Docstring
|
|
Returns ``True`` if the Raster Attribute Table has ramp information.
|
|
%End
|
|
|
|
QStringList headerNames() const;
|
|
%Docstring
|
|
Returns all the header names, including the "virtual" color header if
|
|
the Raster Attribute Table has color or ramp.
|
|
%End
|
|
|
|
QString headerTooltip( const int section ) const;
|
|
%Docstring
|
|
Returns the tooltip for the given ``section``.
|
|
%End
|
|
|
|
bool isValid( QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Checks if the Raster Attribute Table is valid, optionally returns
|
|
validation errors in ``errorMessage``.
|
|
%End
|
|
|
|
bool isDirty();
|
|
%Docstring
|
|
Returns ``True`` if the Raster Attribute Table was modified since it was
|
|
last saved or read.
|
|
%End
|
|
|
|
|
|
bool insertField( const int position, const QString &name, const Qgis::RasterAttributeTableFieldUsage usage, const QMetaType::Type type, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Inserts a field at the given position.
|
|
|
|
:param name: field name
|
|
:param usage: field usage
|
|
:param type: field type
|
|
:param position: insertion point (before)
|
|
|
|
:return: - true on success
|
|
- errorMessage: error message
|
|
%End
|
|
|
|
bool insertField( const int position, const QString &name, const Qgis::RasterAttributeTableFieldUsage usage, const QVariant::Type type, QString *errorMessage /Out/ = 0 ) /Deprecated="Since 3.38. Use the method with a QMetaType.Type argument instead."/;
|
|
%Docstring
|
|
Inserts a field at the given position.
|
|
|
|
:param name: field name
|
|
:param usage: field usage
|
|
:param type: field type
|
|
:param position: insertion point (before)
|
|
|
|
:return: - true on success
|
|
- errorMessage: error message
|
|
|
|
.. deprecated:: 3.38
|
|
|
|
Use the method with a QMetaType.Type argument instead.
|
|
%End
|
|
|
|
bool removeField( const int position, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Remove the field at given ``position``, optionally reporting any error
|
|
in ``errorMessage``, returns ``True`` on success.
|
|
%End
|
|
|
|
bool removeColorOrRamp( QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Removes all color or ramp information, optionally reporting any error in
|
|
``errorMessage``, returns ``True`` on success.
|
|
%End
|
|
|
|
bool insertRow( const int position, const QVariantList &rowData, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Inserts a new row before ``position``, optionally reporting any error in
|
|
``errorMessage``, returns ``True`` on success.
|
|
%End
|
|
|
|
bool insertColor( int position, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Create RGBA fields and inserts them at ``position``, optionally
|
|
reporting any error in ``errorMessage``, returns ``True`` on success.
|
|
%End
|
|
|
|
bool insertRamp( int position, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Create RGBA minimum and maximum fields and inserts them at ``position``,
|
|
optionally reporting any error in ``errorMessage``, returns ``True`` on
|
|
success.
|
|
%End
|
|
|
|
bool removeRow( const int position, QString *errorMessage /Out/ = 0 );
|
|
%Docstring
|
|
Removes the row at ``position``, optionally reporting any error in
|
|
``errorMessage``, returns ``True`` on success.
|
|
%End
|
|
|
|
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 bool setData( const QModelIndex &index, const QVariant &value, int role );
|
|
|
|
virtual QVariant headerData( int section, Qt::Orientation orientation, int role ) const;
|
|
|
|
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/raster/qgsrasterattributetablemodel.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|