sip gui layertree and raster

This commit is contained in:
Denis Rouzaud 2017-05-31 11:55:58 +02:00
parent 6eb3570511
commit 625cfc7c8f
16 changed files with 685 additions and 287 deletions

View File

@ -187,19 +187,6 @@ gui/attributetable/qgsfeatureselectionmodel.sip
gui/attributetable/qgsfieldconditionalformatwidget.sip
gui/attributetable/qgsifeatureselectionmanager.sip
gui/attributetable/qgsorganizetablecolumnsdialog.sip
gui/layertree/qgscustomlayerorderwidget.sip
gui/layertree/qgslayertreeembeddedconfigwidget.sip
gui/layertree/qgslayertreeembeddedwidgetregistry.sip
gui/layertree/qgslayertreemapcanvasbridge.sip
gui/layertree/qgslayertreeview.sip
gui/layertree/qgslayertreeviewdefaultactions.sip
gui/raster/qgspalettedrendererwidget.sip
gui/raster/qgsrasterhistogramwidget.sip
gui/raster/qgssinglebandgrayrendererwidget.sip
gui/raster/qgssinglebandpseudocolorrendererwidget.sip
gui/raster/qgsrendererrasterpropertieswidget.sip
gui/raster/qgsrastertransparencywidget.sip
gui/raster/qgshillshaderendererwidget.sip
gui/symbology-ng/qgs25drendererwidget.sip
gui/symbology-ng/qgsarrowsymbollayerwidget.sip
gui/symbology-ng/qgsbrushstylecombobox.sip

View File

