QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
layout
qgslayoutreportcontext.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutreportcontext.h
3
-------------------
4
begin : July 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
/***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#ifndef QGSLAYOUTREPORTCONTEXT_H
17
#define QGSLAYOUTREPORTCONTEXT_H
18
19
#include "qgis_core.h"
20
#include "
qgsfeature.h
"
21
#include "
qgslayout.h
"
22
23
#include <QPointer>
24
#include <QtGlobal>
25
31
class
CORE_EXPORT
QgsLayoutReportContext
:
public
QObject
32
{
33
Q_OBJECT
34
35
public
:
39
QgsLayoutReportContext
(
QgsLayout
*layout
SIP_TRANSFERTHIS
);
40
50
void
setFeature
(
const
QgsFeature
&
feature
);
51
59
QgsFeature
feature
()
const
{
return
mFeature; }
60
70
QgsGeometry
currentGeometry(
const
QgsCoordinateReferenceSystem
&crs =
QgsCoordinateReferenceSystem
() )
const
;
71
76
QgsVectorLayer
*layer()
const
;
77
85
void
setLayer(
QgsVectorLayer
*layer );
86
93
Q_DECL_DEPRECATED
void
setPredefinedScales(
const
QVector<qreal> &scales )
SIP_DEPRECATED
;
94
100
Q_DECL_DEPRECATED QVector<qreal>
predefinedScales
() const
SIP_DEPRECATED
{
return
mPredefinedScales; }
101
102
signals:
103
107
void
layerChanged
(
QgsVectorLayer
*
layer
);
108
113
void
changed
();
114
115
private
:
116
QgsLayout
*mLayout =
nullptr
;
117
118
QgsFeature
mFeature;
119
QPointer< QgsVectorLayer > mLayer;
120
121
// projected geometry cache
122
mutable
QMap<long, QgsGeometry> mGeometryCache;
123
124
//list of predefined scales
125
QVector<qreal> mPredefinedScales;
126
127
friend
class
QgsLayoutExporter
;
128
friend
class
TestQgsLayout
;
129
};
130
131
#endif
//QGSLAYOUTREPORTCONTEXT_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition
qgsfeature.h:60
QgsGeometry
A geometry is the spatial representation of a feature.
Definition
qgsgeometry.h:267
QgsLayoutReportContext::setFeature
void setFeature(const QgsFeature &feature)
Sets the current feature for evaluating the layout.
Definition
qgslayoutreportcontext.cpp:30
QgsLayoutReportContext::feature
QgsFeature feature() const
Returns the current feature for evaluating the layout.
Definition
qgslayoutreportcontext.h:59
QgsLayoutReportContext::layerChanged
void layerChanged(QgsVectorLayer *layer)
Emitted when the context's layer is changed.
QgsLayoutReportContext::QgsLayoutExporter
friend class QgsLayoutExporter
Definition
qgslayoutreportcontext.h:127
QgsLayoutReportContext::QgsLayoutReportContext
QgsLayoutReportContext(QgsLayout *layout)
Constructor for QgsLayoutReportContext.
Definition
qgslayoutreportcontext.cpp:25
QgsLayoutReportContext::changed
void changed()
Emitted certain settings in the context is changed, e.g.
QgsLayoutReportContext::layer
QgsVectorLayer * layer() const
Returns the vector layer associated with the layout's context.
Definition
qgslayoutreportcontext.cpp:69
QgsLayoutReportContext::predefinedScales
Q_DECL_DEPRECATED QVector< qreal > predefinedScales() const
Returns the current list of predefined scales for use with the layout.
Definition
qgslayoutreportcontext.h:100
QgsLayoutReportContext::TestQgsLayout
friend class TestQgsLayout
Definition
qgslayoutreportcontext.h:128
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition
qgslayout.h:51
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition
qgis_sip.h:113
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsfeature.h
qgslayout.h
Generated on
for QGIS API Documentation by
1.17.0