QGIS API Documentation 3.41.0-Master (57ec4277f5e)
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 "qgis_sip.h"
19#include "qgis_gui.h"
20#include "qgspanelwidget.h"
22#include "ui_qgscalloutpanelwidget.h"
23
24#include <QPointer>
25
26class QgsCallout;
27class QgsMapLayer;
28
35class GUI_EXPORT QgsCalloutPanelWidget : public QgsPanelWidget, private Ui::QgsCalloutPanelWidgetBase
36{
37 Q_OBJECT
38
39 public:
45 QgsCalloutPanelWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsMapLayer *layer = nullptr );
46
55 void setGeometryType( Qgis::GeometryType type );
56
65 Qgis::GeometryType geometryType() const { return mGeometryType; }
66
71 void setContext( const QgsSymbolWidgetContext &context );
72
77 QgsSymbolWidgetContext context() const;
78
86 void setCallout( const QgsCallout *callout );
87
93 QgsCallout *callout() SIP_FACTORY;
94
95 signals:
96
98 void calloutChanged();
99
100 private slots:
101
102 void calloutTypeChanged();
103 void updateCalloutWidget( const QgsCallout *callout );
104
105 private:
106 QPointer<QgsMapLayer> mLayer;
107 Qgis::GeometryType mGeometryType = Qgis::GeometryType::Unknown;
108
110 QgsSymbolWidgetContext mContext;
111};
112
113#endif // QGSCALLOUTPANELWIDGET_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:337
A panel widget for configuration of callouts.
Qgis::GeometryType geometryType() const
Returns the geometry type for the objects associated with the callouts.
Abstract base class for callout renderers.
Definition qgscallout.h:54
Base class for all map layer types.
Definition qgsmaplayer.h:76
Base class for any widget that can be shown as a 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:76