QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
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:
40
46 QgsCalloutPanelWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsMapLayer *layer = nullptr );
47
56 void setGeometryType( Qgis::GeometryType type );
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
99 void calloutChanged();
100
101 private slots:
102
103 void calloutTypeChanged();
104 void updateCalloutWidget( const QgsCallout *callout );
105
106 private:
107
108 QPointer< QgsMapLayer > mLayer;
109 Qgis::GeometryType mGeometryType = Qgis::GeometryType::Unknown;
110
112 QgsSymbolWidgetContext mContext;
113};
114
115#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