Skip to content

Commit f84a3bb

Browse files
authoredJul 14, 2017
Merge pull request #4819 from nyalldawson/layout_gui
Layout GUI work (pt 1/?)
2 parents 0639264 + 1c8b17f commit f84a3bb

File tree

63 files changed

+5827
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5827
-85
lines changed
 

‎python/core/layout/qgslayout.sip

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class QgsLayout : QGraphicsScene
1919
%End
2020
public:
2121

22+
enum ZValues
23+
{
24+
ZMapTool,
25+
};
26+
2227
QgsLayout();
2328

2429
};

‎python/core/layout/qgslayoutitemregistry.sip

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88

99

1010

11+
1112
class QgsLayoutItemAbstractMetadata
1213
{
1314
%Docstring
1415
Stores metadata about one layout item class.
16+
17+
A companion class, QgsLayoutItemAbstractGuiMetadata, handles the
18+
GUI behavior of QgsLayoutItems.
19+
1520
.. note::
1621

17-
In C++ you can use QgsSymbolLayerMetadata convenience class.
22+
In C++ you can use QgsLayoutItemMetadata convenience class.
1823
.. versionadded:: 3.0
1924
%End
2025

@@ -55,12 +60,6 @@ class QgsLayoutItemAbstractMetadata
5560
:rtype: QgsLayoutItem
5661
%End
5762

58-
virtual QWidget *createItemWidget() /Factory/;
59-
%Docstring
60-
Creates a configuration widget for layout items of this type. Can return None if no configuration GUI is required.
61-
:rtype: QWidget
62-
%End
63-
6463
virtual void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving );
6564
%Docstring
6665
Resolve paths in the item's ``properties`` (if there are any paths).
@@ -77,7 +76,6 @@ class QgsLayoutItemAbstractMetadata
7776

7877

7978

80-
8179
class QgsLayoutItemRegistry : QObject
8280
{
8381
%Docstring
@@ -86,6 +84,9 @@ class QgsLayoutItemRegistry : QObject
8684
QgsLayoutItemRegistry is not usually directly created, but rather accessed through
8785
QgsApplication.layoutItemRegistry().
8886

87+
A companion class, QgsLayoutItemGuiRegistry, handles the GUI behavior
88+
of layout items.
89+
8990
.. versionadded:: 3.0
9091
%End
9192

@@ -107,14 +108,23 @@ class QgsLayoutItemRegistry : QObject
107108

108109
QgsLayoutItemRegistry( QObject *parent = 0 );
109110
%Docstring
110-
Creates a registry and populates it with standard item types.
111+
Creates a new empty item registry.
111112

112113
QgsLayoutItemRegistry is not usually directly created, but rather accessed through
113114
QgsApplication.layoutItemRegistry().
115+
116+
.. seealso:: populate()
114117
%End
115118

116119
~QgsLayoutItemRegistry();
117120

121+
bool populate();
122+
%Docstring
123+
Populates the registry with standard item types. If called on a non-empty registry
124+
then this will have no effect and will return false.
125+
:rtype: bool
126+
%End
127+
118128

119129
QgsLayoutItemAbstractMetadata *itemMetadata( int type ) const;
120130
%Docstring
@@ -135,12 +145,6 @@ class QgsLayoutItemRegistry : QObject
135145
:rtype: QgsLayoutItem
136146
%End
137147

138-
QWidget *createItemWidget( int type ) const /Factory/;
139-
%Docstring
140-
Creates a new instance of a layout item configuration widget for the specified item ``type``.
141-
:rtype: QWidget
142-
%End
143-
144148
void resolvePaths( int type, QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving ) const;
145149
%Docstring
146150
Resolve paths in properties of a particular symbol layer.
@@ -169,6 +173,7 @@ class QgsLayoutItemRegistry : QObject
169173

170174

171175

176+
172177
/************************************************************************
173178
* This file has been generated automatically from *
174179
* *

0 commit comments

Comments
 (0)
Please sign in to comment.