Skip to content
Permalink
Browse files
Port legend item
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent 585a8b7 commit d3430e4d42c043f75b0d8cb71bde73c399bd6bf5
Show file tree
Hide file tree
Showing 31 changed files with 4,729 additions and 121 deletions.
@@ -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
{
@@ -48,6 +23,7 @@ class QgsComposerLegend : QgsComposerItem
%End
public:
QgsComposerLegend( QgsComposition *composition /TransferThis/ );
~QgsComposerLegend();

virtual int type() const;
%Docstring
@@ -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
@@ -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,
};

0 comments on commit d3430e4

Please sign in to comment.