QGIS API Documentation  2.99.0-Master (08ee180)
Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsOWSSourceSelect Class Reference

Dialog to create connections and add layers from WMS, WFS, WCS etc. More...

#include <qgsowssourceselect.h>

Inheritance diagram for QgsOWSSourceSelect:
Inheritance graph
[legend]

Classes

struct  SupportedFormat
 Formats supported by provider. More...
 

Public Slots

virtual void addClicked ()
 Determines the layers the user selected. More...
 
void on_mAddDefaultButton_clicked ()
 Add some default wms servers to the list. More...
 
void on_mChangeCRSButton_clicked ()
 Opens the Spatial Reference System dialog. More...
 
void on_mConnectButton_clicked ()
 Connects to the database using the stored connection parameters. More...
 
void on_mConnectionsComboBox_activated (int)
 Stores the selected datasource whenerver it is changed. More...
 
void on_mDeleteButton_clicked ()
 Deletes the selected connection. More...
 
void on_mDialogButtonBox_helpRequested ()
 
void on_mEditButton_clicked ()
 Opens a dialog to edit an existing connection. More...
 
virtual void on_mLayersTreeWidget_itemSelectionChanged ()
 Signaled when a layer selection is changed. More...
 
void on_mLoadButton_clicked ()
 Loads connections from the file. More...
 
void on_mNewButton_clicked ()
 Opens the create connection dialog to build a new connection. More...
 
void on_mSaveButton_clicked ()
 Saves connections to the file. More...
 
void searchFinished ()
 
void showError (const QString &theTitle, const QString &theFormat, const QString &theError)
 show whatever error is exposed. More...
 
void showStatusMessage (const QString &theMessage)
 Set status message to theMessage. More...
 

Signals

void addRasterLayer (const QString &rasterLayerPath, const QString &baseName, const QString &providerKey)
 
void connectionsChanged ()
 

Public Member Functions

 QgsOWSSourceSelect (const QString &service, QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags, bool managerMode=false, bool embeddedMode=false)
 Constructor. More...
 
 ~QgsOWSSourceSelect ()
 Destructor. More...
 

Protected Member Functions

void addDefaultServers ()
 Add a few example servers to the list. More...
 
void addWmsListItem (const QDomElement &el, int row, int column)
 
void addWmsListRow (const QDomElement &item, int row)
 
void clearCrs ()
 Clear CRSs. More...
 
void clearFormats ()
 Clear previously set formats. More...
 
void clearTimes ()
 Clear times. More...
 
QString connectionInfo ()
 Connection info (uri) More...
 
QString connName ()
 Connection name. More...
 
QgsTreeWidgetItemcreateItem (int id, const QStringList &names, QMap< int, QgsTreeWidgetItem *> &items, int &layerAndStyleCount, const QMap< int, int > &layerParents, const QMap< int, QStringList > &layerParentNames)
 create an item including possible parents More...
 
QString descriptionForAuthId (const QString &authId)
 Returns a textual description for the authority id. More...
 
virtual void enableLayersForCrs (QTreeWidgetItem *item)
 
void populateConnectionList ()
 Populate the connection list combo box. More...
 
void populateCrs ()
 Set supported CRSs. More...
 
void populateFormats ()
 Populate supported formats. More...
 
virtual void populateLayerList ()
 Populate the layer list. More...
 
void populateTimes ()
 Populate times. More...
 
virtual QList< SupportedFormatproviderFormats ()
 List of image formats (encodings) supported by provider. More...
 
QNetworkRequest::CacheLoadControl selectedCacheLoadControl ()
 Returns currently selected cache load control. More...
 
QString selectedCrs ()
 Returns currently selected Crs. More...
 
QString selectedFormat ()
 Returns currently selected format. More...
 
virtual QStringList selectedLayersCrses ()
 Server CRS supported for currently selected layer item(s) More...
 
virtual QStringList selectedLayersFormats ()
 List of formats supported for currently selected layer item(s) More...
 
virtual QStringList selectedLayersTimes ()
 List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s) More...
 
QString selectedTime ()
 Returns currently selected time. More...
 
void setConnectionListPosition ()
 Set the server connection combo box to that stored in the config file. More...
 

