Skip to content

Commit

Permalink
Port legend item
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent 585a8b7 commit d3430e4
Show file tree
Hide file tree
Showing 31 changed files with 4,729 additions and 121 deletions.
26 changes: 1 addition & 25 deletions python/core/composer/qgscomposerlegend.sip
Expand Up @@ -11,31 +11,6 @@



class QgsLegendModel : QgsLayerTreeModel
{
%Docstring
Item model implementation based on layer tree model for composer legend.
Overrides some functionality of QgsLayerTreeModel to better fit the needs of composer legend.

.. versionadded:: 2.6
%End

%TypeHeaderCode
#include "qgscomposerlegend.h"
%End
public:
QgsLegendModel( QgsLayerTree *rootNode, QObject *parent /TransferThis/ = 0 );
%Docstring
Construct the model based on the given layer tree
%End

virtual QVariant data( const QModelIndex &index, int role ) const;


virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

};


class QgsComposerLegend : QgsComposerItem
{
Expand All @@ -48,6 +23,7 @@ class QgsComposerLegend : QgsComposerItem
%End
public:
QgsComposerLegend( QgsComposition *composition /TransferThis/ );
~QgsComposerLegend();

virtual int type() const;
%Docstring
Expand Down
1 change: 1 addition & 0 deletions python/core/core_auto.sip
Expand Up @@ -408,6 +408,7 @@
%Include layout/qgslayoutitem.sip
%Include layout/qgslayoutitemgroup.sip
%Include layout/qgslayoutitemlabel.sip
%Include layout/qgslayoutitemlegend.sip
%Include layout/qgslayoutitemmap.sip
%Include layout/qgslayoutitemmapgrid.sip
%Include layout/qgslayoutitemmapitem.sip
Expand Down
17 changes: 17 additions & 0 deletions python/core/layout/qgslayoutitem.sip
Expand Up @@ -84,6 +84,23 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
UndoLabelFont,
UndoLabelMargin,
UndoLabelFontColor,
UndoLegendText,
UndoLegendColumnCount,
UndoLegendSymbolWidth,
UndoLegendSymbolHeight,
UndoLegendWmsLegendWidth,
UndoLegendWmsLegendHeight,
UndoLegendTitleSpaceBottom,
UndoLegendGroupSpace,
UndoLegendLayerSpace,
UndoLegendSymbolSpace,
UndoLegendIconSymbolSpace,
UndoLegendFontColor,
UndoLegendBoxSpace,
UndoLegendColumnSpace,
UndoLegendLineSpacing,
UndoLegendRasterStrokeWidth,
UndoLegendRasterStrokeColor,
UndoCustomCommand,
};

Expand Down

0 comments on commit d3430e4

Please sign in to comment.