@ -1,19 +1,44 @@
/**
* The QgsCustomLayerOrderWidget class provides a list box where the user can define
* custom order for drawing of layers. It also features a checkbox for enabling
* or disabling the custom order. Any changes made by the user are automatically
* propagated to the assigned QgsLayerTreeMapCanvasBridge. Also, any updates
* to the layer tree cause refresh of the list.
*
* @see QgsLayerTreeMapCanvasBridge
* @note added in 2.4
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgscustomlayerorderwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsCustomLayerOrderWidget : QWidget
{
%TypeHeaderCode
#include <qgscustomlayerorderwidget.h>
%Docstring
The QgsCustomLayerOrderWidget class provides a list box where the user can define
custom order for drawing of layers. It also features a checkbox for enabling
or disabling the custom order. Any changes made by the user are automatically
propagated to the assigned QgsLayerTreeMapCanvasBridge. Also, any updates
to the layer tree cause refresh of the list.
.. seealso:: QgsLayerTreeMapCanvasBridge
.. versionadded:: 2.4
%End
%TypeHeaderCode
#include "qgscustomlayerorderwidget.h"
%End
public:
explicit QgsCustomLayerOrderWidget( QgsLayerTreeMapCanvasBridge *bridge, QWidget *parent /TransferThis/ = 0 );
signals:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgscustomlayerorderwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,22 +1,44 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeembeddedconfigwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
/** \ingroup gui
* \class QgsLayerTreeEmbeddedConfigWidget
* A widget to configure layer tree embedded widgets for a particular map layer.
* @note introduced in QGIS 2.16
*/
class QgsLayerTreeEmbeddedConfigWidget : public QWidget
class QgsLayerTreeEmbeddedConfigWidget : public QWidget, protected Ui::QgsLayerTreeEmbeddedConfigWidget
%Docstring
A widget to configure layer tree embedded widgets for a particular map layer.
.. versionadded:: 2.16
%End
{
%TypeHeaderCode
#include <qgslayertreeembeddedconfigwidget.h>
public:
QgsLayerTreeEmbeddedConfigWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
A widget to configure layer tree embedded widgets for a particular map layer.
\param parent The parent of the widget.
%End
public:
QgsLayerTreeEmbeddedConfigWidget( QWidget *parent /TransferThis/ = 0 );
//! Initialize widget with a map layer
void setLayer( QgsMapLayer *layer );
%Docstring
Initialize widget with a map layer
%End
//! Store changes made in the widget to the layer
void applyToLayer();
%Docstring
Store changes made in the widget to the layer
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeembeddedconfigwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,71 +1,123 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeembeddedwidgetregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
/** \ingroup gui
* \class QgsLayerTreeEmbeddedWidgetProvider
* Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree.
* Embedded widgets are assigned per individual map layers and they are shown before any legend entries.
* @see QgsLayerTreeEmbeddedWidgetRegistry
* @note introduced in QGIS 2.16
*/
class QgsLayerTreeEmbeddedWidgetProvider
{
%TypeHeaderCode
#include <qgslayertreeembeddedwidgetregistry.h>
%Docstring
Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree.
Embedded widgets are assigned per individual map layers and they are shown before any legend entries.
.. seealso:: QgsLayerTreeEmbeddedWidgetRegistry
.. versionadded:: 2.16
%End
%TypeHeaderCode
#include "qgslayertreeembeddedwidgetregistry.h"
%End
public:
virtual ~QgsLayerTreeEmbeddedWidgetProvider();
//! Unique name of the provider (among other providers)
virtual QString id() const = 0;
//! Human readable name - may be translatable with tr()
virtual QString name() const = 0;
//! Factory to create widgets. The returned widget is owned by the caller.
//! The widgetIndex argument may be used to identify which widget is being
//! created (useful when using multiple widgets from the same provider for one layer).
virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 /Factory/;
//! Whether it makes sense to use this widget for a particular layer
virtual bool supportsLayer( QgsMapLayer *layer ) = 0;
};
/** \ingroup gui
* \class QgsLayerTreeEmbeddedWidgetRegistry
* Registry of widgets that may be embedded into layer tree view.
* Embedded widgets are assigned per individual map layers and they are shown before any legend entries.
* Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets.
*
* @see QgsLayerTreeEmbeddedWidgetRegistry
* @note introduced in QGIS 2.16
*/
class QgsLayerTreeEmbeddedWidgetRegistry
{
%TypeHeaderCode
#include <qgslayertreeembeddedwidgetregistry.h>
%Docstring
Unique name of the provider (among other providers)
:rtype: str
%End
virtual QString name() const = 0;
%Docstring
Human readable name - may be translatable with tr()
:rtype: str
%End
virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 /Factory/;
%Docstring
created (useful when using multiple widgets from the same provider for one layer).
:rtype: QWidget
%End
virtual bool supportsLayer( QgsMapLayer *layer ) = 0;
%Docstring
Whether it makes sense to use this widget for a particular layer
:rtype: bool
%End
};
class QgsLayerTreeEmbeddedWidgetRegistry
{
%Docstring
Registry of widgets that may be embedded into layer tree view.
Embedded widgets are assigned per individual map layers and they are shown before any legend entries.
Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets.
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through
QgsGui.layerTreeEmbeddedWidgetRegistry().
.. seealso:: QgsLayerTreeEmbeddedWidgetRegistry
.. versionadded:: 2.16
%End
%TypeHeaderCode
#include "qgslayertreeembeddedwidgetregistry.h"
%End
public:
QgsLayerTreeEmbeddedWidgetRegistry();
%Docstring
Constructor for QgsLayerTreeEmbeddedWidgetRegistry
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through
QgsGui.layerTreeEmbeddedWidgetRegistry().
%End
~QgsLayerTreeEmbeddedWidgetRegistry();
/** Return list of all registered providers */
QStringList providers() const;
%Docstring
Return list of all registered providers
:rtype: list of str
%End
/** Get provider object from the provider's ID */
QgsLayerTreeEmbeddedWidgetProvider *provider( const QString &providerId ) const;
%Docstring
Get provider object from the provider's ID
:rtype: QgsLayerTreeEmbeddedWidgetProvider
%End
/** Register a provider, takes ownership of the object.
* Returns true on success, false if the provider is already registered. */
bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider /Transfer/ );
%Docstring
Register a provider, takes ownership of the object.
Returns true on success, false if the provider is already registered. *
:rtype: bool
%End
/** Unregister a provider, the provider object is deleted.
* Returns true on success, false if the provider was not registered. */
bool removeProvider( const QString &providerId );
%Docstring
Unregister a provider, the provider object is deleted.
Returns true on success, false if the provider was not registered. *
:rtype: bool
%End
protected:
private:
QgsLayerTreeEmbeddedWidgetRegistry( const QgsLayerTreeEmbeddedWidgetRegistry &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeembeddedwidgetregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,46 +1,90 @@
/**
* The QgsLayerTreeMapCanvasBridge class takes care of updates of layer set
* for QgsMapCanvas from a layer tree. The class listens to the updates in the layer tree
* and updates the list of layers for rendering whenever some layers are added, removed,
* or their visibility changes.
*
* The update of layers is not done immediately - it is postponed, so a series of updates
* to the layer tree will trigger just one update of canvas layers.
*
* Also allows the client to override the default order of layers. This is useful
* in advanced cases where the grouping in layer tree should be independent from the actual
* order in the canvas.
*
* @note added in 2.4
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreemapcanvasbridge.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayerTreeMapCanvasBridge : QObject
{
%TypeHeaderCode
#include <qgslayertreemapcanvasbridge.h>
%Docstring
The QgsLayerTreeMapCanvasBridge class takes care of updates of layer set
for QgsMapCanvas from a layer tree. The class listens to the updates in the layer tree
and updates the list of layers for rendering whenever some layers are added, removed,
or their visibility changes.
The update of layers is not done immediately - it is postponed, so a series of updates
to the layer tree will trigger just one update of canvas layers.
Also allows the client to override the default order of layers. This is useful
in advanced cases where the grouping in layer tree should be independent from the actual
order in the canvas.
.. versionadded:: 2.4
%End
%TypeHeaderCode
#include "qgslayertreemapcanvasbridge.h"
%End
public:
//! Constructor: does not take ownership of the layer tree nor canvas
QgsLayerTreeMapCanvasBridge( QgsLayerTree *root, QgsMapCanvas *canvas, QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor: does not take ownership of the layer tree nor canvas
%End
QgsLayerTree *rootGroup() const;
%Docstring
:rtype: QgsLayerTree
%End
QgsMapCanvas *mapCanvas() const;
%Docstring
:rtype: QgsMapCanvas
%End
//! Associates overview canvas with the bridge, so the overview will be updated whenever main canvas is updated
//! @note added in 3.0
void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas );
//! Returns associated overview canvas (may be null)
//! @note added in 3.0
%Docstring
.. versionadded:: 3.0
%End
QgsMapOverviewCanvas *overviewCanvas() const;
%Docstring
.. versionadded:: 3.0
:rtype: QgsMapOverviewCanvas
%End
//! if enabled, will automatically set full canvas extent and destination CRS + map units
//! when first layer(s) are added
void setAutoSetupOnFirstLayer( bool enabled );
%Docstring
when first layer(s) are added
%End
bool autoSetupOnFirstLayer() const;
%Docstring
:rtype: bool
%End
void setCanvasLayers();
%Docstring
force update of canvas layers from the layer tree. Normally this should not be needed to be called.
%End
signals:
void canvasLayersChanged( const QList< QgsMapLayer* > &layers );
void canvasLayersChanged( const QList< QgsMapLayer * > &layers );
%Docstring
Emitted when the set of layers (or order of layers) visible in the
canvas changes.
.. versionadded:: 3.0
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreemapcanvasbridge.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,52 +1,102 @@
/**
* The QgsLayerTreeViewDefaultActions class serves as a factory of actions
* that can be used together with a layer tree view.
*
* @see QgsLayerTreeView
* @note added in 2.4
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeviewdefaultactions.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayerTreeViewDefaultActions : QObject
{
%TypeHeaderCode
#include <qgslayertreeviewdefaultactions.h>
%Docstring
The QgsLayerTreeViewDefaultActions class serves as a factory of actions
that can be used together with a layer tree view.
.. seealso:: QgsLayerTreeView
.. versionadded:: 2.4
%End
%TypeHeaderCode
#include "qgslayertreeviewdefaultactions.h"
%End
public:
QgsLayerTreeViewDefaultActions( QgsLayerTreeView *view );
QAction *actionAddGroup( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionRemoveGroupOrLayer( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionShowInOverview( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionRenameGroupOrLayer( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionShowFeatureCount( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
//! Action to check a group and all its children
QAction *actionCheckAndAllChildren( QObject *parent = 0 );
%Docstring
Action to check a group and all its children
:rtype: QAction
%End
//! Action to uncheck a group and all its children
QAction *actionUncheckAndAllChildren( QObject *parent = 0 );
%Docstring
Action to uncheck a group and all its children
:rtype: QAction
%End
//! Action to check a group and all its parents
QAction *actionCheckAndAllParents( QObject *parent = 0 );
%Docstring
Action to check a group and all its parents
:rtype: QAction
%End
QAction *actionZoomToLayer( QgsMapCanvas *canvas, QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionZoomToGroup( QgsMapCanvas *canvas, QObject *parent = 0 ) /Factory/;
// TODO: zoom to selected
%Docstring
:rtype: QAction
%End
QAction *actionMakeTopLevel( QObject *parent = 0 ) /Factory/;
%Docstring
:rtype: QAction
%End
QAction *actionGroupSelected( QObject *parent = 0 ) /Factory/;
//! Action to enable/disable mutually exclusive flag of a group (only one child node may be checked)
//! @note added in 2.12
%Docstring
:rtype: QAction
%End
QAction *actionMutuallyExclusiveGroup( QObject *parent = 0 ) /Factory/;
%Docstring
.. versionadded:: 2.12
:rtype: QAction
%End
void zoomToLayer( QgsMapCanvas *canvas );
void zoomToGroup( QgsMapCanvas *canvas );
public slots:
void showInOverview();
void addGroup();
protected slots:
void addGroup();
void removeGroupOrLayer();
void renameGroupOrLayer();
void showFeatureCount();
@ -54,12 +104,27 @@ class QgsLayerTreeViewDefaultActions : QObject
void zoomToGroup();
void makeTopLevel();
void groupSelected();
//! Slot to enable/disable mutually exclusive group flag
//! @note added in 2.12
void mutuallyExclusiveGroup();
%Docstring
.. versionadded:: 2.12
%End
protected:
void zoomToLayers( QgsMapCanvas *canvas, const QList<QgsMapLayer*> &layers );
void zoomToLayers( QgsMapCanvas *canvas, const QList<QgsMapLayer *> &layers );
QString uniqueGroupName( QgsLayerTreeGroup *parentGroup );
%Docstring
:rtype: str
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/layertree/qgslayertreeviewdefaultactions.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,88 +1,121 @@
/**
* @brief Renderer widget for the hill shade renderer.
* @ingroup gui
* @note added in QGIS 2.16
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgshillshaderendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsHillshadeRendererWidget: QgsRasterRendererWidget
{
%Docstring
Renderer widget for the hill shade renderer.
.. versionadded:: 2.16
%End
%TypeHeaderCode
#include <qgshillshaderendererwidget.h>
#include "qgshillshaderendererwidget.h"
%End
public:
/**
* @brief Renderer widget for the hill shade renderer.
* @param layer The layer attached for this widget.
* @param extent The current extent.
*/
QgsHillshadeRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
~QgsHillshadeRendererWidget();
%Docstring
Renderer widget for the hill shade renderer.
\param layer The layer attached for this widget.
\param extent The current extent.
%End
/**
* Factory method to create the renderer for this type.
*/
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
%Docstring
Factory method to create the renderer for this type.
:rtype: QgsRasterRendererWidget
%End
/**
* @brief The renderer for the widget.
* @return A new renderer for the the config in the widget
*/
QgsRasterRenderer *renderer();
virtual QgsRasterRenderer *renderer();
/**
* @brief Set the widget state from the given renderer.
* @param r The renderer to take the state from.
*/
void setFromRenderer( const QgsRasterRenderer *r );
%Docstring
The renderer for the widget.
:return: A new renderer for the the config in the widget
:rtype: QgsRasterRenderer
%End
void setFromRenderer( const QgsRasterRenderer *renderer );
%Docstring
Set the widget state from the given renderer.
\param renderer The renderer to take the state from.
%End
/**
* Returns the direction of the light over the raster between 0-360.
* @see setAzimuth()
*/
double azimuth() const;
%Docstring
Returns the direction of the light over the raster between 0-360.
.. seealso:: setAzimuth()
:rtype: float
%End
/** Returns the angle of the light source over the raster.
* @see setAltitude()
*/
double altitude() const;
%Docstring
Returns the angle of the light source over the raster.
.. seealso:: setAltitude()
:rtype: float
%End
/** Returns the Z scaling factor.
* @see setZFactor()
*/
double zFactor() const;
%Docstring
Returns the Z scaling factor.
.. seealso:: setZFactor()
:rtype: float
%End
/**
* Returns true if the renderer should use the multi-directional hillshade algorithm.
* @see setMultiDirectional()
*/
bool multiDirectional() const;
%Docstring
Returns true if the renderer should use the multi-directional hillshade algorithm.
.. seealso:: setMultiDirectional()
:rtype: bool
%End
public slots:
/**
* @brief Set the altitude of the light source
* @param altitude the altitude
* @see altitude()
*/
void setAltitude( double altitude );
%Docstring
Set the altitude of the light source
\param altitude the altitude
.. seealso:: altitude()
%End
/**
* @brief Set the azimuth of the light source.
* @param azimuth The azimuth of the light source, between 0 and 360.0
* @see azimuth()
*/
void setAzimuth( double azimuth );
%Docstring
Set the azimuth of the light source.
\param azimuth The azimuth of the light source, between 0 and 360.0
.. seealso:: azimuth()
%End
/**
* @brief Set the Z scaling factor of the result image.
* @param zfactor The z factor
* @see zFactor()
*/
void setZFactor( double zfactor );
%Docstring
Set the Z scaling factor of the result image.
\param zfactor The z factor
.. seealso:: zFactor()
%End
void setMultiDirectional( bool isMultiDirectional );
%Docstring
Sets whether to render using a multi-directional hillshade algorithm.
\param isMultiDirectional set to true to use multi directional rendering
.. seealso:: multiDirectional()
%End
/** Sets whether to render using a multi-directional hillshade algorithm.
* @param isMultiDirectional set to true to use multi directional rendering
* @see multiDirectional()
*/
void setMultiDirectional( bool isMultiDirectional);
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgshillshaderendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,14 +1,42 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgspalettedrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPalettedRendererWidget: QgsRasterRendererWidget
{
%TypeHeaderCode
#include <qgspalettedrendererwidget.h>
#include "qgspalettedrendererwidget.h"
%End
public:
QgsPalettedRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
~QgsPalettedRendererWidget();
QgsRasterRenderer *renderer();
QgsPalettedRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
~QgsPalettedRendererWidget();
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
%Docstring
:rtype: QgsRasterRendererWidget
%End
virtual QgsRasterRenderer *renderer();
void setFromRenderer( const QgsRasterRenderer *r );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgspalettedrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,57 +1,80 @@
class QgsRasterHistogramWidget : QgsPanelWidget
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterhistogramwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
typedef QPointF QwtDoublePoint;
class QgsRasterHistogramWidget : QgsMapLayerConfigWidget
{
%Docstring
Histogram widget
%End
%TypeHeaderCode
#include <qgsrasterhistogramwidget.h>
#include "qgsrasterhistogramwidget.h"
%End
public:
QgsRasterHistogramWidget( QgsRasterLayer *lyr, QWidget *parent /TransferThis/ = 0 );
~QgsRasterHistogramWidget();
/** Save the histogram as an image to disk */
bool histoSaveAsImage( const QString &filename, int width = 600, int height = 600, int quality = -1 );
%Docstring
Save the histogram as an image to disk
:rtype: bool
%End
/** Set the renderer widget (or just its name if there is no widget) */
void setRendererWidget( const QString &name, QgsRasterRendererWidget *rendererWidget = NULL );
void setRendererWidget( const QString &name, QgsRasterRendererWidget *rendererWidget = 0 );
%Docstring
Set the renderer widget (or just its name if there is no widget)
%End
/** Activate the histogram widget */
void setActive( bool activeFlag );
%Docstring
Activate the histogram widget
%End
/** \brief Compute the histogram on demand. */
bool computeHistogram( bool forceComputeFlag );
%Docstring
Compute the histogram on demand.
:rtype: bool
%End
/** Apply a histoActionTriggered() event. */
void histoAction( const QString &actionName, bool actionFlag = true );
%Docstring
Apply a histoActionTriggered() event.
%End
/** Apply a histoActionTriggered() event. */
void setSelectedBand( int index );
%Docstring
Apply a histoActionTriggered() event.
%End
public slots:
/** \brief slot executed when user wishes to refresh raster histogramwidget */
void refreshHistogram();
/** This slot lets you save the histogram as an image to disk */
%Docstring
slot executed when user wishes to refresh raster histogramwidget
%End
void on_mSaveAsImageButton_clicked();
%Docstring
This slot lets you save the histogram as an image to disk
%End
virtual void apply();
void apply();
private slots:
/** Used when the histogram band selector changes, or when tab is loaded. */
void on_cboHistoBand_currentIndexChanged( int );
/** Applies the selected min/max values to the renderer widget. */
void applyHistoMin();
void applyHistoMax();
/** Button to activate picking of the min/max value on the graph. */
void on_btnHistoMin_toggled();
void on_btnHistoMax_toggled();
/** Called when a selection has been made using the plot picker. */
void histoPickerSelected( QPointF );
/** Called when a selection has been made using the plot picker (for qwt5 only).
@note not available in python bindings
*/
// void histoPickerSelectedQwt5( QwtDoublePoint );
/** Various actions that are stored in btnHistoActions. */
void histoActionTriggered( QAction* );
/** Draw the min/max markers on the histogram plot. */
void updateHistoMarkers();
/** Button to compute the histogram, appears when no cached histogram is available. */
void on_btnHistoCompute_clicked();
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrasterhistogramwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,26 +1,49 @@
/**
* @brief Widget to control a layers transparency and related options
*/
class QgsRasterTransparencyWidget: QgsMapLayerConfigWidget
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrastertransparencywidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRasterTransparencyWidget : QgsMapLayerConfigWidget
{
%Docstring
Widget to control a layers transparency and related options
%End
%TypeHeaderCode
#include <qgsrastertransparencywidget.h>
#include "qgsrastertransparencywidget.h"
%End
public:
/**
* @brief Widget to control a layers transparency and related options
*/
QgsRasterTransparencyWidget( QgsRasterLayer *layer, QgsMapCanvas *canvas, QWidget *parent = 0 );
~QgsRasterTransparencyWidget();
%Docstring
Widget to control a layers transparency and related options
%End
public slots:
/**
* Sync the widget state to the layer set for the widget.
*/
void syncToLayer();
/**
* Apply any changes on the widget to the set layer.
*/
void syncToLayer();
%Docstring
Sync the widget state to the layer set for the widget.
%End
void apply();
%Docstring
Apply any changes on the widget to the set layer.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrastertransparencywidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,43 +1,69 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrendererrasterpropertieswidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRendererRasterPropertiesWidget : QgsMapLayerConfigWidget
{
%TypeHeaderCode
#include <qgsrendererrasterpropertieswidget.h>
#include "qgsrendererrasterpropertieswidget.h"
%End
public:
QgsRendererRasterPropertiesWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = 0 );
%Docstring
A widget to hold the renderer properties for a raster layer.
\param layer The raster layer to style
\param canvas The canvas object used to calculate the max and min values from the extent.
\param parent Parent object
%End
public:
QgsRendererRasterPropertiesWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent );
~QgsRendererRasterPropertiesWidget();
/** Sets the map canvas associated with the dialog. This allows the widget to retrieve the current
* map scale and other properties from the canvas.
* @param canvas map canvas
* @note added in QGIS 2.12
*/
void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
Sets the map canvas associated with the dialog. This allows the widget to retrieve the current
map scale and other properties from the canvas.
\param canvas map canvas
.. versionadded:: 2.12
%End
/**
* Return the active render widget. Can be null.
*/
QgsRasterRendererWidget *currentRenderWidget();
signals:
/**
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
%Docstring
Return the active render widget. Can be null.
:rtype: QgsRasterRendererWidget
%End
public slots:
//! called when user changes renderer type
void rendererChanged();
%Docstring
called when user changes renderer type
%End
//! Apply the changes from the dialog to the layer.
void apply();
%Docstring
Apply the changes from the dialog to the layer.
%End
/**
* @brief Sync the widget to the given layer.
* @param layer The layer to use for the widget
*/
void syncToLayer( QgsRasterLayer *layer );
%Docstring
Sync the widget to the given layer.
\param layer The layer to use for the widget
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgsrendererrasterpropertieswidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,26 +1,59 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgssinglebandgrayrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSingleBandGrayRendererWidget: QgsRasterRendererWidget
{
%TypeHeaderCode
#include <qgssinglebandgrayrendererwidget.h>
#include "qgssinglebandgrayrendererwidget.h"
%End
public:
QgsSingleBandGrayRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandGrayRendererWidget();
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
%Docstring
:rtype: QgsRasterRendererWidget
%End
virtual QgsRasterRenderer *renderer();
virtual void setMapCanvas( QgsMapCanvas *canvas );
QgsRasterRenderer *renderer();
void setMapCanvas( QgsMapCanvas *canvas );
void setFromRenderer( const QgsRasterRenderer *r );
QString min( int index = 0 );
QString max( int index = 0 );
void setMin( const QString &value, int index = 0 );
void setMax( const QString &value, int index = 0 );
int selectedBand( int index = 0 );
void doComputations();
virtual QString min( int index = 0 );
virtual QString max( int index = 0 );
virtual void setMin( const QString &value, int index = 0 );
virtual void setMax( const QString &value, int index = 0 );
virtual int selectedBand( int index = 0 );
virtual void doComputations();
virtual QgsRasterMinMaxWidget *minMaxWidget();
public slots:
void loadMinMax( int bandNo, double min, double max );
%Docstring
called when new min/max values are loaded
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgssinglebandgrayrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,28 +1,56 @@
class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgssinglebandpseudocolorrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendererWidget,
private Ui::QgsSingleBandPseudoColorRendererWidgetBase
{
%TypeHeaderCode
#include <qgssinglebandpseudocolorrendererwidget.h>
%End
public:
QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandPseudoColorRendererWidget();
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
QgsRasterRenderer *renderer();
void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
:rtype: QgsRasterRendererWidget
%End
virtual QgsRasterRenderer *renderer();
virtual void setMapCanvas( QgsMapCanvas *canvas );
virtual void doComputations();
virtual QgsRasterMinMaxWidget *minMaxWidget();
void setFromRenderer( const QgsRasterRenderer *r );
void doComputations();
public slots:
/** Executes the single band pseudo raster classficiation
*/
void classify();
%Docstring
Executes the single band pseudo raster classficiation
%End
void loadMinMax( int bandNo, double min, double max );
%Docstring
called when new min/max values are loaded
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgssinglebandpseudocolorrendererwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -65,6 +65,7 @@ class GUI_EXPORT QgsCustomLayerOrderWidget : public QWidget
};
#ifndef SIP_RUN
///@cond PRIVATE
class CustomLayerOrderModel : public QAbstractListModel
{
@ -102,5 +103,6 @@ class CustomLayerOrderModel : public QAbstractListModel
QStringList mOrder;
};
/// @endcond
#endif
#endif // QGSCUSTOMLAYERORDERWIDGET_H

View File

@ -101,6 +101,11 @@ class GUI_EXPORT QgsLayerTreeEmbeddedWidgetRegistry
//! storage of all the providers
QMap<QString, QgsLayerTreeEmbeddedWidgetProvider *> mProviders;
private:
#ifdef SIP_RUN
QgsLayerTreeEmbeddedWidgetRegistry( const QgsLayerTreeEmbeddedWidgetRegistry &other );
#endif
};

View File

@ -29,6 +29,7 @@
class QgsRasterLayer;
#ifndef SIP_RUN
/// @cond PRIVATE
/** \class QgsPalettedRendererClassGatherer
@ -172,6 +173,7 @@ class QgsPalettedRendererModel : public QAbstractItemModel
};
///@endcond PRIVATE
#endif
/** \ingroup gui
* \class QgsPalettedRendererWidget