Skip to content

Commit

Permalink
Dox++
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 5, 2020
1 parent 32c17c3 commit aaed8f4
Show file tree
Hide file tree
Showing 2 changed files with 196 additions and 2 deletions.
99 changes: 98 additions & 1 deletion python/core/auto_generated/qgslegendsettings.sip.in
Expand Up @@ -107,19 +107,84 @@ line character.
%End

double columnSpace() const;
%Docstring
Returns the margin space between adjacent columns (in millimeters).

.. seealso:: :py:func:`setColumnSpace`
%End

void setColumnSpace( double s );
%Docstring
Sets the margin space between adjacent columns (in millimeters).

.. seealso:: :py:func:`columnSpace`
%End

int columnCount() const;
%Docstring
Returns the desired minimum number of columns to show in the legend.

If legend components have forced column breaks then the actual number of columns in the rendered
legend may be larger than this value.

.. seealso:: :py:func:`setColumnCount`
%End

void setColumnCount( int c );
%Docstring
Sets the desired minimum number of columns to show in the legend.

If legend components have forced column breaks then the actual number of columns in the rendered
legend may be larger than this value.

.. seealso:: :py:func:`columnCount`
%End

bool splitLayer() const;
%Docstring
Returns ``True`` if layer components can be split over multiple columns.

.. seealso:: :py:func:`setSplitLayer`
%End

void setSplitLayer( bool s );
%Docstring
Sets whether layer components can be split over multiple columns.

.. seealso:: :py:func:`splitLayer`
%End

bool equalColumnWidth() const;
%Docstring
Returns ``True`` if all columns should have equal widths.

If ``False`` is returned then columns will be individually resized to their minimum possible width.

.. seealso:: :py:func:`setEqualColumnWidth`
%End

void setEqualColumnWidth( bool s );
%Docstring
Sets whether all columns should have equal widths.

If ``False``, then then columns will be individually resized to their minimum possible width.

.. seealso:: :py:func:`equalColumnWidth`
%End

QColor fontColor() const;
%Docstring
Returns the font color used for legend items.

.. seealso:: :py:func:`setFontColor`
%End

void setFontColor( const QColor &c );
%Docstring
Sets the font color used for legend items.

.. seealso:: :py:func:`fontColor`
%End

QColor layerFontColor() const;
%Docstring
Expand All @@ -144,9 +209,19 @@ Overrides fontColor()
.. versionadded:: 3.4.7
%End


QSizeF symbolSize() const;
%Docstring
Returns the default symbol size (in millimeters) used for legend items.

.. seealso:: :py:func:`setSymbolSize`
%End

void setSymbolSize( QSizeF s );
%Docstring
Sets the default symbol size (in millimeters) used for legend items.

.. seealso:: :py:func:`symbolSize`
%End

void setSymbolAlignment( Qt::AlignmentFlag alignment );
%Docstring
Expand Down Expand Up @@ -259,10 +334,32 @@ only drawn if drawRasterStroke() is ``True``.
%End

QSizeF wmsLegendSize() const;
%Docstring
Returns the size (in millimeters) of WMS legend graphics shown in the legend.

.. seealso:: :py:func:`setWmsLegendSize`
%End

void setWmsLegendSize( QSizeF s );
%Docstring
Sets the desired size (in millimeters) of WMS legend graphics shown in the legend.

.. seealso:: :py:func:`wmsLegendSize`
%End

double lineSpacing() const;
%Docstring
Returns the line spacing to use between lines of legend text.

.. seealso:: :py:func:`setLineSpacing`
%End

void setLineSpacing( double s );
%Docstring
Sets the line spacing to use between lines of legend text.

.. seealso:: :py:func:`lineSpacing`
%End

double mmPerMapUnit() const /Deprecated/;
%Docstring
Expand Down
99 changes: 98 additions & 1 deletion src/core/qgslegendsettings.h
Expand Up @@ -123,19 +123,84 @@ class CORE_EXPORT QgsLegendSettings
*/
QString wrapChar() const {return mWrapChar;}

/**
* Returns the margin space between adjacent columns (in millimeters).
*
* \see setColumnSpace()
*/
double columnSpace() const {return mColumnSpace;}

/**
* Sets the margin space between adjacent columns (in millimeters).
*
* \see columnSpace()
*/
void setColumnSpace( double s ) { mColumnSpace = s;}

/**
* Returns the desired minimum number of columns to show in the legend.
*
* If legend components have forced column breaks then the actual number of columns in the rendered
* legend may be larger than this value.
*
* \see setColumnCount()
*/
int columnCount() const { return mColumnCount; }

/**
* Sets the desired minimum number of columns to show in the legend.
*
* If legend components have forced column breaks then the actual number of columns in the rendered
* legend may be larger than this value.
*
* \see columnCount()
*/
void setColumnCount( int c ) { mColumnCount = c;}

/**
* Returns TRUE if layer components can be split over multiple columns.
*
* \see setSplitLayer()
*/
bool splitLayer() const { return mSplitLayer; }

/**
* Sets whether layer components can be split over multiple columns.
*
* \see splitLayer()
*/
void setSplitLayer( bool s ) { mSplitLayer = s;}

/**
* Returns TRUE if all columns should have equal widths.
*
* If FALSE is returned then columns will be individually resized to their minimum possible width.
*
* \see setEqualColumnWidth()
*/
bool equalColumnWidth() const { return mEqualColumnWidth; }

/**
* Sets whether all columns should have equal widths.
*
* If FALSE, then then columns will be individually resized to their minimum possible width.
*
* \see equalColumnWidth()
*/
void setEqualColumnWidth( bool s ) { mEqualColumnWidth = s;}

/**
* Returns the font color used for legend items.
*
* \see setFontColor()
*/
QColor fontColor() const {return mFontColor;}

/**
* Sets the font color used for legend items.
*
* \see fontColor()
*/
void setFontColor( const QColor &c ) {mFontColor = c;}

/**
Expand All @@ -155,8 +220,18 @@ class CORE_EXPORT QgsLegendSettings
*/
void setLayerFontColor( const QColor &fontColor ) {mLayerFontColor = fontColor;}


/**
* Returns the default symbol size (in millimeters) used for legend items.
*
* \see setSymbolSize()
*/
QSizeF symbolSize() const {return mSymbolSize;}

/**
* Sets the default symbol size (in millimeters) used for legend items.
*
* \see symbolSize()
*/
void setSymbolSize( QSizeF s ) {mSymbolSize = s;}

/**
Expand Down Expand Up @@ -240,10 +315,32 @@ class CORE_EXPORT QgsLegendSettings
*/
void setRasterStrokeWidth( double width ) { mRasterStrokeWidth = width; }

/**
* Returns the size (in millimeters) of WMS legend graphics shown in the legend.
*
* \see setWmsLegendSize()
*/
QSizeF wmsLegendSize() const {return mWmsLegendSize;}

/**
* Sets the desired size (in millimeters) of WMS legend graphics shown in the legend.
*
* \see wmsLegendSize()
*/
void setWmsLegendSize( QSizeF s ) {mWmsLegendSize = s;}

/**
* Returns the line spacing to use between lines of legend text.
*
* \see setLineSpacing()
*/
double lineSpacing() const { return mLineSpacing; }

/**
* Sets the line spacing to use between lines of legend text.
*
* \see lineSpacing()
*/
void setLineSpacing( double s ) { mLineSpacing = s; }

/**
Expand Down

0 comments on commit aaed8f4

Please sign in to comment.