Skip to content

Commit

Permalink
fix doxymentation
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Apr 20, 2017
1 parent 3660419 commit f9ec382
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions python/gui/qgsscalewidget.sip
Expand Up @@ -23,7 +23,13 @@ class QgsScaleWidget : QWidget
#include "qgsscalewidget.h"
%End
public:

explicit QgsScaleWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
QgsScaleWidget creates a combobox which lets the user select map scale from predefined list
and highlights nearest to current scale value
*
%End

void setShowCurrentScaleButton( bool showCurrentScaleButton );
%Docstring
Expand All @@ -34,6 +40,7 @@ class QgsScaleWidget : QWidget
%End
bool showCurrentScaleButton();
%Docstring
returns if a button to set the scale from map canvas is shown or not
:rtype: bool
%End

Expand Down Expand Up @@ -80,6 +87,9 @@ Helper function to convert a scale string to double

public slots:
void updateScales( const QStringList &scales = QStringList() );
%Docstring
updates the list of predefined scales
%End

void setScaleFromCanvas();
%Docstring
Expand Down
7 changes: 7 additions & 0 deletions src/gui/qgsscalewidget.h
Expand Up @@ -38,11 +38,17 @@ class GUI_EXPORT QgsScaleWidget : public QWidget
Q_PROPERTY( bool minScale READ minScale WRITE setMinScale )

public:

/**
* \brief QgsScaleWidget creates a combobox which lets the user select map scale from predefined list
* and highlights nearest to current scale value
**/
explicit QgsScaleWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );

//! shows a button to set the scale to the current scale of the map canvas next to the combobox
//! \note the map canvas must be defined to show the button
void setShowCurrentScaleButton( bool showCurrentScaleButton );
//! returns if a button to set the scale from map canvas is shown or not
bool showCurrentScaleButton() { return mShowCurrentScaleButton;}

//! set the map canvas associated to the current button
Expand All @@ -67,6 +73,7 @@ class GUI_EXPORT QgsScaleWidget : public QWidget
static double toDouble( const QString &scaleString, bool *ok = nullptr ) { return QgsScaleComboBox::toDouble( scaleString, ok ); }

public slots:
//! updates the list of predefined scales
void updateScales( const QStringList &scales = QStringList() ) { return mScaleComboBox->updateScales( scales ); }

//! assign the current scale from the map canvas
Expand Down
1 change: 0 additions & 1 deletion tests/src/python/acceptable_missing_doc.py
Expand Up @@ -504,7 +504,6 @@
"QgsOSMNodeIterator": ["close()", "next()"],
"QgsPalettedRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &extent)", "QgsPalettedRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "setFromRenderer(const QgsRasterRenderer *r)"],
"QgsDataProvider": ["QgsDataProvider(QString const &uri=\"\")", "DataCapability"],
"QgsScaleWidget": ["showCurrentScaleButton()", "QgsScaleWidget(QWidget *parent=nullptr)", "updateScales(const QStringList &scales=QStringList())"],
"QgsMapToolIdentifyFeature": ["featureIdentified(const QgsFeature &)", "featureIdentified(QgsFeatureId)"],
"QgsGeometryValidator": ["errorFound(const QgsGeometry::Error &)", "addError(const QgsGeometry::Error &)", "stop()"],
"QgsErrorDialog": ["QgsErrorDialog(const QgsError &error, const QString &title, QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)"],
Expand Down

0 comments on commit f9ec382

Please sign in to comment.