Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shell for 2d renderer config to layer styling dock
- Loading branch information
1 parent
0557160
commit 1758ca1
Showing
16 changed files
with
153 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*************************************************************************** | ||
qgspointcloudlayerstylewidget.cpp | ||
--------------------- | ||
begin : November 2020 | ||
copyright : (C) 2020 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgspointcloudlayerstylewidget.h" | ||
#include "qgspointcloudrendererpropertieswidget.h" | ||
#include "qgsstyle.h" | ||
#include "qgsapplication.h" | ||
#include "qgsmaplayer.h" | ||
#include "qgspointcloudlayer.h" | ||
|
||
QgsPointCloudRendererWidgetFactory::QgsPointCloudRendererWidgetFactory( QObject *parent ) | ||
: QObject( parent ) | ||
{ | ||
setIcon( QgsApplication::getThemeIcon( QStringLiteral( "propertyicons/symbology.svg" ) ) ); | ||
setTitle( tr( "Symbology" ) ); | ||
} | ||
|
||
QgsMapLayerConfigWidget *QgsPointCloudRendererWidgetFactory::createWidget( QgsMapLayer *layer, QgsMapCanvas *, bool, QWidget *parent ) const | ||
{ | ||
return new QgsPointCloudRendererPropertiesWidget( qobject_cast< QgsPointCloudLayer * >( layer ), QgsStyle::defaultStyle(), parent ); | ||
} | ||
|
||
bool QgsPointCloudRendererWidgetFactory::supportLayerPropertiesDialog() const | ||
{ | ||
return true; | ||
} | ||
|
||
bool QgsPointCloudRendererWidgetFactory::supportsStyleDock() const | ||
{ | ||
return true; | ||
} | ||
|
||
bool QgsPointCloudRendererWidgetFactory::supportsLayer( QgsMapLayer *layer ) const | ||
{ | ||
return layer->type() == QgsMapLayerType::PointCloudLayer; | ||
} | ||
|
||
QString QgsPointCloudRendererWidgetFactory::layerPropertiesPagePositionHint() const | ||
{ | ||
return QStringLiteral( "mOptsPage_Metadata" ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*************************************************************************** | ||
qgspointcloudlayerstylewidget.h | ||
--------------------- | ||
begin : November 2020 | ||
copyright : (C) 2020 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSPOINTCLOUDLAYERSTYLEWIDGET_H | ||
#define QGSPOINTCLOUDLAYERSTYLEWIDGET_H | ||
|
||
#include "qgsmaplayerconfigwidget.h" | ||
#include "qgsmaplayerconfigwidgetfactory.h" | ||
|
||
class QgsPointCloudRendererWidgetFactory : public QObject, public QgsMapLayerConfigWidgetFactory | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit QgsPointCloudRendererWidgetFactory( QObject *parent = nullptr ); | ||
|
||
QgsMapLayerConfigWidget *createWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget, QWidget *parent ) const override; | ||
bool supportLayerPropertiesDialog() const override; | ||
bool supportsStyleDock() const override; | ||
bool supportsLayer( QgsMapLayer *layer ) const override; | ||
QString layerPropertiesPagePositionHint() const override; | ||
}; | ||
|
||
|
||
|
||
#endif // QGSPOINTCLOUDLAYERSTYLEWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters