Skip to content

Commit 7a0851c

Browse files
committedJul 18, 2017
Shell class for QgsLayoutItemMap
1 parent 00405fd commit 7a0851c

File tree

5 files changed

+119
-0
lines changed

5 files changed

+119
-0
lines changed
 

‎python/core/core_auto.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
%Include gps/qgsgpsdconnection.sip
382382
%Include layout/qgslayout.sip
383383
%Include layout/qgslayoutitem.sip
384+
%Include layout/qgslayoutitemmap.sip
384385
%Include layout/qgslayoutitemregistry.sip
385386
%Include layout/qgslayoutobject.sip
386387
%Include symbology-ng/qgscptcityarchive.sip
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/layout/qgslayoutitemmap.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
class QgsLayoutItemMap : QgsLayoutItem
12+
{
13+
%Docstring
14+
Layout graphical items for displaying a map.
15+
.. versionadded:: 3.0
16+
%End
17+
18+
%TypeHeaderCode
19+
#include "qgslayoutitemmap.h"
20+
%End
21+
public:
22+
23+
explicit QgsLayoutItemMap( QgsLayout *layout );
24+
%Docstring
25+
Constructor for QgsLayoutItemMap, with the specified parent ``layout``.
26+
%End
27+
28+
protected:
29+
30+
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
31+
32+
};
33+
34+
/************************************************************************
35+
* This file has been generated automatically from *
36+
* *
37+
* src/core/layout/qgslayoutitemmap.h *
38+
* *
39+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
40+
************************************************************************/

‎src/core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ SET(QGIS_CORE_SRCS
352352
layout/qgslayout.cpp
353353
layout/qgslayoutcontext.cpp
354354
layout/qgslayoutitem.cpp
355+
layout/qgslayoutitemmap.cpp
355356
layout/qgslayoutitemregistry.cpp
356357
layout/qgslayoutmeasurement.cpp
357358
layout/qgslayoutmeasurementconverter.cpp
@@ -674,6 +675,7 @@ SET(QGIS_CORE_MOC_HDRS
674675

675676
layout/qgslayout.h
676677
layout/qgslayoutitem.h
678+
layout/qgslayoutitemmap.h
677679
layout/qgslayoutitemregistry.h
678680
layout/qgslayoutobject.h
679681

‎src/core/layout/qgslayoutitemmap.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/***************************************************************************
2+
qgslayoutitemmap.cpp
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+
17+
#include "qgslayoutitemmap.h"
18+
#include "qgslayout.h"
19+
#include "qgslayoututils.h"
20+
#include <QPainter>
21+
22+
QgsLayoutItemMap::QgsLayoutItemMap( QgsLayout *layout )
23+
: QgsLayoutItem( layout )
24+
{
25+
}
26+
27+
void QgsLayoutItemMap::draw( QgsRenderContext &, const QStyleOptionGraphicsItem * )
28+
{
29+
30+
}

‎src/core/layout/qgslayoutitemmap.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/***************************************************************************
2+
qgslayoutitemmap.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+
17+
#ifndef QGSLAYOUTITEMMAP_H
18+
#define QGSLAYOUTITEMMAP_H
19+
20+
#include "qgis_core.h"
21+
#include "qgslayoutitem.h"
22+
23+
/**
24+
* \ingroup core
25+
* \class QgsLayoutItemMap
26+
* \brief Layout graphical items for displaying a map.
27+
* \since QGIS 3.0
28+
*/
29+
class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
30+
{
31+
32+
Q_OBJECT
33+
34+
public:
35+
36+
/**
37+
* Constructor for QgsLayoutItemMap, with the specified parent \a layout.
38+
*/
39+
explicit QgsLayoutItemMap( QgsLayout *layout );
40+
41+
protected:
42+
43+
void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = nullptr ) override;
44+
};
45+
46+
#endif //QGSLAYOUTITEMMAP_H

0 commit comments

Comments
 (0)
Please sign in to comment.