mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Docstring updates
This commit is contained in:
parent
ed2487deaa
commit
0ac8ce1497
@ -15,14 +15,19 @@ class QgsOWSConnection : QObject
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
~QgsOWSConnection();
|
~QgsOWSConnection();
|
||||||
|
|
||||||
|
/** Returns the list of connections for the specified service */
|
||||||
static QStringList connectionList( const QString & theService );
|
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 );
|
static void deleteConnection( const QString & theService, const QString & name );
|
||||||
|
|
||||||
|
/** Retreives the selected connection for the specified service */
|
||||||
static QString selectedConnection( const QString & theService );
|
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 );
|
static void setSelectedConnection( const QString & theService, const QString & name );
|
||||||
|
|
||||||
QString mConnName;
|
QString mConnName;
|
||||||
|
/** Returns the connection uri */
|
||||||
QgsDataSourceURI uri() const;
|
QgsDataSourceURI uri() const;
|
||||||
QString mConnectionInfo;
|
QString mConnectionInfo;
|
||||||
|
|
||||||
|
@ -10,17 +10,22 @@ class QgsImageFetcher : QObject
|
|||||||
#include <qgsrasterdataprovider.h>
|
#include <qgsrasterdataprovider.h>
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
/** Constructor */
|
||||||
QgsImageFetcher( QObject* parent = 0 );
|
QgsImageFetcher( QObject* parent = 0 );
|
||||||
|
/** Destructor */
|
||||||
virtual ~QgsImageFetcher();
|
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;
|
virtual void start() = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
/** Emitted when the download completes
|
||||||
|
* @param legend The downloaded legend image */
|
||||||
void finish( const QImage& legend );
|
void finish( const QImage& legend );
|
||||||
|
/** Emitted to report progress */
|
||||||
void progress( qint64 received, qint64 total );
|
void progress( qint64 received, qint64 total );
|
||||||
|
/** Emitted when an error occurs */
|
||||||
void error( const QString& msg );
|
void error( const QString& msg );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -423,7 +423,9 @@ class QgisInterface : QObject
|
|||||||
virtual QAction *actionAddRasterLayer() = 0;
|
virtual QAction *actionAddRasterLayer() = 0;
|
||||||
virtual QAction *actionAddPgLayer() = 0;
|
virtual QAction *actionAddPgLayer() = 0;
|
||||||
virtual QAction *actionAddWmsLayer() = 0;
|
virtual QAction *actionAddWmsLayer() = 0;
|
||||||
|
/** Get access to the native Add ArcGIS FeatureServer action. */
|
||||||
virtual QAction *actionAddAfsLayer() = 0;
|
virtual QAction *actionAddAfsLayer() = 0;
|
||||||
|
/** Get access to the native Add ArcGIS MapServer action. */
|
||||||
virtual QAction *actionAddAmsLayer() = 0;
|
virtual QAction *actionAddAmsLayer() = 0;
|
||||||
virtual QAction *actionCopyLayerStyle() = 0;
|
virtual QAction *actionCopyLayerStyle() = 0;
|
||||||
virtual QAction *actionPasteLayerStyle() = 0;
|
virtual QAction *actionPasteLayerStyle() = 0;
|
||||||
|
@ -397,7 +397,9 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
|
|||||||
virtual QAction *actionAddRasterLayer() override;
|
virtual QAction *actionAddRasterLayer() override;
|
||||||
virtual QAction *actionAddPgLayer() override;
|
virtual QAction *actionAddPgLayer() override;
|
||||||
virtual QAction *actionAddWmsLayer() override;
|
virtual QAction *actionAddWmsLayer() override;
|
||||||
|
/** Get access to the native Add ArcGIS FeatureServer action. */
|
||||||
virtual QAction *actionAddAfsLayer() override;
|
virtual QAction *actionAddAfsLayer() override;
|
||||||
|
/** Get access to the native Add ArcGIS MapServer action. */
|
||||||
virtual QAction *actionAddAmsLayer() override;
|
virtual QAction *actionAddAmsLayer() override;
|
||||||
virtual QAction *actionCopyLayerStyle() override;
|
virtual QAction *actionCopyLayerStyle() override;
|
||||||
virtual QAction *actionPasteLayerStyle() override;
|
virtual QAction *actionPasteLayerStyle() override;
|
||||||
|
@ -45,14 +45,19 @@ class CORE_EXPORT QgsOWSConnection : public QObject
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
~QgsOWSConnection();
|
~QgsOWSConnection();
|
||||||
|
|
||||||
|
/** Returns the list of connections for the specified service */
|
||||||
static QStringList connectionList( const QString & theService );
|
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 );
|
static void deleteConnection( const QString & theService, const QString & name );
|
||||||
|
|
||||||
|
/** Retreives the selected connection for the specified service */
|
||||||
static QString selectedConnection( const QString & theService );
|
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 );
|
static void setSelectedConnection( const QString & theService, const QString & name );
|
||||||
|
|
||||||
QString mConnName;
|
QString mConnName;
|
||||||
|
/** Returns the connection uri */
|
||||||
QgsDataSourceURI uri() const;
|
QgsDataSourceURI uri() const;
|
||||||
QString mConnectionInfo;
|
QString mConnectionInfo;
|
||||||
|
|
||||||
|
@ -60,17 +60,22 @@ class CORE_EXPORT QgsImageFetcher : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
/** Constructor */
|
||||||
QgsImageFetcher( QObject* parent = 0 ) : QObject( parent ) {}
|
QgsImageFetcher( QObject* parent = 0 ) : QObject( parent ) {}
|
||||||
|
/** Destructor */
|
||||||
virtual ~QgsImageFetcher() {}
|
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;
|
virtual void start() = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
/** Emitted when the download completes
|
||||||
|
* @param legend The downloaded legend image */
|
||||||
void finish( const QImage& legend );
|
void finish( const QImage& legend );
|
||||||
|
/** Emitted to report progress */
|
||||||
void progress( qint64 received, qint64 total );
|
void progress( qint64 received, qint64 total );
|
||||||
|
/** Emitted when an error occurs */
|
||||||
void error( const QString& msg );
|
void error( const QString& msg );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -480,7 +480,9 @@ class GUI_EXPORT QgisInterface : public QObject
|
|||||||
virtual QAction *actionAddRasterLayer() = 0;
|
virtual QAction *actionAddRasterLayer() = 0;
|
||||||
virtual QAction *actionAddPgLayer() = 0;
|
virtual QAction *actionAddPgLayer() = 0;
|
||||||
virtual QAction *actionAddWmsLayer() = 0;
|
virtual QAction *actionAddWmsLayer() = 0;
|
||||||
|
/** Get access to the native Add ArcGIS FeatureServer action. */
|
||||||
virtual QAction *actionAddAfsLayer() = 0;
|
virtual QAction *actionAddAfsLayer() = 0;
|
||||||
|
/** Get access to the native Add ArcGIS MapServer action. */
|
||||||
virtual QAction *actionAddAmsLayer() = 0;
|
virtual QAction *actionAddAmsLayer() = 0;
|
||||||
virtual QAction *actionCopyLayerStyle() = 0;
|
virtual QAction *actionCopyLayerStyle() = 0;
|
||||||
virtual QAction *actionPasteLayerStyle() = 0;
|
virtual QAction *actionPasteLayerStyle() = 0;
|
||||||
|
@ -36,10 +36,11 @@
|
|||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
|
|
||||||
|
/** Item delegate with tweaked sizeHint. */
|
||||||
class QgsSourceSelectItemDelegate : public QItemDelegate
|
class QgsSourceSelectItemDelegate : public QItemDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Constructor */
|
||||||
QgsSourceSelectItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) { }
|
QgsSourceSelectItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) { }
|
||||||
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
|
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
|
||||||
};
|
};
|
||||||
|
@ -18,20 +18,28 @@ class QSortFilterProxyModel;
|
|||||||
class QgsGenericProjectionSelector;
|
class QgsGenericProjectionSelector;
|
||||||
class QgsOWSConnection;
|
class QgsOWSConnection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic class listing layers available from a remote service.
|
||||||
|
*/
|
||||||
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
|
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/** Whether the dialog is for a map service or a feature service */
|
||||||
enum ServiceType { MapService, FeatureService };
|
enum ServiceType { MapService, FeatureService };
|
||||||
|
|
||||||
|
/** Constructor */
|
||||||
QgsSourceSelectDialog( const QString& serviceName, ServiceType serviceType, QWidget* parent, Qt::WindowFlags fl );
|
QgsSourceSelectDialog( const QString& serviceName, ServiceType serviceType, QWidget* parent, Qt::WindowFlags fl );
|
||||||
|
/** Destructor */
|
||||||
~QgsSourceSelectDialog();
|
~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 );
|
void setCurrentExtentAndCrs( const QgsRectangle& canvasExtent, const QgsCoordinateReferenceSystem& canvasCrs );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
/** Emitted when a layer is added from the dialog */
|
||||||
void addLayer( QString uri, QString typeName );
|
void addLayer( QString uri, QString typeName );
|
||||||
|
/** Emitted when the connections for the service were changed */
|
||||||
void connectionsChanged();
|
void connectionsChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -48,18 +56,22 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
|
|||||||
QgsRectangle mCanvasExtent;
|
QgsRectangle mCanvasExtent;
|
||||||
QgsCoordinateReferenceSystem mCanvasCrs;
|
QgsCoordinateReferenceSystem mCanvasCrs;
|
||||||
|
|
||||||
|
/** To be implemented in the child class. Called when a new connection is initiated. */
|
||||||
virtual bool connectToService( const QgsOWSConnection& connection ) = 0;
|
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& ) {}
|
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,
|
virtual QString getLayerURI( const QgsOWSConnection& connection,
|
||||||
const QString& layerTitle,
|
const QString& layerTitle,
|
||||||
const QString& layerName,
|
const QString& layerName,
|
||||||
const QString& crs = QString(),
|
const QString& crs = QString(),
|
||||||
const QString& filter = QString(),
|
const QString& filter = QString(),
|
||||||
const QgsRectangle& bBox = QgsRectangle() ) const = 0;
|
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 );
|
void populateImageEncodings( const QStringList& availableEncodings );
|
||||||
|
/** Returns the selected image encoding. */
|
||||||
QString getSelectedImageEncoding() const;
|
QString getSelectedImageEncoding() const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void populateConnectionList();
|
void populateConnectionList();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user