Skip to content

Commit

Permalink
Missing sip includes
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Nov 8, 2022
1 parent 5ed5b06 commit 0bcb75f
Show file tree
Hide file tree
Showing 10 changed files with 332 additions and 12 deletions.
Expand Up @@ -162,7 +162,9 @@ Converts a raster color ``table`` to paletted renderer class data.

static QgsPalettedRasterRenderer::MultiValueClassData rasterAttributeTableToClassData( const QgsRasterAttributeTable *attributeTable, const int classificationColumn = -1, QgsColorRamp *ramp = 0 );
%Docstring
Reads and returns classes from the Raster Attribute Table ``attributeTable``, optionally classifying the attribute table by ``classificationColumn`` and settings the colors from ``ramp``. The default value of -1 for the classificationColumn uses the first available value column.
Reads and returns classes from the Raster Attribute Table ``attributeTable``, optionally classifying the attribute table
by ``classificationColumn`` and setting the colors from ``ramp``.
The default value of -1 for the classificationColumn uses the first available value column.

.. note::

Expand Down
@@ -0,0 +1,77 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgscreaterasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsCreateRasterAttributeTableDialog : QDialog
{
%Docstring(signature="appended")
The :py:class:`QgsCreateRasterAttributeTableDialog` dialog collects the information required to create a new raster attribute table and performs the creation when the dialog is accepted.

.. warning::

Client code must check if the creation of attribute tables is supported by the raster layer by calling :py:func:`QgsRasterLayer.canCreateAttributeTable()` before using this dialog.

.. versionadded:: 3.30
%End

%TypeHeaderCode
#include "qgscreaterasterattributetabledialog.h"
%End
public:

QgsCreateRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a new QgsCreateRasterAttributeTableDialog.

:param rasterLayer: the raster layer, must be suitable for creating a new raster attribute table
:param parent: optional parent
%End

QString filePath( ) const;
%Docstring
Returns the file path in case of VAT.DBF save option.
%End

bool saveToFile( ) const;
%Docstring
Returns ``True`` if the option to save to a file is selected.
%End

bool openWhenDone( ) const;
%Docstring
Returns ``True`` if the option to open the newly created attribute table is checked.
%End

void setMessageBar( QgsMessageBar *bar );
%Docstring
Sets the message ``bar`` associated with the widget. This allows the widget to push feedback messages
to the appropriate message bar.

.. seealso:: :py:func:`messageBar`
%End

void setOpenWhenDoneVisible( bool visible );
%Docstring
Sets the visibility of the "Open newly created raster attribute table" option to ``visible``, the option is visible by default.
%End

public slots:

virtual void accept();


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgscreaterasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -0,0 +1,77 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsloadrasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsLoadRasterAttributeTableDialog: QDialog
{
%Docstring(signature="appended")
The :py:class:`QgsLoadRasterAttributeTableDialog` dialog let the user select a VAT.DBF file
and associate the resulting raster attribute table with a raster band.

.. versionadded:: 3.30
%End

%TypeHeaderCode
#include "qgsloadrasterattributetabledialog.h"
%End
public:

QgsLoadRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a new :py:class:`QgsCreateRasterAttributeTableDialog`.

:param rasterLayer: the raster layer, must be suitable for creating a new raster attribute table
:param parent: optional parent
%End

void setMessageBar( QgsMessageBar *bar );
%Docstring
Sets the message ``bar`` associated with the widget. This allows the widget to push feedback messages
to the appropriate message bar.

.. seealso:: :py:func:`messageBar`
%End

void setOpenWhenDoneVisible( bool visible );
%Docstring
Sets the visibility of the "Open newly created raster attribute table" option to ``visible``, the option is visible by default.
%End

bool openWhenDone( ) const;
%Docstring
Returns ``True`` if the option to open the newly created attribute table is checked.
%End

int rasterBand( );
%Docstring
Returns the raster band associated to the raster attribute table.
%End

QString filePath( ) const;
%Docstring
Returns the file path to VAT.DBF.
%End

public slots:

virtual void accept();


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsloadrasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -0,0 +1,71 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetableaddcolumndialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsRasterAttributeTableAddColumnDialog : QDialog
{
%Docstring(signature="appended")
The :py:class:`QgsRasterAttributeTableAddColumnDialog` class collects options to add a new column to a raster attribute table.

.. versionadded:: 3.30
%End

%TypeHeaderCode
#include "qgsrasterattributetableaddcolumndialog.h"
%End
public:

QgsRasterAttributeTableAddColumnDialog( QgsRasterAttributeTable *attributeTable, QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a new QgsRasterAttributeTableAddColumnDialog

:param attributeTable: the raster attribute table
:param parent: optional parent
%End

int position() const;
%Docstring
Returns the position where the new column (before) will be inserted.
%End

bool isColor( ) const;
%Docstring
Returns ``True`` if the add color column option was checked.
%End

bool isRamp( ) const;
%Docstring
Returns ``True`` if the add color ramp column option was checked.
%End

QString name( ) const;
%Docstring
Returns the new column name.
%End

Qgis::RasterAttributeTableFieldUsage usage( ) const;
%Docstring
Returns the new column name.
%End

QVariant::Type type( ) const;
%Docstring
Returns the new column type.
%End


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetableaddcolumndialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -0,0 +1,45 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetableaddrowdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/


class QgsRasterAttributeTableAddRowDialog : QDialog
{
%Docstring(signature="appended")
The :py:class:`QgsRasterAttributeTableAddColumnDialog` class collects options to add a new row to a raster attribute table.

.. versionadded:: 3.30
%End

%TypeHeaderCode
#include "qgsrasterattributetableaddrowdialog.h"
%End
public:

QgsRasterAttributeTableAddRowDialog( QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a new QgsRasterAttributeTableAddRowDialog

:param attributeTable: the raster attribute table
:param parent: optional parent
%End

bool insertAfter() const;
%Docstring
Returns ``True`` if the desired insertion position for the new row is after the currently selected row, ``False`` if the insertion point is before.
%End


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetableaddrowdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -0,0 +1,39 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsRasterAttributeTableDialog: QDialog
{
%Docstring(signature="appended")
The :py:class:`QgsRasterAttributeTableDialog` class embeds an attribute table widget.

.. versionadded:: 3.30
%End

%TypeHeaderCode
#include "qgsrasterattributetabledialog.h"
%End
public:

QgsRasterAttributeTableDialog( QgsRasterLayer *rasterLayer, int bandNumber = 0, QWidget *parent /TransferThis/ = 0 );

public slots:

virtual void reject();


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterattributetabledialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2 changes: 2 additions & 0 deletions python/gui/gui_auto.sip
Expand Up @@ -407,8 +407,10 @@
%Include auto_generated/providers/qgsabstractdbsourceselect.sip
%Include auto_generated/raster/qgsrasterattributetablewidget.sip
%Include auto_generated/raster/qgscreaterasterattributetabledialog.sip
%Include auto_generated/raster/qgsloadrasterattributetabledialog.sip
%Include auto_generated/raster/qgsrasterattributetabledialog.sip
%Include auto_generated/raster/qgsrasterattributetableaddcolumndialog.sip
%Include auto_generated/raster/qgsrasterattributetableaddrowdialog.sip
%Include auto_generated/raster/qgscolorrampshaderwidget.sip
%Include auto_generated/raster/qgshillshaderendererwidget.sip
%Include auto_generated/raster/qgsmultibandcolorrendererwidget.sip
Expand Down
6 changes: 5 additions & 1 deletion src/core/raster/qgspalettedrasterrenderer.h
Expand Up @@ -174,14 +174,18 @@ class CORE_EXPORT QgsPalettedRasterRenderer: public QgsRasterRenderer
static QgsPalettedRasterRenderer::ClassData colorTableToClassData( const QList<QgsColorRampShader::ColorRampItem> &table );

/**
* Reads and returns classes from the Raster Attribute Table \a attributeTable, optionally classifying the attribute table by \a classificationColumn and settings the colors from \a ramp. The default value of -1 for the classificationColumn uses the first available value column.
* Reads and returns classes from the Raster Attribute Table \a attributeTable, optionally classifying the attribute table
* by \a classificationColumn and setting the colors from \a ramp.
* The default value of -1 for the classificationColumn uses the first available value column.
*
* \note The method will return an empty list of classes in case the Raster Attribute Table is not thematic.
* \since QGIS 3.30
*/
static QgsPalettedRasterRenderer::MultiValueClassData rasterAttributeTableToClassData( const QgsRasterAttributeTable *attributeTable, const int classificationColumn = -1, QgsColorRamp *ramp = nullptr );

/**
* Converts a \a string containing a color table or class data to to paletted renderer class data.
*
* \see classDataFromFile()
* \see classDataToString()
* \since QGIS 3.0
Expand Down

0 comments on commit 0bcb75f

Please sign in to comment.