Protected Attributes

QPushButton * mAddButton
 
QString mConnectionInfo
 Connection info for selected connection. More...
 
QString mConnName
 Name for selected connection. More...
 
QMap< QString, QString > mCrsNames
 
QList< QTreeWidgetItem * > mCurrentSelection
 
QTableWidgetItem * mCurrentTileset
 
bool mEmbeddedMode
 Embedded mode, without 'Close'. More...
 
QString mLastLayerName
 layer name derived from latest layer selection (updated as long it's not edited manually) More...
 
bool mManagerMode
 Connections manager mode. More...
 
QString mService
 Service name. More...
 
QgsDataSourceUri mUri
 URI for selected connection. More...
 

Detailed Description

Dialog to create connections and add layers from WMS, WFS, WCS etc.

This dialog allows the user to define and save connection information for WMS servers, etc.

The user can then connect and add layers from the WMS server to the map canvas.

Definition at line 47 of file qgsowssourceselect.h.

Constructor & Destructor Documentation

§ QgsOWSSourceSelect()

QgsOWSSourceSelect::QgsOWSSourceSelect ( const QString &  service,
QWidget *  parent = nullptr,
Qt::WindowFlags  fl = QgisGui::ModalDialogFlags,
bool  managerMode = false,
bool  embeddedMode = false 
)

Constructor.

Definition at line 57 of file qgsowssourceselect.cpp.

§ ~QgsOWSSourceSelect()

QgsOWSSourceSelect::~QgsOWSSourceSelect ( )

Destructor.

Definition at line 122 of file qgsowssourceselect.cpp.

Member Function Documentation

§ addClicked

void QgsOWSSourceSelect::addClicked ( )
virtualslot

Determines the layers the user selected.

Definition at line 360 of file qgsowssourceselect.cpp.

§ addDefaultServers()

void QgsOWSSourceSelect::addDefaultServers ( )
protected

Add a few example servers to the list.

Definition at line 592 of file qgsowssourceselect.cpp.

§ addRasterLayer

void QgsOWSSourceSelect::addRasterLayer ( const QString &  rasterLayerPath,
const QString &  baseName,
const QString &  providerKey 
)
signal

§ addWmsListItem()

void QgsOWSSourceSelect::addWmsListItem ( const QDomElement &  el,
int  row,
int  column 
)
protected

Definition at line 632 of file qgsowssourceselect.cpp.

§ addWmsListRow()

void QgsOWSSourceSelect::addWmsListRow ( const QDomElement &  item,
int  row 
)
protected

Definition at line 622 of file qgsowssourceselect.cpp.

§ clearCrs()

void QgsOWSSourceSelect::clearCrs ( )
protected

Clear CRSs.

Definition at line 447 of file qgsowssourceselect.cpp.

§ clearFormats()

void QgsOWSSourceSelect::clearFormats ( )
protected

Clear previously set formats.

Definition at line 129 of file qgsowssourceselect.cpp.

§ clearTimes()

void QgsOWSSourceSelect::clearTimes ( )
protected

Clear times.

Definition at line 227 of file qgsowssourceselect.cpp.

§ connectionInfo()

QString QgsOWSSourceSelect::connectionInfo ( )
protected

Connection info (uri)

Definition at line 486 of file qgsowssourceselect.cpp.

§ connectionsChanged

void QgsOWSSourceSelect::connectionsChanged ( )
signal

§ connName()

QString QgsOWSSourceSelect::connName ( )
protected

Connection name.

Definition at line 481 of file qgsowssourceselect.cpp.

§ createItem()

QgsTreeWidgetItem * QgsOWSSourceSelect::createItem ( int  id,
const QStringList &  names,
QMap< int, QgsTreeWidgetItem *> &  items,
int &  layerAndStyleCount,
const QMap< int, int > &  layerParents,
const QMap< int, QStringList > &  layerParentNames 
)
protected

create an item including possible parents

Note
not available in python bindings

Definition at line 301 of file qgsowssourceselect.cpp.

§ descriptionForAuthId()

QString QgsOWSSourceSelect::descriptionForAuthId ( const QString &  authId)
protected

Returns a textual description for the authority id.

Definition at line 582 of file qgsowssourceselect.cpp.

§ enableLayersForCrs()

void QgsOWSSourceSelect::enableLayersForCrs ( QTreeWidgetItem *  item)
protectedvirtual

Definition at line 364 of file qgsowssourceselect.cpp.

§ on_mAddDefaultButton_clicked

void QgsOWSSourceSelect::on_mAddDefaultButton_clicked ( )
slot

Add some default wms servers to the list.

Definition at line 577 of file qgsowssourceselect.cpp.

§ on_mChangeCRSButton_clicked

void QgsOWSSourceSelect::on_mChangeCRSButton_clicked ( )
slot

Opens the Spatial Reference System dialog.

Definition at line 368 of file qgsowssourceselect.cpp.

§ on_mConnectButton_clicked

void QgsOWSSourceSelect::on_mConnectButton_clicked ( )
slot

Connects to the database using the stored connection parameters.

Once connected, available layers are displayed.

Definition at line 339 of file qgsowssourceselect.cpp.

§ on_mConnectionsComboBox_activated

void QgsOWSSourceSelect::on_mConnectionsComboBox_activated ( int  )
slot

Stores the selected datasource whenerver it is changed.

Definition at line 571 of file qgsowssourceselect.cpp.

§ on_mDeleteButton_clicked

void QgsOWSSourceSelect::on_mDeleteButton_clicked ( )
slot

Deletes the selected connection.

Definition at line 266 of file qgsowssourceselect.cpp.

§ on_mDialogButtonBox_helpRequested

void QgsOWSSourceSelect::on_mDialogButtonBox_helpRequested ( )
inlineslot

Definition at line 105 of file qgsowssourceselect.h.

§ on_mEditButton_clicked

void QgsOWSSourceSelect::on_mEditButton_clicked ( )
slot

Opens a dialog to edit an existing connection.

Definition at line 253 of file qgsowssourceselect.cpp.

§ on_mLayersTreeWidget_itemSelectionChanged

void QgsOWSSourceSelect::on_mLayersTreeWidget_itemSelectionChanged ( )
virtualslot

Signaled when a layer selection is changed.

Definition at line 404 of file qgsowssourceselect.cpp.

§ on_mLoadButton_clicked

void QgsOWSSourceSelect::on_mLoadButton_clicked ( )
slot

Loads connections from the file.

Definition at line 286 of file qgsowssourceselect.cpp.

§ on_mNewButton_clicked

void QgsOWSSourceSelect::on_mNewButton_clicked ( )
slot

Opens the create connection dialog to build a new connection.

Definition at line 240 of file qgsowssourceselect.cpp.

§ on_mSaveButton_clicked

void QgsOWSSourceSelect::on_mSaveButton_clicked ( )
slot

Saves connections to the file.

Definition at line 280 of file qgsowssourceselect.cpp.

§ populateConnectionList()

void QgsOWSSourceSelect::populateConnectionList ( )
protected

Populate the connection list combo box.

Definition at line 233 of file qgsowssourceselect.cpp.

§ populateCrs()

void QgsOWSSourceSelect::populateCrs ( )
protected

Set supported CRSs.

Definition at line 408 of file qgsowssourceselect.cpp.

§ populateFormats()

void QgsOWSSourceSelect::populateFormats ( )
protected

Populate supported formats.

Definition at line 135 of file qgsowssourceselect.cpp.

§ populateLayerList()

void QgsOWSSourceSelect::populateLayerList ( )
protectedvirtual

Populate the layer list.

Return values
falseif the layers could not be retrieved or parsed

Definition at line 335 of file qgsowssourceselect.cpp.

§ populateTimes()

void QgsOWSSourceSelect::populateTimes ( )
protected

Populate times.

Definition at line 220 of file qgsowssourceselect.cpp.

§ providerFormats()

QList< QgsOWSSourceSelect::SupportedFormat > QgsOWSSourceSelect::providerFormats ( )
protectedvirtual

List of image formats (encodings) supported by provider.

Returns
list of format/label pairs

Definition at line 751 of file qgsowssourceselect.cpp.

§ searchFinished

void QgsOWSSourceSelect::searchFinished ( )
slot

Definition at line 664 of file qgsowssourceselect.cpp.

§ selectedCacheLoadControl()

QNetworkRequest::CacheLoadControl QgsOWSSourceSelect::selectedCacheLoadControl ( )
protected

Returns currently selected cache load control.

Definition at line 496 of file qgsowssourceselect.cpp.

§ selectedCrs()

QString QgsOWSSourceSelect::selectedCrs ( )
protected

Returns currently selected Crs.

Definition at line 502 of file qgsowssourceselect.cpp.

§ selectedFormat()

QString QgsOWSSourceSelect::selectedFormat ( )
protected

Returns currently selected format.

Definition at line 491 of file qgsowssourceselect.cpp.

§ selectedLayersCrses()

QStringList QgsOWSSourceSelect::selectedLayersCrses ( )
protectedvirtual

Server CRS supported for currently selected layer item(s)

Definition at line 761 of file qgsowssourceselect.cpp.

§ selectedLayersFormats()

QStringList QgsOWSSourceSelect::selectedLayersFormats ( )
protectedvirtual

List of formats supported for currently selected layer item(s)

Definition at line 756 of file qgsowssourceselect.cpp.

§ selectedLayersTimes()

QStringList QgsOWSSourceSelect::selectedLayersTimes ( )
protectedvirtual

List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s)

