QGIS API Documentation 3.99.0-Master (0c964c3d988)
Loading...
Searching...
No Matches
qgsextentbufferdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsextentbufferdialog.h
3 ---------------------
4 begin : December 2024
5 copyright : (C) 2024 by Juho Ervasti
6 email : juho dot ervasti at gispo dot fi
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#ifndef QGSEXTENTBUFFERDIALOG_H
16#define QGSEXTENTBUFFERDIALOG_H
17
18
19#include "ui_qgsextentbufferdialogbase.h"
20
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23#include "qgssymbol.h"
25
26#include <QDialog>
27
28#define SIP_NO_FILE
29
30class QgsVectorLayer;
31
39class GUI_EXPORT QgsExtentBufferWidget : public QgsPanelWidget, public QgsExpressionContextGenerator, private Ui::QgsExtentBufferDialogBase
40{
41 Q_OBJECT
42 public:
46 QgsExtentBufferWidget( QgsSymbol *symbol, QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr );
47
53 double extentBuffer() const;
54
61
68
74
80
81 private:
82 QgsSymbol *mSymbol = nullptr;
83 QgsVectorLayer *mLayer = nullptr;
85
87
93 void registerDataDefinedButton( QgsPropertyOverrideButton *button, QgsSymbol::Property key );
94};
95
102class GUI_EXPORT QgsExtentBufferDialog : public QDialog
103{
104 Q_OBJECT
105 public:
107 QgsExtentBufferDialog( QgsSymbol *symbol, QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr );
108
112 double extentBuffer() const;
113
118
127
136
141 void setContext( const QgsSymbolWidgetContext &context );
142
143 private:
144 QgsExtentBufferWidget *mWidget;
145
146 private slots:
147
148 void showHelp();
149};
150
151#endif // QGSEXTENTBUFFERDIALOG_H
RenderUnit
Rendering size units.
Definition qgis.h:5305
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which widget is shown, e.g., the associated map canvas and expression contexts.
QgsExtentBufferDialog(QgsSymbol *symbol, QgsVectorLayer *layer, QWidget *parent=nullptr)
Constructor for QgsExtentBufferDialog.
QgsProperty dataDefinedProperty() const
Returns the extent buffer value currently set in the widget.
QgsExtentBufferWidget * widget() const
Returns the data defined property currently set in the widget.
double extentBuffer() const
Returns the extent buffer value currently set in the widget.
Qgis::RenderUnit sizeUnit() const
Returns the extent buffer unit currently set in the widget.
A widget which allows the user to modify the rendering order of extent buffers.
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which widget is shown, e.g., the associated map canvas and expression contexts.
QgsSymbolWidgetContext context() const
Returns the context in which the widget is shown, e.g., the associated map canvas and expression cont...
double extentBuffer() const
Returns the extent buffer value currently set in the widget.
QgsProperty dataDefinedProperty() const
Returns the data defined property currently set in the widget.
QgsExtentBufferWidget(QgsSymbol *symbol, QgsVectorLayer *layer, QWidget *parent=nullptr)
Constructor for QgsExtentBufferWidget.
Qgis::RenderUnit sizeUnit() const
Returns the extent buffer unit currently set in the widget.
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
A button for controlling property overrides which may apply to a widget.
A store for object properties.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
Property
Data definable properties.
Definition qgssymbol.h:270
Represents a vector layer which manages a vector based dataset.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:52