Skip to content

Commit

Permalink
fix travis issues: docs, sip, test
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Jun 26, 2018
1 parent aeea184 commit 252e41d
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 4 deletions.
107 changes: 107 additions & 0 deletions python/gui/auto_generated/raster/qgscolorrampshaderwidget.sip.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgscolorrampshaderwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsColorRampShaderWidget: QWidget, protected Ui::QgsColorRampShaderWidgetBase
{
%Docstring

It has 2 ways how to use it. For raster layers, raster data provider and band is assigned and
the Quantile classification mode can be used and the LoadFromBandButton is visible.

The other mode is used to style mesh layer contours (scalar datasets)

.. versionadded:: 3.4
%End

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

QgsColorRampShaderWidget( QWidget *parent = 0 );
%Docstring
Creates new color ramp shader widget
%End

void initForUseWithRasterLayer();
%Docstring
Allows quantile classification mode for raster layers
%End

void setRasterBand( QgsRasterDataProvider *dp, int band, const QgsRectangle &extent );
%Docstring
Associates raster with the widget
%End

void setMinMaxAndClassify( double min, double max );
%Docstring
Sets min max and classify color tree
%End

void setMinMax( double min, double max );
%Docstring
Sets min max
%End

QgsColorRampShader shader() const;
%Docstring
Returns shared function used in the renderer
%End

void setFromShader( const QgsColorRampShader &colorRampShader );
%Docstring
Sets widget state from the color ramp shader
%End

signals:
void minMaxChangedFromTree( double min, double max );
%Docstring
Color ramp tree has changed
%End

void widgetChanged();
%Docstring
Widget changed
%End

void classificationModeChanged( QgsColorRampShader::ClassificationMode mode );
%Docstring
Classification mode changed
%End

public slots:

void classify();
%Docstring
Executes the single band pseudo raster classification
%End

void loadMinMaxFromTree();
%Docstring
Loads min and max values from color ramp tree
%End

protected:
void populateColormapTreeWidget( const QList<QgsColorRampShader::ColorRampItem> &colorRampItems );
%Docstring
Populates color ramp tree from ramp items
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/raster/qgscolorrampshaderwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
1 change: 1 addition & 0 deletions python/gui/gui_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
%Include auto_generated/qgsvariableeditorwidget.sip
%Include auto_generated/qgsvscrollarea.sip
%Include auto_generated/qgsfiledownloaderdialog.sip
%Include auto_generated/raster/qgscolorrampshaderwidget.sip
%Include auto_generated/raster/qgsmultibandcolorrendererwidget.sip
%Include auto_generated/raster/qgspalettedrendererwidget.sip
%Include auto_generated/raster/qgsrasterbandcombobox.sip
Expand Down
11 changes: 7 additions & 4 deletions src/gui/raster/qgscolorrampshaderwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class GUI_EXPORT QgsColorRampShaderWidget: public QWidget, protected Ui::QgsColo

public:

//! Creates new color ramp shader widget
QgsColorRampShaderWidget( QWidget *parent = nullptr );

//! Allows quantile classification mode for raster layers
Expand All @@ -61,17 +62,18 @@ class GUI_EXPORT QgsColorRampShaderWidget: public QWidget, protected Ui::QgsColo

//! Returns shared function used in the renderer
QgsColorRampShader shader() const;

//! Sets widget state from the color ramp shader
void setFromShader( const QgsColorRampShader &colorRampShader );

signals:
//! color ramp tree has changed
//! Color ramp tree has changed
void minMaxChangedFromTree( double min, double max );

//! widget changed
//! Widget changed
void widgetChanged();

//! classification mode changed
//! Classification mode changed
void classificationModeChanged( QgsColorRampShader::ClassificationMode mode );

public slots:
Expand All @@ -81,10 +83,11 @@ class GUI_EXPORT QgsColorRampShaderWidget: public QWidget, protected Ui::QgsColo
*/
void classify();

//! called when the color ramp tree has changed
//! Loads min and max values from color ramp tree
void loadMinMaxFromTree();

protected:
//! Populates color ramp tree from ramp items
void populateColormapTreeWidget( const QList<QgsColorRampShader::ColorRampItem> &colorRampItems );

private:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 252e41d

Please sign in to comment.