QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
labeling
qgscalloutposition.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscalloutposition.h
3
-------------------
4
begin : February 2021
5
copyright : (C) 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
16
#ifndef QGSCALLOUTPOSITION_H
17
#define QGSCALLOUTPOSITION_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
#include "
qgsfeatureid.h
"
22
23
#include <QPointF>
24
31
class
CORE_EXPORT
QgsCalloutPosition
32
{
33
public
:
40
QgsCalloutPosition
(
QgsFeatureId
id
,
const
QString &layer,
const
QString &providerId = QString() )
41
:
featureId
( id )
42
,
layerID
( layer )
43
,
providerID
( providerId )
44
{}
45
46
QgsCalloutPosition
() =
default
;
47
51
QgsFeatureId
featureId
=
FID_NULL
;
52
56
QString
layerID
;
57
61
QString
providerID
;
62
71
QPointF
origin
()
const
{
return
mOrigin; }
72
81
void
setOrigin
(
const
QPointF &
origin
) { mOrigin =
origin
; }
82
91
QPointF
destination
()
const
{
return
mDestination; }
92
101
void
setDestination
(
const
QPointF &
destination
) { mDestination =
destination
; }
102
111
bool
originIsPinned
()
const
{
return
mOriginIsPinned; }
112
121
void
setOriginIsPinned
(
bool
pinned ) { mOriginIsPinned = pinned; }
122
131
bool
destinationIsPinned
()
const
{
return
mDestinationIsPinned; }
132
141
void
setDestinationIsPinned
(
bool
pinned ) { mDestinationIsPinned = pinned; }
142
143
private
:
144
QPointF mOrigin;
145
146
QPointF mDestination;
147
148
bool
mOriginIsPinned =
false
;
149
bool
mDestinationIsPinned =
false
;
150
};
151
152
#endif
// QGSCALLOUTPOSITION_H
QgsCalloutPosition::featureId
QgsFeatureId featureId
ID of feature associated with this callout.
Definition
qgscalloutposition.h:51
QgsCalloutPosition::setDestination
void setDestination(const QPointF &destination)
Sets the destination of the callout line, in map coordinates.
Definition
qgscalloutposition.h:101
QgsCalloutPosition::providerID
QString providerID
ID of the associated label provider.
Definition
qgscalloutposition.h:61
QgsCalloutPosition::origin
QPointF origin() const
Returns the origin of the callout line, in map coordinates.
Definition
qgscalloutposition.h:71
QgsCalloutPosition::setOrigin
void setOrigin(const QPointF &origin)
Sets the origin of the callout line, in map coordinates.
Definition
qgscalloutposition.h:81
QgsCalloutPosition::QgsCalloutPosition
QgsCalloutPosition()=default
QgsCalloutPosition::destination
QPointF destination() const
Returns the destination of the callout line, in map coordinates.
Definition
qgscalloutposition.h:91
QgsCalloutPosition::originIsPinned
bool originIsPinned() const
Returns true if the origin of the callout has pinned (manually placed).
Definition
qgscalloutposition.h:111
QgsCalloutPosition::destinationIsPinned
bool destinationIsPinned() const
Returns true if the destination of the callout has pinned (manually placed).
Definition
qgscalloutposition.h:131
QgsCalloutPosition::QgsCalloutPosition
QgsCalloutPosition(QgsFeatureId id, const QString &layer, const QString &providerId=QString())
Constructor for QgsCalloutPosition.
Definition
qgscalloutposition.h:40
QgsCalloutPosition::layerID
QString layerID
ID of associated map layer.
Definition
qgscalloutposition.h:56
QgsCalloutPosition::setDestinationIsPinned
void setDestinationIsPinned(bool pinned)
Sets whether the destination of the callout has pinned (manually placed).
Definition
qgscalloutposition.h:141
QgsCalloutPosition::setOriginIsPinned
void setOriginIsPinned(bool pinned)
Sets whether the origin of the callout has pinned (manually placed).
Definition
qgscalloutposition.h:121
qgis_sip.h
qgsfeatureid.h
FID_NULL
#define FID_NULL
Definition
qgsfeatureid.h:33
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition
qgsfeatureid.h:32
Generated on
for QGIS API Documentation by
1.17.0