Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 26, 2017
1 parent fa21311 commit 8d24a9a
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 2 deletions.
4 changes: 4 additions & 0 deletions python/core/scalebar/qgsdoubleboxscalebarrenderer.sip
Expand Up @@ -19,7 +19,11 @@ class QgsDoubleBoxScaleBarRenderer: QgsScaleBarRenderer
#include "qgsdoubleboxscalebarrenderer.h"
%End
public:

QgsDoubleBoxScaleBarRenderer();
%Docstring
Constructor for QgsDoubleBoxScaleBarRenderer.
%End

virtual QString name() const;

Expand Down
4 changes: 4 additions & 0 deletions python/core/scalebar/qgsnumericscalebarrenderer.sip
Expand Up @@ -19,7 +19,11 @@ class QgsNumericScaleBarRenderer: QgsScaleBarRenderer
#include "qgsnumericscalebarrenderer.h"
%End
public:

QgsNumericScaleBarRenderer();
%Docstring
Constructor for QgsNumericScaleBarRenderer.
%End

virtual QString name() const;

Expand Down
3 changes: 3 additions & 0 deletions python/core/scalebar/qgsscalebarrenderer.sip
Expand Up @@ -47,6 +47,9 @@ Scale denominator
};

QgsScaleBarRenderer();
%Docstring
Constructor for QgsScaleBarRenderer.
%End
virtual ~QgsScaleBarRenderer();

virtual QString name() const = 0;
Expand Down
3 changes: 3 additions & 0 deletions python/core/scalebar/qgssingleboxscalebarrenderer.sip
Expand Up @@ -22,6 +22,9 @@ class QgsSingleBoxScaleBarRenderer: QgsScaleBarRenderer
public:

QgsSingleBoxScaleBarRenderer();
%Docstring
Constructor for QgsSingleBoxScaleBarRenderer.
%End

virtual QString name() const;

Expand Down
3 changes: 3 additions & 0 deletions python/core/scalebar/qgsticksscalebarrenderer.sip
Expand Up @@ -28,6 +28,9 @@ class QgsTicksScaleBarRenderer: QgsScaleBarRenderer
};

QgsTicksScaleBarRenderer();
%Docstring
Constructor for QgsTicksScaleBarRenderer.
%End

virtual QString name() const;

Expand Down
22 changes: 20 additions & 2 deletions src/core/composer/qgscomposerscalebar.h
Expand Up @@ -215,7 +215,14 @@ class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem
double height() const { return mSettings.height(); }
void setHeight( double h ) { mSettings.setHeight( h );}

/**
* Sets the \a map item linked to the scalebar.
*/
void setComposerMap( QgsComposerMap *map );

/**
* Returns the map item linked to the scalebar.
*/
QgsComposerMap *composerMap() const {return mComposerMap;}

double labelBarSpace() const {return mSettings.labelBarSpace();}
Expand All @@ -224,13 +231,24 @@ class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem
double boxContentSpace() const {return mSettings.boxContentSpace();}
void setBoxContentSpace( double space );

//! Left / Middle/ Right
/**
* Returns the alignment of the scalebar.
*/
QgsScaleBarSettings::Alignment alignment() const { return mSettings.alignment(); }

void setAlignment( QgsScaleBarSettings::Alignment a );
/**
* Sets the \a alignment of the scalebar.
*/
void setAlignment( QgsScaleBarSettings::Alignment alignment );

/**
* Returns the scalebar distance units.
*/
QgsUnitTypes::DistanceUnit units() const { return mSettings.units(); }

/**
* Sets the scalebar distance units.
*/
void setUnits( QgsUnitTypes::DistanceUnit u );

/** Returns the join style used for drawing lines in the scalebar
Expand Down
4 changes: 4 additions & 0 deletions src/core/scalebar/qgsdoubleboxscalebarrenderer.h
Expand Up @@ -30,6 +30,10 @@
class CORE_EXPORT QgsDoubleBoxScaleBarRenderer: public QgsScaleBarRenderer
{
public:

/**
* Constructor for QgsDoubleBoxScaleBarRenderer.
*/
QgsDoubleBoxScaleBarRenderer() = default;

QString name() const override { return QStringLiteral( "Double Box" ); }
Expand Down
4 changes: 4 additions & 0 deletions src/core/scalebar/qgsnumericscalebarrenderer.h
Expand Up @@ -30,6 +30,10 @@
class CORE_EXPORT QgsNumericScaleBarRenderer: public QgsScaleBarRenderer
{
public:

/**
* Constructor for QgsNumericScaleBarRenderer.
*/
QgsNumericScaleBarRenderer() = default;

QString name() const override { return QStringLiteral( "Numeric" ); }
Expand Down
3 changes: 3 additions & 0 deletions src/core/scalebar/qgsscalebarrenderer.h
Expand Up @@ -58,6 +58,9 @@ class CORE_EXPORT QgsScaleBarRenderer

};

/**
* Constructor for QgsScaleBarRenderer.
*/
QgsScaleBarRenderer() = default;
virtual ~QgsScaleBarRenderer() = default;

Expand Down
3 changes: 3 additions & 0 deletions src/core/scalebar/qgssingleboxscalebarrenderer.h
Expand Up @@ -32,6 +32,9 @@ class CORE_EXPORT QgsSingleBoxScaleBarRenderer: public QgsScaleBarRenderer
{
public:

/**
* Constructor for QgsSingleBoxScaleBarRenderer.
*/
QgsSingleBoxScaleBarRenderer() = default;

QString name() const override { return QStringLiteral( "Single Box" ); }
Expand Down
3 changes: 3 additions & 0 deletions src/core/scalebar/qgsticksscalebarrenderer.h
Expand Up @@ -38,6 +38,9 @@ class CORE_EXPORT QgsTicksScaleBarRenderer: public QgsScaleBarRenderer
TicksMiddle, //!< Render ticks crossing line
};

/**
* Constructor for QgsTicksScaleBarRenderer.
*/
QgsTicksScaleBarRenderer() = default;

QString name() const override;
Expand Down

0 comments on commit 8d24a9a

Please sign in to comment.