QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgscalloutpanelwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgscalloutpanelwidget.h
3 ---------------------
4 begin : July 2024
5 copyright : (C) 2024 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#ifndef QGSCALLOUTPANELWIDGET_H
16#define QGSCALLOUTPANELWIDGET_H
17
18#include "ui_qgscalloutpanelwidget.h"
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
22#include "qgspanelwidget.h"
24
25#include <QPointer>
26
27class QgsCallout;
28class QgsMapLayer;
29
36class GUI_EXPORT QgsCalloutPanelWidget : public QgsPanelWidget, private Ui::QgsCalloutPanelWidgetBase
37{
38 Q_OBJECT
39
40 public:
46 QgsCalloutPanelWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsMapLayer *layer = nullptr );
47
57
66 Qgis::GeometryType geometryType() const { return mGeometryType; }
67
72 void setContext( const QgsSymbolWidgetContext &context );
73
78 QgsSymbolWidgetContext context() const;
79
87 void setCallout( const QgsCallout *callout );
88
94 QgsCallout *callout() SIP_FACTORY;
95
96 signals:
97
100
101 private slots:
102
103 void calloutTypeChanged();
104 void updateCalloutWidget( const QgsCallout *callout );
105
106 private:
107 QPointer<QgsMapLayer> mLayer;
108 Qgis::GeometryType mGeometryType = Qgis::GeometryType::Unknown;
109
111 QgsSymbolWidgetContext mContext;
112};
113
114#endif // QGSCALLOUTPANELWIDGET_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:56
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:358
Qgis::GeometryType geometryType() const
Returns the geometry type for the objects associated with the callouts.
QgsCallout * callout()
Returns a new callout, respecting the configuration from the widget.
void calloutChanged()
Emitted when the callout defined by the widget changes.
void setGeometryType(Qgis::GeometryType type)
Sets the geometry type for the objects associated with the callouts.
QgsCalloutPanelWidget(QWidget *parent=nullptr, QgsMapLayer *layer=nullptr)
Constructor for QgsCalloutPanelWidget, with the specified parent widget.
Abstract base class for callout renderers.
Definition qgscallout.h:55
Base class for all map layer types.
Definition qgsmaplayer.h:80
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:84