Definition at line 766 of file qgsowssourceselect.cpp.

§ selectedTime()

QString QgsOWSSourceSelect::selectedTime ( )
protected

Returns currently selected time.

Definition at line 507 of file qgsowssourceselect.cpp.

§ setConnectionListPosition()

void QgsOWSSourceSelect::setConnectionListPosition ( )
protected

Set the server connection combo box to that stored in the config file.

Definition at line 512 of file qgsowssourceselect.cpp.

§ showError

void QgsOWSSourceSelect::showError ( const QString &  theTitle,
const QString &  theFormat,
const QString &  theError 
)
slot

show whatever error is exposed.

Definition at line 555 of file qgsowssourceselect.cpp.

§ showStatusMessage

void QgsOWSSourceSelect::showStatusMessage ( const QString &  theMessage)
slot

Set status message to theMessage.

Definition at line 546 of file qgsowssourceselect.cpp.

Member Data Documentation

§ mAddButton

QPushButton* QgsOWSSourceSelect::mAddButton
protected

Definition at line 197 of file qgsowssourceselect.h.

§ mConnectionInfo

QString QgsOWSSourceSelect::mConnectionInfo
protected

Connection info for selected connection.

Definition at line 225 of file qgsowssourceselect.h.

§ mConnName

QString QgsOWSSourceSelect::mConnName
protected

