QGIS API Documentation 3.29.0-Master (19d7edcfed)
qgsrendereditemdetails.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrendereditemdetails.h
3 ----------------
4 copyright : (C) 2021 by Nyall Dawson
5 email : nyall dot dawson at gmail dot com
6 ***************************************************************************/
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
17#ifndef QGSRENDEREDITEMDETAILS_H
18#define QGSRENDEREDITEMDETAILS_H
19
20#include "qgis_core.h"
21#include "qgis_sip.h"
22#include "qgsrectangle.h"
23
24#ifdef SIP_RUN
25// this is needed for the "convert to subclass" code below to compile
26% ModuleHeaderCode
28% End
29#endif
30
36class CORE_EXPORT QgsRenderedItemDetails
37{
38 public:
39
40#ifdef SIP_RUN
42 if ( dynamic_cast<QgsRenderedAnnotationItemDetails *>( sipCpp ) )
43 sipType = sipType_QgsRenderedAnnotationItemDetails;
44 else
45 sipType = 0;
47#endif
48
52 QgsRenderedItemDetails( const QString &layerId );
53
55
59 QString layerId() const { return mLayerId; }
60
66 QgsRectangle boundingBox() const { return mBounds; }
67
73 void setBoundingBox( const QgsRectangle &bounds ) { mBounds = bounds; }
74
75 private:
76
77 QString mLayerId;
78 QgsRectangle mBounds;
79};
80
81#endif // QGSRENDEREDITEMDETAILS_H
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Contains information about a rendered annotation item.
Base class for detailed information about a rendered item.
void setBoundingBox(const QgsRectangle &bounds)
Sets the bounding box of the item (in map units).
QString layerId() const
Returns the layer ID of the associated map layer.
virtual ~QgsRenderedItemDetails()
QgsRectangle boundingBox() const
Returns the bounding box of the item (in map units).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:186
#define SIP_END
Definition: qgis_sip.h:203