-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QgsLayout subclass, QgsPrintLayout
A print layout is a layout with an atlas
- Loading branch information
1 parent
bd7784c
commit e6a6db8
Showing
8 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/layout/qgsprintlayout.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsPrintLayout : QgsLayout | ||
{ | ||
%Docstring | ||
Print layout, a QgsLayout subclass for static or atlas-based layouts. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprintlayout.h" | ||
%End | ||
public: | ||
|
||
QgsPrintLayout( QgsProject *project ); | ||
%Docstring | ||
Constructor for QgsPrintLayout. | ||
%End | ||
|
||
QgsLayoutAtlas *atlas(); | ||
%Docstring | ||
Returns the print layout's atlas. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/layout/qgsprintlayout.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/*************************************************************************** | ||
qgsprintlayout.cpp | ||
------------------- | ||
begin : December 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsprintlayout.h" | ||
#include "qgslayoutatlas.h" | ||
|
||
QgsPrintLayout::QgsPrintLayout( QgsProject *project ) | ||
: QgsLayout( project ) | ||
, mAtlas( new QgsLayoutAtlas( this ) ) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
qgsprintlayout.h | ||
------------------- | ||
begin : December 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
#ifndef QGSPRINTLAYOUT_H | ||
#define QGSPRINTLAYOUT_H | ||
|
||
#include "qgis_core.h" | ||
#include "qgslayout.h" | ||
|
||
class QgsLayoutAtlas; | ||
|
||
/** | ||
* \ingroup core | ||
* \class QgsPrintLayout | ||
* \brief Print layout, a QgsLayout subclass for static or atlas-based layouts. | ||
* \since QGIS 3.0 | ||
*/ | ||
class CORE_EXPORT QgsPrintLayout : public QgsLayout | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
/** | ||
* Constructor for QgsPrintLayout. | ||
*/ | ||
QgsPrintLayout( QgsProject *project ); | ||
|
||
/** | ||
* Returns the print layout's atlas. | ||
*/ | ||
QgsLayoutAtlas *atlas(); | ||
|
||
private: | ||
|
||
QgsLayoutAtlas *mAtlas = nullptr; | ||
|
||
}; | ||
|
||
#endif //QGSPRINTLAYOUT_H |