Name for selected connection.

Definition at line 222 of file qgsowssourceselect.h.

§ mCrsNames

QMap<QString, QString> QgsOWSSourceSelect::mCrsNames
protected

Definition at line 199 of file qgsowssourceselect.h.

§ mCurrentSelection

QList<QTreeWidgetItem*> QgsOWSSourceSelect::mCurrentSelection
protected

Definition at line 218 of file qgsowssourceselect.h.

§ mCurrentTileset

QTableWidgetItem* QgsOWSSourceSelect::mCurrentTileset
protected

Definition at line 219 of file qgsowssourceselect.h.

§ mEmbeddedMode

bool QgsOWSSourceSelect::mEmbeddedMode
protected

Embedded mode, without 'Close'.

Definition at line 172 of file qgsowssourceselect.h.

§ mLastLayerName

QString QgsOWSSourceSelect::mLastLayerName
protected

layer name derived from latest layer selection (updated as long it's not edited manually)

Definition at line 195 of file qgsowssourceselect.h.

§ mManagerMode

bool QgsOWSSourceSelect::mManagerMode
protected

Connections manager mode.

Definition at line 169 of file qgsowssourceselect.h.

§ mService

QString QgsOWSSourceSelect::mService
protected

Service name.

Definition at line 166 of file qgsowssourceselect.h.

§ mUri

QgsDataSourceUri QgsOWSSourceSelect::mUri
protected

URI for selected connection.

Definition at line 228 of file qgsowssourceselect.h.


The documentation for this class was generated from the following files: