Docstring updates

This commit is contained in:
Sandro Mani 2016-05-30 19:35:23 +02:00
parent ed2487deaa
commit 0ac8ce1497
9 changed files with 48 additions and 9 deletions

View File

@ -15,14 +15,19 @@ class QgsOWSConnection : QObject
//! Destructor
~QgsOWSConnection();
/** Returns the list of connections for the specified service */
static QStringList connectionList( const QString & theService );
/** Deletes the connection for the specified service with the specified name */
static void deleteConnection( const QString & theService, const QString & name );
/** Retreives the selected connection for the specified service */
static QString selectedConnection( const QString & theService );
/** Marks the specified connection for the specified service as selected */
static void setSelectedConnection( const QString & theService, const QString & name );
QString mConnName;
/** Returns the connection uri */
QgsDataSourceURI uri() const;
QString mConnectionInfo;

View File

@ -10,17 +10,22 @@ class QgsImageFetcher : QObject
#include <qgsrasterdataprovider.h>
%End
public:
/** Constructor */
QgsImageFetcher( QObject* parent = 0 );
/** Destructor */
virtual ~QgsImageFetcher();
// Make sure to connect to "finish" and "error" before starting
/** Starts the image download
* @note Make sure to connect to "finish" and "error" before starting */
virtual void start() = 0;
signals:
/** Emitted when the download completes
* @param legend The downloaded legend image */
void finish( const QImage& legend );
/** Emitted to report progress */
void progress( qint64 received, qint64 total );
/** Emitted when an error occurs */
void error( const QString& msg );
};

View File

@ -423,7 +423,9 @@ class QgisInterface : QObject
virtual QAction *actionAddRasterLayer() = 0;
virtual QAction *actionAddPgLayer() = 0;
virtual QAction *actionAddWmsLayer() = 0;
/** Get access to the native Add ArcGIS FeatureServer action. */
virtual QAction *actionAddAfsLayer() = 0;
/** Get access to the native Add ArcGIS MapServer action. */
virtual QAction *actionAddAmsLayer() = 0;
virtual QAction *actionCopyLayerStyle() = 0;
virtual QAction *actionPasteLayerStyle() = 0;

View File

@ -397,7 +397,9 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual QAction *actionAddRasterLayer() override;
virtual QAction *actionAddPgLayer() override;
virtual QAction *actionAddWmsLayer() override;
/** Get access to the native Add ArcGIS FeatureServer action. */
virtual QAction *actionAddAfsLayer() override;
/** Get access to the native Add ArcGIS MapServer action. */
virtual QAction *actionAddAmsLayer() override;
virtual QAction *actionCopyLayerStyle() override;
virtual QAction *actionPasteLayerStyle() override;

View File

@ -45,14 +45,19 @@ class CORE_EXPORT QgsOWSConnection : public QObject
//! Destructor
~QgsOWSConnection();
/** Returns the list of connections for the specified service */
static QStringList connectionList( const QString & theService );
/** Deletes the connection for the specified service with the specified name */
static void deleteConnection( const QString & theService, const QString & name );
/** Retreives the selected connection for the specified service */
static QString selectedConnection( const QString & theService );
/** Marks the specified connection for the specified service as selected */
static void setSelectedConnection( const QString & theService, const QString & name );
QString mConnName;
/** Returns the connection uri */
QgsDataSourceURI uri() const;
QString mConnectionInfo;

View File

@ -60,17 +60,22 @@ class CORE_EXPORT QgsImageFetcher : public QObject
{
Q_OBJECT
public:
/** Constructor */
QgsImageFetcher( QObject* parent = 0 ) : QObject( parent ) {}
/** Destructor */
virtual ~QgsImageFetcher() {}
// Make sure to connect to "finish" and "error" before starting
/** Starts the image download
* @note Make sure to connect to "finish" and "error" before starting */
virtual void start() = 0;
signals:
/** Emitted when the download completes
* @param legend The downloaded legend image */
void finish( const QImage& legend );
/** Emitted to report progress */
void progress( qint64 received, qint64 total );
/** Emitted when an error occurs */
void error( const QString& msg );
};

View File

@ -480,7 +480,9 @@ class GUI_EXPORT QgisInterface : public QObject
virtual QAction *actionAddRasterLayer() = 0;
virtual QAction *actionAddPgLayer() = 0;
virtual QAction *actionAddWmsLayer() = 0;
/** Get access to the native Add ArcGIS FeatureServer action. */
virtual QAction *actionAddAfsLayer() = 0;
/** Get access to the native Add ArcGIS MapServer action. */
virtual QAction *actionAddAmsLayer() = 0;
virtual QAction *actionCopyLayerStyle() = 0;
virtual QAction *actionPasteLayerStyle() = 0;

View File

@ -36,10 +36,11 @@
#include <QRadioButton>
#include <QImageReader>
/** Item delegate with tweaked sizeHint. */
class QgsSourceSelectItemDelegate : public QItemDelegate
{
public:
/** Constructor */
QgsSourceSelectItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) { }
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
};

View File

@ -18,20 +18,28 @@ class QSortFilterProxyModel;
class QgsGenericProjectionSelector;
class QgsOWSConnection;
/**
* Generic class listing layers available from a remote service.
*/
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
{
Q_OBJECT
public:
/** Whether the dialog is for a map service or a feature service */
enum ServiceType { MapService, FeatureService };
/** Constructor */
QgsSourceSelectDialog( const QString& serviceName, ServiceType serviceType, QWidget* parent, Qt::WindowFlags fl );
/** Destructor */
~QgsSourceSelectDialog();
/** Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retreive data only in the current extent */
void setCurrentExtentAndCrs( const QgsRectangle& canvasExtent, const QgsCoordinateReferenceSystem& canvasCrs );
signals:
/** Emitted when a layer is added from the dialog */
void addLayer( QString uri, QString typeName );
/** Emitted when the connections for the service were changed */
void connectionsChanged();
protected:
@ -48,18 +56,22 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
QgsRectangle mCanvasExtent;
QgsCoordinateReferenceSystem mCanvasCrs;
/** To be implemented in the child class. Called when a new connection is initiated. */
virtual bool connectToService( const QgsOWSConnection& connection ) = 0;
/** May be implemented in child classes for services which support customized queries. */
virtual void buildQuery( const QgsOWSConnection&, const QModelIndex& ) {}
/** To be implemented in the child class. Constructs an URI for the specified service layer. */
virtual QString getLayerURI( const QgsOWSConnection& connection,
const QString& layerTitle,
const QString& layerName,
const QString& crs = QString(),
const QString& filter = QString(),
const QgsRectangle& bBox = QgsRectangle() ) const = 0;
/** Updates the UI for the list of available image encodings from the specified list. */
void populateImageEncodings( const QStringList& availableEncodings );
/** Returns the selected image encoding. */
QString getSelectedImageEncoding() const;
private:
void populateConnectionList();