Skip to content
Permalink
Browse files
[mesh] [feature] App widgets for styling mesh layers
- Adding datasets to mesh layer from properties panel
- Information and source panel in properties panel
- Selection of active dataset (properties or styling panel)
- Styling of contours/scalars (properties or styling panel)
- Styling of mesh frame (properties or styling panel)
- Styling of vector arrows (properties or styling panel)
  • Loading branch information
PeterPetrik committed Jun 26, 2018
1 parent b3d2619 commit aeea184
Show file tree
Hide file tree
Showing 50 changed files with 4,760 additions and 199 deletions.
@@ -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;
@@ -10,6 +10,7 @@




class QgsMeshRendererMeshSettings
{
%Docstring
@@ -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
@@ -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/;
@@ -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:
@@ -210,6 +210,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
@@ -410,6 +418,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
)


@@ -584,6 +600,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
@@ -660,6 +677,7 @@ INCLUDE_DIRECTORIES(
../core/processing
../core/providers/memory
../core/raster
../core/mesh
../core/scalebar
../core/symbology
../gui

0 comments on commit aeea184

Please sign in to comment.