Skip to content

Commit

Permalink
Fix doxygen warnings, fix missing bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Sep 1, 2014
1 parent 45d4793 commit dd78f09
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 11 deletions.
6 changes: 4 additions & 2 deletions python/core/layertree/qgslayertreemodellegendnode.sip
Expand Up @@ -62,13 +62,17 @@ class QgsLayerTreeModelLegendNode : QObject

/**
* Draws symbol on the left side of the item
* @param settings Legend layout configuration
* @param ctx Context for rendering - may be null if only doing layout without actual rendering
* @param itemHeight Minimal height of the legend item - used for correct positioning when rendering
* @return Real size of the symbol (may be bigger than "normal" symbol size from settings)
*/
virtual QSizeF drawSymbol( const QgsLegendSettings& settings, ItemContext* ctx, double itemHeight ) const;

/**
* Draws label on the right side of the item
* @param settings Legend layout configuration
* @param ctx Context for rendering - may be null if only doing layout without actual rendering
* @param symbolSize Real size of the associated symbol - used for correct positioning when rendering
* @return Size of the label (may span multiple lines)
*/
Expand Down Expand Up @@ -103,8 +107,6 @@ class QgsSymbolV2LegendNode : QgsLayerTreeModelLegendNode
virtual QVariant data( int role ) const;
virtual bool setData( const QVariant& value, int role );

/** Draws a symbol at the current y position and returns the new x position. Returns real symbol height, because for points,
it is possible that it differs from mSymbolHeight */
QSizeF drawSymbol( const QgsLegendSettings& settings, ItemContext* ctx, double itemHeight ) const;

virtual void setEmbeddedInParent( bool embedded );
Expand Down
8 changes: 4 additions & 4 deletions python/core/symbology-ng/qgsrendererv2.sip
Expand Up @@ -128,15 +128,15 @@ class QgsFeatureRendererV2
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );

//! items of symbology items in legend should be checkable
//! @node added in 2.5
//! @note added in 2.5
virtual bool legendSymbolItemsCheckable() const;

//! items of symbology items in legend is checked
//! @node added in 2.5
//! @note added in 2.5
virtual bool legendSymbolItemChecked( QString key );

//! item in symbology was checked
//! @node added in 2.5
//! @note added in 2.5
virtual void checkLegendSymbolItem( QString key, bool state = true );

//! return a list of item text / symbol
Expand All @@ -146,7 +146,7 @@ class QgsFeatureRendererV2

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! Default fallback implementation just uses legendSymbolItems() implementation
//! @node added in 2.6
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

//! If supported by the renderer, return classification attribute for the use in legend
Expand Down
17 changes: 17 additions & 0 deletions python/core/symbology-ng/qgsrulebasedrendererv2.sip
Expand Up @@ -178,11 +178,28 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
//! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );

//! items of symbology items in legend should be checkable
//! @note added in 2.5
virtual bool legendSymbolItemsCheckable() const;

//! items of symbology items in legend is checked
//! @note added in 2.5
virtual bool legendSymbolItemChecked( QString key );

//! item in symbology was checked
//! @note added in 2.5
virtual void checkLegendSymbolItem( QString key, bool state = true );

//! return a list of item text / symbol
//! @note: this method was added in version 1.5
//! @note not available in python bindings
// virtual QgsLegendSymbolList legendSymbolItems();

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! Default fallback implementation just uses legendSymbolItems() implementation
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

//! for debugging
virtual QString dump() const;

Expand Down
4 changes: 4 additions & 0 deletions python/core/symbology-ng/qgssinglesymbolrendererv2.sip
Expand Up @@ -62,6 +62,10 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
//! @note not available in python bindings
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

private:
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
QgsSingleSymbolRendererV2 & operator=( const QgsSingleSymbolRendererV2 & );
Expand Down
6 changes: 4 additions & 2 deletions src/core/layertree/qgslayertreemodellegendnode.h
Expand Up @@ -84,13 +84,17 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject

/**
* Draws symbol on the left side of the item
* @param settings Legend layout configuration
* @param ctx Context for rendering - may be null if only doing layout without actual rendering
* @param itemHeight Minimal height of the legend item - used for correct positioning when rendering
* @return Real size of the symbol (may be bigger than "normal" symbol size from settings)
*/
virtual QSizeF drawSymbol( const QgsLegendSettings& settings, ItemContext* ctx, double itemHeight ) const;

/**
* Draws label on the right side of the item
* @param settings Legend layout configuration
* @param ctx Context for rendering - may be null if only doing layout without actual rendering
* @param symbolSize Real size of the associated symbol - used for correct positioning when rendering
* @return Size of the label (may span multiple lines)
*/
Expand Down Expand Up @@ -124,8 +128,6 @@ class CORE_EXPORT QgsSymbolV2LegendNode : public QgsLayerTreeModelLegendNode
virtual QVariant data( int role ) const;
virtual bool setData( const QVariant& value, int role );

/** Draws a symbol at the current y position and returns the new x position. Returns real symbol height, because for points,
it is possible that it differs from mSymbolHeight */
QSizeF drawSymbol( const QgsLegendSettings& settings, ItemContext* ctx, double itemHeight ) const;

virtual void setEmbeddedInParent( bool embedded );
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsrendererv2.h
Expand Up @@ -172,7 +172,7 @@ class CORE_EXPORT QgsFeatureRendererV2

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! Default fallback implementation just uses legendSymbolItems() implementation
//! @node added in 2.6
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

//! If supported by the renderer, return classification attribute for the use in legend
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsrulebasedrendererv2.h
Expand Up @@ -259,7 +259,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! Default fallback implementation just uses legendSymbolItems() implementation
//! @node added in 2.6
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

//! for debugging
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgssinglesymbolrendererv2.h
Expand Up @@ -83,7 +83,7 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );

//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! @node added in 2.6
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;

protected:
Expand Down

0 comments on commit dd78f09

Please sign in to comment.