Skip to content

Commit 0ac8ce1

Browse files
committedJun 2, 2016
Docstring updates
1 parent ed2487d commit 0ac8ce1

File tree

9 files changed

+48
-9
lines changed

9 files changed

+48
-9
lines changed
 

‎python/core/qgsowsconnection.sip

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ class QgsOWSConnection : QObject
1515
//! Destructor
1616
~QgsOWSConnection();
1717

18+
/** Returns the list of connections for the specified service */
1819
static QStringList connectionList( const QString & theService );
1920

21+
/** Deletes the connection for the specified service with the specified name */
2022
static void deleteConnection( const QString & theService, const QString & name );
2123

24+
/** Retreives the selected connection for the specified service */
2225
static QString selectedConnection( const QString & theService );
26+
/** Marks the specified connection for the specified service as selected */
2327
static void setSelectedConnection( const QString & theService, const QString & name );
2428

2529
QString mConnName;
30+
/** Returns the connection uri */
2631
QgsDataSourceURI uri() const;
2732
QString mConnectionInfo;
2833

‎python/core/raster/qgsrasterdataprovider.sip

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@ class QgsImageFetcher : QObject
1010
#include <qgsrasterdataprovider.h>
1111
%End
1212
public:
13-
13+
/** Constructor */
1414
QgsImageFetcher( QObject* parent = 0 );
15+
/** Destructor */
1516
virtual ~QgsImageFetcher();
1617

17-
// Make sure to connect to "finish" and "error" before starting
18+
/** Starts the image download
19+
* @note Make sure to connect to "finish" and "error" before starting */
1820
virtual void start() = 0;
1921

2022
signals:
21-
23+
/** Emitted when the download completes
24+
* @param legend The downloaded legend image */
2225
void finish( const QImage& legend );
26+
/** Emitted to report progress */
2327
void progress( qint64 received, qint64 total );
28+
/** Emitted when an error occurs */
2429
void error( const QString& msg );
2530
};
2631

‎python/gui/qgisinterface.sip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ class QgisInterface : QObject
423423
virtual QAction *actionAddRasterLayer() = 0;
424424
virtual QAction *actionAddPgLayer() = 0;
425425
virtual QAction *actionAddWmsLayer() = 0;
426+
/** Get access to the native Add ArcGIS FeatureServer action. */
426427
virtual QAction *actionAddAfsLayer() = 0;
428+
/** Get access to the native Add ArcGIS MapServer action. */
427429
virtual QAction *actionAddAmsLayer() = 0;
428430
virtual QAction *actionCopyLayerStyle() = 0;
429431
virtual QAction *actionPasteLayerStyle() = 0;

‎src/app/qgisappinterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
397397
virtual QAction *actionAddRasterLayer() override;
398398
virtual QAction *actionAddPgLayer() override;
399399
virtual QAction *actionAddWmsLayer() override;
400+
/** Get access to the native Add ArcGIS FeatureServer action. */
400401
virtual QAction *actionAddAfsLayer() override;
402+
/** Get access to the native Add ArcGIS MapServer action. */
401403
virtual QAction *actionAddAmsLayer() override;
402404
virtual QAction *actionCopyLayerStyle() override;
403405
virtual QAction *actionPasteLayerStyle() override;

‎src/core/qgsowsconnection.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ class CORE_EXPORT QgsOWSConnection : public QObject
4545
//! Destructor
4646
~QgsOWSConnection();
4747

48+
/** Returns the list of connections for the specified service */
4849
static QStringList connectionList( const QString & theService );
4950

51+
/** Deletes the connection for the specified service with the specified name */
5052
static void deleteConnection( const QString & theService, const QString & name );
5153

54+
/** Retreives the selected connection for the specified service */
5255
static QString selectedConnection( const QString & theService );
56+
/** Marks the specified connection for the specified service as selected */
5357
static void setSelectedConnection( const QString & theService, const QString & name );
5458

5559
QString mConnName;
60+
/** Returns the connection uri */
5661
QgsDataSourceURI uri() const;
5762
QString mConnectionInfo;
5863

