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 11, 2018
1 parent b3d2619 commit aeea1848902afb7a7e78386212f5778aaf400aa2
Showing with 4,760 additions and 199 deletions.
  1. +2 −0 python/core/auto_generated/mesh/qgsmeshdataprovider.sip.in
  2. +7 −41 python/core/auto_generated/mesh/qgsmeshrenderersettings.sip.in
  3. +7 −0 python/core/auto_generated/raster/qgscolorrampshader.sip.in
  4. +10 −0 python/gui/auto_generated/raster/qgssinglebandpseudocolorrendererwidget.sip.in
  5. +18 −0 src/app/CMakeLists.txt
  6. +286 −0 src/app/mesh/qgsmeshdatasetgrouptreeview.cpp
  7. +136 −0 src/app/mesh/qgsmeshdatasetgrouptreeview.h
  8. +197 −0 src/app/mesh/qgsmeshlayerproperties.cpp
  9. +72 −0 src/app/mesh/qgsmeshlayerproperties.h
  10. +186 −0 src/app/mesh/qgsmeshrendereractivedatasetwidget.cpp
  11. +94 −0 src/app/mesh/qgsmeshrendereractivedatasetwidget.h
  12. +73 −0 src/app/mesh/qgsmeshrenderermeshsettingswidget.cpp
  13. +72 −0 src/app/mesh/qgsmeshrenderermeshsettingswidget.h
  14. +145 −0 src/app/mesh/qgsmeshrendererscalarsettingswidget.cpp
  15. +75 −0 src/app/mesh/qgsmeshrendererscalarsettingswidget.h
  16. +155 −0 src/app/mesh/qgsmeshrenderervectorsettingswidget.cpp
  17. +75 −0 src/app/mesh/qgsmeshrenderervectorsettingswidget.h
  18. +105 −0 src/app/mesh/qgsrenderermeshpropertieswidget.cpp
  19. +60 −0 src/app/mesh/qgsrenderermeshpropertieswidget.h
  20. +12 −0 src/app/qgisapp.cpp
  21. +32 −2 src/app/qgslayerstylingwidget.cpp
  22. +2 −0 src/app/qgslayerstylingwidget.h
  23. +2 −0 src/core/mesh/qgsmeshdataprovider.h
  24. +2 −0 src/core/mesh/qgsmeshlayer.cpp
  25. +32 −21 src/core/mesh/qgsmeshlayerrenderer.cpp
  26. +2 −1 src/core/mesh/qgsmeshlayerrenderer.h
  27. +3 −0 src/core/mesh/qgsmeshmemorydataprovider.cpp
  28. +6 −28 src/core/mesh/qgsmeshrenderersettings.cpp
  29. +9 −41 src/core/mesh/qgsmeshrenderersettings.h
  30. +1 −9 src/core/mesh/qgsmeshvectorrenderer.cpp
  31. +0 −4 src/core/mesh/qgsmeshvectorrenderer.h
  32. +14 −2 src/core/raster/qgscolorrampshader.cpp
  33. +6 −0 src/core/raster/qgscolorrampshader.h
  34. +2 −0 src/gui/CMakeLists.txt
  35. +778 −0 src/gui/raster/qgscolorrampshaderwidget.cpp
  36. +142 −0 src/gui/raster/qgscolorrampshaderwidget.h
  37. +12 −3 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
  38. +6 −0 src/gui/raster/qgssinglebandpseudocolorrendererwidget.h
  39. +12 −1 src/providers/mdal/qgsmdalprovider.cpp
  40. +2 −0 src/ui/CMakeLists.txt
  41. +467 −0 src/ui/mesh/qgsmeshlayerpropertiesbase.ui
  42. +130 −0 src/ui/mesh/qgsmeshrendereractivedatasetwidgetbase.ui
  43. +53 −0 src/ui/mesh/qgsmeshrenderermeshsettingswidgetbase.ui
  44. +78 −0 src/ui/mesh/qgsmeshrendererscalarsettingswidgetbase.ui
  45. +228 −0 src/ui/mesh/qgsmeshrenderervectorsettingswidgetbase.ui
  46. +144 −0 src/ui/mesh/qgsrenderermeshpropswidgetbase.ui
  47. +322 −0 src/ui/qgscolorrampshaderwidgetbase.ui
  48. +164 −46 src/ui/qgsrasterlayerpropertiesbase.ui
  49. +28 −0 src/ui/qgssinglebandpseudocolorrendererwidgetbase.ui
  50. +294 −0 src/ui/raster/qgscolorrampshaderwidgetbase.ui
@@ -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.
You can’t perform that action at this time.