QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
callouts
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
"
23
#include "
qgssymbolwidgetcontext.h
"
24
25
#include <QPointer>
26
27
class
QgsCallout
;
28
class
QgsMapLayer
;
29
36
class
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
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
QPointer<
QgsMapLayer
> mLayer;
108
Qgis
::GeometryType mGeometryType =
Qgis
::GeometryType::Unknown;
109
111
QgsSymbolWidgetContext
mContext;
112
};
113
114
#endif
// QGSCALLOUTPANELWIDGET_H
Qgis
Provides global constants and enumerations for use throughout the application.
Definition
qgis.h:62
Qgis::GeometryType
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition
qgis.h:399
QgsCalloutPanelWidget::geometryType
Qgis::GeometryType geometryType() const
Returns the geometry type for the objects associated with the callouts.
Definition
qgscalloutpanelwidget.h:66
QgsCalloutPanelWidget::callout
QgsCallout * callout()
Returns a new callout, respecting the configuration from the widget.
Definition
qgscalloutpanelwidget.cpp:72
QgsCalloutPanelWidget::calloutChanged
void calloutChanged()
Emitted when the callout defined by the widget changes.
QgsCalloutPanelWidget::setGeometryType
void setGeometryType(Qgis::GeometryType type)
Sets the geometry type for the objects associated with the callouts.
Definition
qgscalloutpanelwidget.cpp:43
QgsCalloutPanelWidget::QgsCalloutPanelWidget
QgsCalloutPanelWidget(QWidget *parent=nullptr, QgsMapLayer *layer=nullptr)
Constructor for QgsCalloutPanelWidget, with the specified parent widget.
Definition
qgscalloutpanelwidget.cpp:25
QgsCallout
Abstract base class for callout renderers.
Definition
qgscallout.h:55
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition
qgssymbolwidgetcontext.h:35
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgspanelwidget.h
qgssymbolwidgetcontext.h
Generated on
for QGIS API Documentation by
1.17.0