‎src/core/raster/qgsrasterdataprovider.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,22 @@ class CORE_EXPORT QgsImageFetcher : public QObject
6060
{
6161
Q_OBJECT
6262
public:
63-
63+
/** Constructor */
6464
QgsImageFetcher( QObject* parent = 0 ) : QObject( parent ) {}
65+
/** Destructor */
6566
virtual ~QgsImageFetcher() {}
6667

67-
// Make sure to connect to "finish" and "error" before starting
68+
/** Starts the image download
69+
* @note Make sure to connect to "finish" and "error" before starting */
6870
virtual void start() = 0;
6971

7072
signals:
71-
73+
/** Emitted when the download completes
74+
* @param legend The downloaded legend image */
7275
void finish( const QImage& legend );
76+
/** Emitted to report progress */
7377
void progress( qint64 received, qint64 total );
78+
/** Emitted when an error occurs */
7479
void error( const QString& msg );
7580
};
7681

‎src/gui/qgisinterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@ class GUI_EXPORT QgisInterface : public QObject
480480
virtual QAction *actionAddRasterLayer() = 0;
481481
virtual QAction *actionAddPgLayer() = 0;
482482
virtual QAction *actionAddWmsLayer() = 0;
483+
/** Get access to the native Add ArcGIS FeatureServer action. */
483484
virtual QAction *actionAddAfsLayer() = 0;
485+
/** Get access to the native Add ArcGIS MapServer action. */
484486
virtual QAction *actionAddAmsLayer() = 0;
485487
virtual QAction *actionCopyLayerStyle() = 0;
486488
virtual QAction *actionPasteLayerStyle() = 0;

‎src/gui/qgssourceselectdialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
#include <QRadioButton>
3737
#include <QImageReader>
3838

39-
39+
/** Item delegate with tweaked sizeHint. */
4040
class QgsSourceSelectItemDelegate : public QItemDelegate
4141
{
4242
public:
43+
/** Constructor */
4344
QgsSourceSelectItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) { }
4445
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
4546
};

‎src/gui/qgssourceselectdialog.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,28 @@ class QSortFilterProxyModel;
1818
class QgsGenericProjectionSelector;
1919
class QgsOWSConnection;
2020

21-
21+
/**
22+
* Generic class listing layers available from a remote service.
23+
*/
2224
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
2325
{
2426
Q_OBJECT
2527

2628
public:
29+
/** Whether the dialog is for a map service or a feature service */
2730
enum ServiceType { MapService, FeatureService };
2831

32+
/** Constructor */
2933
QgsSourceSelectDialog( const QString& serviceName, ServiceType serviceType, QWidget* parent, Qt::WindowFlags fl );
34+
/** Destructor */
3035
~QgsSourceSelectDialog();
36+
/** Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retreive data only in the current extent */
3137
void setCurrentExtentAndCrs( const QgsRectangle& canvasExtent, const QgsCoordinateReferenceSystem& canvasCrs );
3238

3339
signals:
40+
/** Emitted when a layer is added from the dialog */
3441
void addLayer( QString uri, QString typeName );
42+
/** Emitted when the connections for the service were changed */
3543
void connectionsChanged();
3644

3745
protected:
@@ -48,18 +56,22 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
4856
QgsRectangle mCanvasExtent;
4957
QgsCoordinateReferenceSystem mCanvasCrs;
5058

59+
/** To be implemented in the child class. Called when a new connection is initiated. */
5160
virtual bool connectToService( const QgsOWSConnection& connection ) = 0;
61+
/** May be implemented in child classes for services which support customized queries. */
5262
virtual void buildQuery( const QgsOWSConnection&, const QModelIndex& ) {}
63+
/** To be implemented in the child class. Constructs an URI for the specified service layer. */
5364
virtual QString getLayerURI( const QgsOWSConnection& connection,
5465
const QString& layerTitle,
5566
const QString& layerName,
5667
const QString& crs = QString(),
5768
const QString& filter = QString(),
5869
const QgsRectangle& bBox = QgsRectangle() ) const = 0;
70+
/** Updates the UI for the list of available image encodings from the specified list. */
5971
void populateImageEncodings( const QStringList& availableEncodings );
72+
/** Returns the selected image encoding. */
6073
QString getSelectedImageEncoding() const;
6174

62-
6375
private:
6476
void populateConnectionList();
6577

0 commit comments

Comments
 (0)
Please sign in to comment.