Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh gui #13

Closed
wants to merge 13 commits into from
2 changes: 2 additions & 0 deletions python/core/auto_generated/mesh/qgsmeshdataprovider.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ or read on demand
virtual bool addDataset( const QString &uri ) = 0;
%Docstring
Associate dataset with the mesh

emits dataChanged when successful
%End

virtual int datasetCount() const = 0;
Expand Down
48 changes: 7 additions & 41 deletions python/core/auto_generated/mesh/qgsmeshrenderersettings.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@




class QgsMeshRendererMeshSettings
{
%Docstring
Expand Down Expand Up @@ -73,54 +74,19 @@ Represents a mesh renderer settings for scalar datasets
#include "qgsmeshrenderersettings.h"
%End
public:
QColor maxColor() const;
%Docstring
Returns color representing maximum scalar value in the dataset
%End
void setMaxColor( const QColor &maxColor );
%Docstring
Sets color representing maximum scalar value in the dataset
%End

QColor minColor() const;
QgsColorRampShader colorRampShader() const;
%Docstring
Returns color representing minimum scalar value in the dataset
Returns color ramp shader function
%End
void setMinColor( const QColor &minColor );
void setColorRampShader( const QgsColorRampShader &shader );
%Docstring
Sets color representing maximum scalar value in the dataset
Sets color ramp shader function
%End

double minValue() const;
%Docstring
Returns min scalar value that represents minColor()

if set to numerical_limits<double>.quiet_NaN(), value for minColor() is
taken from minimum value of active scalar dataset
%End

void setMinValue( double minValue );
%Docstring
Sets min scalar value that represents minColor()

.. seealso:: :py:func:`QgsMeshRendererScalarSettings.minValue`
%End

double maxValue() const;
%Docstring
Returns max scalar value that represents maxColor()

if set to numerical_limits<double>.quiet_NaN(), value for maxColor() is
taken from maximum value of active scalar dataset
%End

void setMaxValue( double maxValue );
bool isEnabled() const;
%Docstring
Sets min scalar value that represents minColor()

.. seealso:: :py:func:`QgsMeshRendererScalarSettings.maxValue`
Returns whether color ramp has any items assigned
%End

};

class QgsMeshRendererVectorSettings
Expand Down
7 changes: 7 additions & 0 deletions python/core/auto_generated/raster/qgscolorrampshader.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Returns the color ramp type as a string.
void setColorRampType( QgsColorRampShader::Type colorRampType );
%Docstring
Sets the color ramp type
%End

bool isEmpty() const;
%Docstring
Whether the color ramp contains any items

.. versionadded:: 3.4
%End

QgsColorRamp *sourceColorRamp() const /Factory/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,22 @@ class QgsSingleBandPseudoColorRendererWidget: QgsRasterRendererWidget
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;
virtual QgsRasterRenderer *renderer();


QgsColorRampShader *shaderFunction() const /Factory/;
%Docstring
Returns shader function used in the renderer. Caller takes ownership and deletes it.
%End
virtual void setMapCanvas( QgsMapCanvas *canvas );

virtual void doComputations();

virtual QgsRasterMinMaxWidget *minMaxWidget();

int currentBand() const;
%Docstring
Returns the current raster band number
%End

void setFromRenderer( const QgsRasterRenderer *r );

public slots:
Expand Down
18 changes: 18 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ SET(QGIS_APP_SRCS
qgssettingstree.cpp
qgsvariantdelegate.cpp
qgscrashhandler.cpp

mesh/qgsmeshlayerproperties.cpp
mesh/qgsrenderermeshpropertieswidget.cpp
mesh/qgsmeshrenderermeshsettingswidget.cpp
mesh/qgsmeshrendererscalarsettingswidget.cpp
mesh/qgsmeshrenderervectorsettingswidget.cpp
mesh/qgsmeshrendereractivedatasetwidget.cpp
mesh/qgsmeshdatasetgrouptreeview.cpp
)

SET (QGIS_APP_MOC_HDRS
Expand Down Expand Up @@ -408,6 +416,14 @@ SET (QGIS_APP_MOC_HDRS

qgssettingstree.h
qgsvariantdelegate.h

mesh/qgsmeshlayerproperties.h
mesh/qgsrenderermeshpropertieswidget.h
mesh/qgsmeshrenderermeshsettingswidget.h
mesh/qgsmeshrendererscalarsettingswidget.h
mesh/qgsmeshrenderervectorsettingswidget.h
mesh/qgsmeshrendereractivedatasetwidget.h
mesh/qgsmeshdatasetgrouptreeview.h
)


Expand Down Expand Up @@ -582,6 +598,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/app/pluginmanager
${CMAKE_SOURCE_DIR}/src/app/gps
${CMAKE_SOURCE_DIR}/src/app/dwg
${CMAKE_SOURCE_DIR}/src/app/mesh
${CMAKE_SOURCE_DIR}/src/app/locator
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/core
Expand Down Expand Up @@ -658,6 +675,7 @@ INCLUDE_DIRECTORIES(
../core/processing
../core/providers/memory
../core/raster
../core/mesh
../core/scalebar
../core/symbology
../gui
Expand Down
Loading