Skip to content

Commit d3430e4

Browse files
committedNov 7, 2017
Port legend item
1 parent 585a8b7 commit d3430e4

31 files changed

+4729
-121
lines changed
 

‎python/core/composer/qgscomposerlegend.sip

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,6 @@
1111

1212

1313

14-
class QgsLegendModel : QgsLayerTreeModel
15-
{
16-
%Docstring
17-
Item model implementation based on layer tree model for composer legend.
18-
Overrides some functionality of QgsLayerTreeModel to better fit the needs of composer legend.
19-
20-
.. versionadded:: 2.6
21-
%End
22-
23-
%TypeHeaderCode
24-
#include "qgscomposerlegend.h"
25-
%End
26-
public:
27-
QgsLegendModel( QgsLayerTree *rootNode, QObject *parent /TransferThis/ = 0 );
28-
%Docstring
29-
Construct the model based on the given layer tree
30-
%End
31-
32-
virtual QVariant data( const QModelIndex &index, int role ) const;
33-
34-
35-
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
36-
37-
};
38-
3914

4015
class QgsComposerLegend : QgsComposerItem
4116
{
@@ -48,6 +23,7 @@ class QgsComposerLegend : QgsComposerItem
4823
%End
4924
public:
5025
QgsComposerLegend( QgsComposition *composition /TransferThis/ );
26+
~QgsComposerLegend();
5127

5228
virtual int type() const;
5329
%Docstring

‎python/core/core_auto.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
%Include layout/qgslayoutitem.sip
409409
%Include layout/qgslayoutitemgroup.sip
410410
%Include layout/qgslayoutitemlabel.sip
411+
%Include layout/qgslayoutitemlegend.sip
411412
%Include layout/qgslayoutitemmap.sip
412413
%Include layout/qgslayoutitemmapgrid.sip
413414
%Include layout/qgslayoutitemmapitem.sip

‎python/core/layout/qgslayoutitem.sip

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,23 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
8484
UndoLabelFont,
8585
UndoLabelMargin,
8686
UndoLabelFontColor,
87+
UndoLegendText,
88+
UndoLegendColumnCount,
89+
UndoLegendSymbolWidth,
90+
UndoLegendSymbolHeight,
91+
UndoLegendWmsLegendWidth,
92+
UndoLegendWmsLegendHeight,
93+
UndoLegendTitleSpaceBottom,
94+
UndoLegendGroupSpace,
95+
UndoLegendLayerSpace,
96+
UndoLegendSymbolSpace,
97+
UndoLegendIconSymbolSpace,
98+
UndoLegendFontColor,
99+
UndoLegendBoxSpace,
100+
UndoLegendColumnSpace,
101+
UndoLegendLineSpacing,
102+
UndoLegendRasterStrokeWidth,
103+
UndoLegendRasterStrokeColor,
87104
UndoCustomCommand,
88105
};
89106

0 commit comments

Comments
 (0)
Please sign in to comment.