Skip to content
Permalink
Browse files

Initial shell for QgsPointCloudRendererWidget

  • Loading branch information
nyalldawson committed Nov 16, 2020
1 parent bf8ccad commit 090afdd636e582909fbe2114622a5a2d74ed41e7
@@ -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 *
************************************************************************/
@@ -334,6 +334,7 @@
%Include auto_generated/numericformats/qgsnumericformatselectorwidget.sip
%Include auto_generated/numericformats/qgsnumericformatwidget.sip
%Include auto_generated/numericformats/qgsnumericformatguiregistry.sip
%Include auto_generated/pointcloud/qgspointcloudrendererwidget.sip
%Include auto_generated/processing/qgsprocessingaggregatewidgets.sip
%Include auto_generated/processing/qgsprocessingalgorithmconfigurationwidget.sip
%Include auto_generated/processing/qgsprocessingalgorithmdialogbase.sip
@@ -287,6 +287,8 @@ set(QGIS_GUI_SRCS
ogr/qgsnewogrconnection.cpp
ogr/qgsvectorlayersaveasdialog.cpp

pointcloud/qgspointcloudrendererwidget.cpp

processing/qgsprocessingaggregatewidgets.cpp
processing/qgsprocessingaggregatewidgetwrapper.cpp
processing/qgsprocessingalgorithmconfigurationwidget.cpp
@@ -1056,6 +1058,8 @@ set(QGIS_GUI_HDRS
ogr/qgsogrhelperfunctions.h
ogr/qgsvectorlayersaveasdialog.h

pointcloud/qgspointcloudrendererwidget.h

processing/qgsprocessingaggregatewidgets.h
processing/qgsprocessingaggregatewidgetwrapper.h
processing/qgsprocessingalgorithmconfigurationwidget.h
@@ -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;
}

@@ -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

0 comments on commit 090afdd

Please sign in to comment.
You can’t perform that action at this time.