QGIS API Documentation
2.0.1-Dufour
|
Dialog to create connections and add layers from WMS, WFS, WCS etc. More...
#include <qgsowssourceselect.h>
Classes | |
struct | SupportedFormat |
Formats supported by provider. More... |
Public Slots | |
void | on_mNewButton_clicked () |
Opens the create connection dialog to build a new connection. | |
void | on_mEditButton_clicked () |
Opens a dialog to edit an existing connection. | |
void | on_mDeleteButton_clicked () |
Deletes the selected connection. | |
void | on_mSaveButton_clicked () |
Saves connections to the file. | |
void | on_mLoadButton_clicked () |
Loads connections from the file. | |
void | on_mConnectButton_clicked () |
virtual void | addClicked () |
Determines the layers the user selected. | |
void | searchFinished () |
void | on_mChangeCRSButton_clicked () |
Opens the Spatial Reference System dialog. | |
virtual void | on_mLayersTreeWidget_itemSelectionChanged () |
Signaled when a layer selection is changed. | |
void | showStatusMessage (const QString &theMessage) |
Set status message to theMessage. | |
void | showError (const QString &theTitle, const QString &theFormat, const QString &theError) |
show whatever error is exposed. | |
void | on_mConnectionsComboBox_activated (int) |
Stores the selected datasource whenerver it is changed. | |
void | on_mAddDefaultButton_clicked () |
Add some default wms servers to the list. | |
void | on_mDialogButtonBox_helpRequested () |
Signals | |
void | addRasterLayer (const QString &rasterLayerPath, const QString &baseName, const QString &providerKey) |
void | connectionsChanged () |
Public Member Functions | |
QgsOWSSourceSelect (QString service, QWidget *parent=0, Qt::WFlags fl=QgisGui::ModalDialogFlags, bool managerMode=false, bool embeddedMode=false) | |
Constructor. | |
~QgsOWSSourceSelect () | |
Destructor. |
Protected Member Functions | |
virtual QList< SupportedFormat > | providerFormats () |
List of image formats (encodings) supported by provider. | |
virtual QStringList | selectedLayersFormats () |
List of formats supported for currently selected layer item(s) | |
virtual QStringList | selectedLayersCRSs () |
Server CRS supported for currently selected layer item(s) | |
virtual QStringList | selectedLayersTimes () |
List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s) | |
void | populateConnectionList () |
Populate the connection list combo box. | |
void | populateFormats () |
Populate supported formats. | |
void | clearFormats () |
Clear previously set formats. | |
void | populateCRS () |
Set supported CRSs. | |
void | clearCRS () |
Clear CRSs. | |
void | populateTimes () |
Populate times. | |
void | clearTimes () |
Clear times. | |
QString | connName () |
Connection name. | |
QString | connectionInfo () |
Connection info (uri) | |
void | setConnectionListPosition () |
Set the server connection combo box to that stored in the config file. | |
void | addDefaultServers () |
Add a few example servers to the list. | |
virtual void | populateLayerList () |
Populate the layer list. | |
QgsNumericSortTreeWidgetItem * | createItem (int id, const QStringList &names, QMap< int, QgsNumericSortTreeWidgetItem * > &items, int &layerAndStyleCount, const QMap< int, int > &layerParents, const QMap< int, QStringList > &layerParentNames) |
create an item including possible parents | |
QString | descriptionForAuthId (QString authId) |
Returns a textual description for the authority id. | |
void | addWMSListRow (const QDomElement &item, int row) |
void | addWMSListItem (const QDomElement &el, int row, int column) |
virtual void | enableLayersForCrs (QTreeWidgetItem *item) |
QString | selectedFormat () |
Returns currently selected format. | |
QString | selectedCRS () |
Returns currently selected Crs. | |
QString | selectedTime () |
Returns currently selected time. | |
QNetworkRequest::CacheLoadControl | selectedCacheLoadControl () |
Returns currently selected cache load control. |
Protected Attributes | |
QString | mService |
Service name. | |
bool | mManagerMode |
Connections manager mode. | |
bool | mEmbeddedMode |
Embedded mode, without 'Close'. | |
QString | mLastLayerName |
layer name derived from latest layer selection (updated as long it's not edited manually) | |
QPushButton * | mAddButton |
QMap< QString, QString > | mCrsNames |
QList< QTreeWidgetItem * > | mCurrentSelection |
QTableWidgetItem * | mCurrentTileset |
QString | mConnName |
Name for selected connection. | |
QString | mConnectionInfo |
Connection info for selected connection. | |
QgsDataSourceURI | mUri |
URI for selected connection. |
Private Slots | |
void | on_mSearchButton_clicked () |
void | on_mSearchTableWidget_itemSelectionChanged () |
void | on_mTilesetsTableWidget_itemClicked (QTableWidgetItem *item) |
void | on_mLayerUpButton_clicked () |
void | on_mLayerDownButton_clicked () |
virtual void | updateButtons () |
Private Attributes | |
QString | mSelectedCRS |
Selected CRS. | |
QSet< QString > | mSelectedLayersCRSs |
Common CRSs for selected layers. | |
QList< SupportedFormat > | mProviderFormats |
Supported formats. | |
QMap< QString, QString > | mMimeLabelMap |
Map mime type labels to supported formats. |
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 50 of file qgsowssourceselect.h.
QgsOWSSourceSelect::QgsOWSSourceSelect | ( | QString | service, |
QWidget * | parent = 0 , |
||
Qt::WFlags | fl = QgisGui::ModalDialogFlags , |
||
bool | managerMode = false , |
||
bool | embeddedMode = false |
||
) |
Constructor.
Definition at line 57 of file qgsowssourceselect.cpp.
References addClicked(), QgsCoordinateReferenceSystem::authid(), clearCRS(), QgsProject::instance(), QgsCoordinateReferenceSystem::InternalCrsId, QgsCoordinateReferenceSystem::isValid(), mAddButton, mEmbeddedMode, mManagerMode, mSelectedCRS, populateConnectionList(), QgsDebugMsg, QgsProject::readNumEntry(), and tr.
QgsOWSSourceSelect::~QgsOWSSourceSelect | ( | ) |
|
virtualslot |
Determines the layers the user selected.
Definition at line 379 of file qgsowssourceselect.cpp.
References QgsDebugMsg.
Referenced by QgsOWSSourceSelect().
|
protected |
Add a few example servers to the list.
Definition at line 597 of file qgsowssourceselect.cpp.
References mService, populateConnectionList(), and tr.
Referenced by on_mAddDefaultButton_clicked().
|
signal |
|
protected |
Definition at line 637 of file qgsowssourceselect.cpp.
Referenced by addWMSListRow().
|
protected |
Definition at line 627 of file qgsowssourceselect.cpp.
References addWMSListItem().
Referenced by searchFinished().
|
protected |
Clear CRSs.
Definition at line 469 of file qgsowssourceselect.cpp.
References mSelectedCRS, and tr.
Referenced by on_mConnectButton_clicked(), populateCRS(), and QgsOWSSourceSelect().
|
protected |
Clear previously set formats.
Definition at line 128 of file qgsowssourceselect.cpp.
Referenced by on_mConnectButton_clicked(), and populateFormats().
|
protected |
Clear times.
Definition at line 228 of file qgsowssourceselect.cpp.
Referenced by on_mConnectButton_clicked().
|
protected |
Connection info (uri)
Definition at line 508 of file qgsowssourceselect.cpp.
References mConnectionInfo.
|
signal |
Referenced by on_mDeleteButton_clicked(), on_mEditButton_clicked(), on_mLoadButton_clicked(), and on_mNewButton_clicked().
|
protected |
|
protected |
create an item including possible parents
Definition at line 317 of file qgsowssourceselect.cpp.
References QgsDebugMsg.
|
protected |
Returns a textual description for the authority id.
Definition at line 586 of file qgsowssourceselect.cpp.
References QgsCoordinateReferenceSystem::createFromOgcWmsCrs(), QgsCoordinateReferenceSystem::description(), and mCrsNames.
Referenced by on_mChangeCRSButton_clicked(), and populateCRS().
|
protectedvirtual |
Definition at line 384 of file qgsowssourceselect.cpp.
Referenced by on_mChangeCRSButton_clicked().
|
slot |
Add some default wms servers to the list.
Definition at line 581 of file qgsowssourceselect.cpp.
References addDefaultServers().
|
slot |
Opens the Spatial Reference System dialog.
Definition at line 388 of file qgsowssourceselect.cpp.
References QgsCoordinateReferenceSystem::createFromOgcWmsCrs(), descriptionForAuthId(), enableLayersForCrs(), GEO_EPSG_CRS_AUTHID, QgsProject::instance(), mSelectedCRS, mSelectedLayersCRSs, QgsProject::readEntry(), QgsGenericProjectionSelector::selectedAuthId(), QgsGenericProjectionSelector::setMessage(), QgsGenericProjectionSelector::setOgcWmsCrsFilter(), QgsGenericProjectionSelector::setSelectedCrsId(), QgsCoordinateReferenceSystem::srsid(), and updateButtons().
|
slot |
Connects to the database using the stored connection parameters. Once connected, available layers are displayed.
Definition at line 355 of file qgsowssourceselect.cpp.
References clearCRS(), clearFormats(), clearTimes(), mConnectionInfo, mConnName, mService, mUri, populateLayerList(), QgsDebugMsg, and QgsDataSourceURI::uri().
|
slot |
Stores the selected datasource whenerver it is changed.
Definition at line 575 of file qgsowssourceselect.cpp.
References mService, and QgsOWSConnection::setSelectedConnection().
|
slot |
Deletes the selected connection.
Definition at line 282 of file qgsowssourceselect.cpp.
References connectionsChanged(), QgsOWSConnection::deleteConnection(), mService, setConnectionListPosition(), and tr.
|
inlineslot |
Definition at line 108 of file qgsowssourceselect.h.
References QgsContextHelp::run().
|
slot |
Opens a dialog to edit an existing connection.
Definition at line 269 of file qgsowssourceselect.cpp.
References connectionsChanged(), mService, and populateConnectionList().
|
privateslot |
Definition at line 737 of file qgsowssourceselect.cpp.
|
virtualslot |
Signaled when a layer selection is changed.
Definition at line 425 of file qgsowssourceselect.cpp.
|
privateslot |
Definition at line 718 of file qgsowssourceselect.cpp.
|
slot |
Loads connections from the file.
Definition at line 302 of file qgsowssourceselect.cpp.
References connectionsChanged(), QgsManageConnectionsDialog::Import, populateConnectionList(), tr, and QgsManageConnectionsDialog::WCS.
|
slot |
Opens the create connection dialog to build a new connection.
Definition at line 256 of file qgsowssourceselect.cpp.
References connectionsChanged(), mService, and populateConnectionList().
|
slot |
Saves connections to the file.
Definition at line 296 of file qgsowssourceselect.cpp.
References QgsManageConnectionsDialog::Export, and QgsManageConnectionsDialog::WCS.
|
privateslot |
Definition at line 648 of file qgsowssourceselect.cpp.
References QgsNetworkAccessManager::instance(), QgsDebugMsg, and searchFinished().
|
privateslot |
Definition at line 713 of file qgsowssourceselect.cpp.
|
privateslot |
Definition at line 477 of file qgsowssourceselect.cpp.
References mCurrentTileset, QgsDebugMsg, and updateButtons().
|
protected |
Populate the connection list combo box.
Definition at line 234 of file qgsowssourceselect.cpp.
References QgsOWSConnection::connectionList(), mService, and setConnectionListPosition().
Referenced by addDefaultServers(), on_mEditButton_clicked(), on_mLoadButton_clicked(), on_mNewButton_clicked(), and QgsOWSSourceSelect().
|
protected |
Set supported CRSs.
Definition at line 429 of file qgsowssourceselect.cpp.
References clearCRS(), descriptionForAuthId(), GEO_EPSG_CRS_AUTHID, mSelectedCRS, mSelectedLayersCRSs, QgsDebugMsg, selectedLayersCRSs(), and tr.
|
protected |
Populate supported formats.
Definition at line 134 of file qgsowssourceselect.cpp.
References clearFormats(), mMimeLabelMap, mProviderFormats, providerFormats(), QgsDebugMsg, and selectedLayersFormats().
|
protectedvirtual |
Populate the layer list.
false | if the layers could not be retrieved or parsed |
Definition at line 351 of file qgsowssourceselect.cpp.
Referenced by on_mConnectButton_clicked().
|
protected |
Populate times.
Definition at line 220 of file qgsowssourceselect.cpp.
References QgsDebugMsg, and selectedLayersTimes().
|
protectedvirtual |
List of image formats (encodings) supported by provider.
Definition at line 756 of file qgsowssourceselect.cpp.
Referenced by populateFormats().
|
slot |
Definition at line 669 of file qgsowssourceselect.cpp.
References addWMSListRow(), QgsDebugMsg, showStatusMessage(), and tr.
Referenced by on_mSearchButton_clicked().
|
protected |
Returns currently selected cache load control.
Definition at line 518 of file qgsowssourceselect.cpp.
|
protected |
Returns currently selected Crs.
Definition at line 524 of file qgsowssourceselect.cpp.
References mSelectedCRS.
|
protected |
Returns currently selected format.
Definition at line 513 of file qgsowssourceselect.cpp.
References selectedLayersFormats().
|
protectedvirtual |
Server CRS supported for currently selected layer item(s)
Definition at line 766 of file qgsowssourceselect.cpp.
Referenced by populateCRS().
|
protectedvirtual |
List of formats supported for currently selected layer item(s)
Definition at line 761 of file qgsowssourceselect.cpp.
Referenced by populateFormats(), and selectedFormat().
|
protectedvirtual |
List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s)
Definition at line 771 of file qgsowssourceselect.cpp.
Referenced by populateTimes().
|
protected |
Returns currently selected time.
Definition at line 529 of file qgsowssourceselect.cpp.
|
protected |
Set the server connection combo box to that stored in the config file.
Definition at line 534 of file qgsowssourceselect.cpp.
References mService, QgsOWSConnection::selectedConnection(), and QgsOWSConnection::setSelectedConnection().
Referenced by on_mDeleteButton_clicked(), and populateConnectionList().
|
slot |
show whatever error is exposed.
Definition at line 559 of file qgsowssourceselect.cpp.
References QgsMessageViewer::setMessageAsHtml(), QgsMessageViewer::setMessageAsPlainText(), QgsMessageViewer::showMessage(), and tr.
|
slot |
Set status message to theMessage.
Definition at line 550 of file qgsowssourceselect.cpp.
Referenced by searchFinished().
|
privatevirtualslot |
Definition at line 776 of file qgsowssourceselect.cpp.
Referenced by on_mChangeCRSButton_clicked(), and on_mTilesetsTableWidget_itemClicked().
|
protected |
Definition at line 199 of file qgsowssourceselect.h.
Referenced by QgsOWSSourceSelect().
|
protected |
Connection info for selected connection.
Definition at line 227 of file qgsowssourceselect.h.
Referenced by connectionInfo(), and on_mConnectButton_clicked().
|
protected |
Name for selected connection.
Definition at line 224 of file qgsowssourceselect.h.
Referenced by connName(), and on_mConnectButton_clicked().
|
protected |
Definition at line 201 of file qgsowssourceselect.h.
Referenced by descriptionForAuthId().
|
protected |
Definition at line 220 of file qgsowssourceselect.h.
|
protected |
Definition at line 221 of file qgsowssourceselect.h.
Referenced by on_mTilesetsTableWidget_itemClicked().
|
protected |
Embedded mode, without 'Close'.
Definition at line 174 of file qgsowssourceselect.h.
Referenced by QgsOWSSourceSelect().
|
protected |
layer name derived from latest layer selection (updated as long it's not edited manually)
Definition at line 197 of file qgsowssourceselect.h.
|
protected |
Connections manager mode.
Definition at line 171 of file qgsowssourceselect.h.
Referenced by QgsOWSSourceSelect().
|
private |
Map mime type labels to supported formats.
Definition at line 243 of file qgsowssourceselect.h.
Referenced by populateFormats().
|
private |
Supported formats.
Definition at line 240 of file qgsowssourceselect.h.
Referenced by populateFormats().
|
private |
Selected CRS.
Definition at line 234 of file qgsowssourceselect.h.
Referenced by clearCRS(), on_mChangeCRSButton_clicked(), populateCRS(), QgsOWSSourceSelect(), and selectedCRS().
|
private |
Common CRSs for selected layers.
Definition at line 237 of file qgsowssourceselect.h.
Referenced by on_mChangeCRSButton_clicked(), and populateCRS().
|
protected |
Service name.
Definition at line 168 of file qgsowssourceselect.h.
Referenced by addDefaultServers(), on_mConnectButton_clicked(), on_mConnectionsComboBox_activated(), on_mDeleteButton_clicked(), on_mEditButton_clicked(), on_mNewButton_clicked(), populateConnectionList(), and setConnectionListPosition().
|
protected |
URI for selected connection.
Definition at line 230 of file qgsowssourceselect.h.
Referenced by on_mConnectButton_clicked().