QGIS API Documentation 4.1.0-Master (60fea48833c)
Loading...
Searching...
No Matches
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// clang-format off
26// this is needed for the "convert to subclass" code below to compile
27% ModuleHeaderCode
29% End
30// clang-format on
31#endif
32
38 class CORE_EXPORT QgsRenderedItemDetails
39{
40 public:
41#ifdef SIP_RUN
43 if ( dynamic_cast<QgsRenderedAnnotationItemDetails *>( sipCpp ) )
44 sipType = sipType_QgsRenderedAnnotationItemDetails;
45 else
46 sipType = 0;
48#endif
49
53 QgsRenderedItemDetails( const QString &layerId );
54
56
60 QString layerId() const { return mLayerId; }
61
67 QgsRectangle boundingBox() const { return mBounds; }
68
74 void setBoundingBox( const QgsRectangle &bounds ) { mBounds = bounds; }
75
76 private:
77 QString mLayerId;
78 QgsRectangle mBounds;
79};
80
81#endif // QGSRENDEREDITEMDETAILS_H
A rectangle specified with double values.
Contains information about a rendered annotation item.
void setBoundingBox(const QgsRectangle &bounds)
Sets the bounding box of the item (in map units).
QgsRenderedItemDetails(const QString &layerId)
Constructor for QgsRenderedItemDetails.
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:198
#define SIP_END
Definition qgis_sip.h:215