fix doxymentation

This commit is contained in:
Denis Rouzaud 2017-04-19 20:53:51 +02:00
parent 36604196d7
commit f9ec3829fc
3 changed files with 17 additions and 1 deletions

View File

@ -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
@ -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
@ -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

View File

@ -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
@ -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

View File

@ -504,7 +504,6 @@ ACCEPTABLE_MISSING_DOCS = {
"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)"],