QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgs3dsymbolwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgs3dsymbolwidget.h
3  --------------------------------------
4  Date : July 2020
5  Copyright : (C) 2020 by Nyall Dawson
6  Email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGS3DSYMBOLWIDGET_H
17 #define QGS3DSYMBOLWIDGET_H
18 
19 #include <QWidget>
20 #include <QDialog>
21 #include "qgis_gui.h"
22 #include "qgis_sip.h"
23 
25 class QgsVectorLayer;
26 class QDialogButtonBox;
27 
34 class GUI_EXPORT Qgs3DSymbolWidget : public QWidget
35 {
36  Q_OBJECT
37 
38  public:
39 
43  Qgs3DSymbolWidget( QWidget *parent );
44 
48  virtual void setSymbol( const QgsAbstract3DSymbol *symbol, QgsVectorLayer *layer ) = 0;
49 
56 
60  virtual QString symbolType() const = 0;
61 
62  signals:
63 
67  void changed();
68 };
69 
70 
71 
77 class GUI_EXPORT Qgs3DSymbolDialog : public QDialog
78 {
79  Q_OBJECT
80 
81  public:
82 
86  Qgs3DSymbolDialog( const QgsAbstract3DSymbol *symbol, QWidget *parent SIP_TRANSFERTHIS = nullptr );
87 
93  QgsAbstract3DSymbol *symbol() const SIP_FACTORY;
94 
98  QDialogButtonBox *buttonBox() const;
99 
100  private:
101 
102  Qgs3DSymbolWidget *mWidget = nullptr;
103  QDialogButtonBox *mButtonBox = nullptr;
104 
105 };
106 
107 #endif // QGS3DSYMBOLWIDGET_H
Qgs3DSymbolWidget::symbolType
virtual QString symbolType() const =0
Returns the symbol type handled by the widget.
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
Qgs3DSymbolWidget::symbol
virtual QgsAbstract3DSymbol * symbol()=0
Returns a new instance of the symbol defined by the widget.
QgsAbstract3DSymbol
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
Definition: qgsabstract3dsymbol.h:46
Qgs3DSymbolWidget::setSymbol
virtual void setSymbol(const QgsAbstract3DSymbol *symbol, QgsVectorLayer *layer)=0
Sets the symbol to show in the widget.
qgis_sip.h
Qgs3DSymbolWidget
Base class for 3D symbol configuration widgets.
Definition: qgs3dsymbolwidget.h:35
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
Qgs3DSymbolWidget::changed
void changed()
Emitted when the symbol is changed.
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
Qgs3DSymbolDialog
A dialog for configuring a 3D symbol.
Definition: qgs3dsymbolwidget.h:78