Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial shell for QgsPointCloudRendererWidget
- Loading branch information
1 parent
bf8ccad
commit 090afdd
Showing
5 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
python/gui/auto_generated/pointcloud/qgspointcloudrendererwidget.sip.in
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,69 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/pointcloud/qgspointcloudrendererwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsPointCloudRendererWidget : QgsPanelWidget | ||
{ | ||
%Docstring | ||
Base class for point cloud 2D renderer settings widgets. | ||
|
||
.. versionadded:: 3.18 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgspointcloudrendererwidget.h" | ||
%End | ||
public: | ||
|
||
QgsPointCloudRendererWidget( QgsPointCloudLayer *layer, QgsStyle *style ); | ||
%Docstring | ||
Constructor for QgsPointCloudRendererWidget, associated with the | ||
specified ``layer`` and ``style`` database. | ||
%End | ||
|
||
virtual QgsPointCloudRenderer *renderer() /Factory/ = 0; | ||
%Docstring | ||
Returns a new instance of a renderer as defined by the settings in the widget. | ||
|
||
Caller takes ownership of the returned object. | ||
%End | ||
|
||
virtual void setContext( const QgsSymbolWidgetContext &context ); | ||
%Docstring | ||
Sets the ``context`` in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. | ||
|
||
.. seealso:: :py:func:`context` | ||
%End | ||
|
||
QgsSymbolWidgetContext context() const; | ||
%Docstring | ||
Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. | ||
|
||
.. seealso:: :py:func:`setContext` | ||
%End | ||
|
||
const QgsPointCloudLayer *layer() const; | ||
%Docstring | ||
Returns the point cloud layer associated with the widget. | ||
%End | ||
|
||
signals: | ||
|
||
protected: | ||
|
||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/pointcloud/qgspointcloudrendererwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
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,32 @@ | ||
/*************************************************************************** | ||
qgspointcloudrendererwidget.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 "qgspointcloudrendererwidget.h" | ||
|
||
QgsPointCloudRendererWidget::QgsPointCloudRendererWidget( QgsPointCloudLayer *layer, QgsStyle *style ) | ||
: mLayer( layer ) | ||
, mStyle( style ) | ||
{ | ||
} | ||
|
||
void QgsPointCloudRendererWidget::setContext( const QgsSymbolWidgetContext &context ) | ||
{ | ||
mContext = context; | ||
} | ||
|
||
QgsSymbolWidgetContext QgsPointCloudRendererWidget::context() const | ||
{ | ||
return mContext; | ||
} | ||
|
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,82 @@ | ||
/*************************************************************************** | ||
qgspointcloudrendererwidget.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 QGSPOINTCLOUDRENDERERWIDGET_H | ||
#define QGSPOINTCLOUDRENDERERWIDGET_H | ||
|
||
#include <QWidget> | ||
#include <QMenu> | ||
#include <QStackedWidget> | ||
#include "qgis_sip.h" | ||
#include "qgspanelwidget.h" | ||
#include "qgssymbolwidgetcontext.h" | ||
|
||
class QgsPointCloudLayer; | ||
class QgsStyle; | ||
class QgsPointCloudRenderer; | ||
class QgsMapCanvas; | ||
|
||
/** | ||
* \ingroup gui | ||
* Base class for point cloud 2D renderer settings widgets. | ||
* | ||
* \since QGIS 3.18 | ||
*/ | ||
class GUI_EXPORT QgsPointCloudRendererWidget : public QgsPanelWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
|
||
/** | ||
* Constructor for QgsPointCloudRendererWidget, associated with the | ||
* specified \a layer and \a style database. | ||
*/ | ||
QgsPointCloudRendererWidget( QgsPointCloudLayer *layer, QgsStyle *style ); | ||
|
||
/** | ||
* Returns a new instance of a renderer as defined by the settings in the widget. | ||
* | ||
* Caller takes ownership of the returned object. | ||
*/ | ||
virtual QgsPointCloudRenderer *renderer() SIP_FACTORY = 0; | ||
|
||
/** | ||
* Sets the \a context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. | ||
* \see context() | ||
*/ | ||
virtual void setContext( const QgsSymbolWidgetContext &context ); | ||
|
||
/** | ||
* Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. | ||
* \see setContext() | ||
*/ | ||
QgsSymbolWidgetContext context() const; | ||
|
||
/** | ||
* Returns the point cloud layer associated with the widget. | ||
*/ | ||
const QgsPointCloudLayer *layer() const { return mLayer; } | ||
|
||
signals: | ||
|
||
protected: | ||
QgsPointCloudLayer *mLayer = nullptr; | ||
QgsStyle *mStyle = nullptr; | ||
|
||
//! Context in which widget is shown | ||
QgsSymbolWidgetContext mContext; | ||
|
||
}; | ||
|
||
#endif // QGSPOINTCLOUDRENDERERWIDGET_H |