QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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

void on_mNewButton_clicked ()
 Opens the create connection dialog to build a new connection. More...
 
void on_mEditButton_clicked ()
 Opens a dialog to edit an existing connection. More...
 
void on_mDeleteButton_clicked ()
 Deletes the selected connection. More...
 
void on_mSaveButton_clicked ()
 Saves connections to the file. More...
 
void on_mLoadButton_clicked ()
 Loads connections from the file. More...
 
void on_mConnectButton_clicked ()
 
virtual void addClicked ()
 Determines the layers the user selected. More...
 
void searchFinished ()
 
void on_mChangeCRSButton_clicked ()
 Opens the Spatial Reference System dialog. More...
 
virtual void on_mLayersTreeWidget_itemSelectionChanged ()
 Signaled when a layer selection is changed. More...
 
void showStatusMessage (const QString &theMessage)
 Set status message to theMessage. More...
 
void showError (const QString &theTitle, const QString &theFormat, const QString &theError)
 show whatever error is exposed. More...
 
void on_mConnectionsComboBox_activated (int)
 Stores the selected datasource whenerver it is changed. More...
 
void on_mAddDefaultButton_clicked ()
 Add some default wms servers to the list. More...
 
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::WindowFlags fl=QgisGui::ModalDialogFlags, bool managerMode=false, bool embeddedMode=false)
 Constructor. More...
 
 ~QgsOWSSourceSelect ()
 Destructor. More...
 

Protected Member Functions

virtual QList< SupportedFormatproviderFormats ()
 List of image formats (encodings) supported by provider. More...
 
virtual QStringList selectedLayersFormats ()
 List of formats supported for currently selected layer item(s) More...
 
virtual QStringList selectedLayersCRSs ()
 Server CRS supported for currently selected layer item(s) More...
 
virtual QStringList selectedLayersTimes ()
 List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s) More...
 
void populateConnectionList ()
 Populate the connection list combo box. More...
 
void populateFormats ()
 Populate supported formats. More...
 
void clearFormats ()
 Clear previously set formats. More...
 
void populateCRS ()
 Set supported CRSs. More...
 
void clearCRS ()
 Clear CRSs. More...
 
void populateTimes ()
 Populate times. More...
 
void clearTimes ()
 Clear times. More...
 
QString connName ()
 Connection name. More...
 
QString connectionInfo ()
 Connection info (uri) More...
 
void setConnectionListPosition ()
 Set the server connection combo box to that stored in the config file. More...
 
void addDefaultServers ()
 Add a few example servers to the list. More...
 
virtual void populateLayerList ()
 Populate the layer list. More...
 
QgsNumericSortTreeWidgetItemcreateItem (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 More...
 
QString descriptionForAuthId (QString authId)
 Returns a textual description for the authority id. More...
 
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. More...
 
QString selectedCRS ()
 Returns currently selected Crs. More...
 
QString selectedTime ()
 Returns currently selected time. More...
 
QNetworkRequest::CacheLoadControl selectedCacheLoadControl ()
 Returns currently selected cache load control. More...
 

Protected Attributes

QString mService
 Service name. More...
 
bool mManagerMode
 Connections manager mode. More...
 
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...
 
QPushButton * mAddButton
 
QMap< QString, QString > mCrsNames
 
QList< QTreeWidgetItem * > mCurrentSelection
 
QTableWidgetItem * mCurrentTileset
 
QString mConnName
 Name for selected connection. More...
 
QString mConnectionInfo
 Connection info for selected connection. 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.

Constructor & Destructor Documentation

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

Constructor.

QgsOWSSourceSelect::~QgsOWSSourceSelect ( )

Destructor.

Member Function Documentation

void QgsOWSSourceSelect::addClicked ( )
virtualslot

Determines the layers the user selected.

void QgsOWSSourceSelect::addDefaultServers ( )
protected

Add a few example servers to the list.

void QgsOWSSourceSelect::addRasterLayer ( const QString &  rasterLayerPath,
const QString &  baseName,
const QString &  providerKey 
)
signal
void QgsOWSSourceSelect::addWMSListItem ( const QDomElement &  el,
int  row,
int  column 
)
protected
void QgsOWSSourceSelect::addWMSListRow ( const QDomElement &  item,
int  row 
)
protected
void QgsOWSSourceSelect::clearCRS ( )
protected

Clear CRSs.

void QgsOWSSourceSelect::clearFormats ( )
protected

Clear previously set formats.

void QgsOWSSourceSelect::clearTimes ( )
protected

Clear times.

QString QgsOWSSourceSelect::connectionInfo ( )
protected

Connection info (uri)

void QgsOWSSourceSelect::connectionsChanged ( )
signal
QString QgsOWSSourceSelect::connName ( )
protected

Connection name.

QgsNumericSortTreeWidgetItem * QgsOWSSourceSelect::createItem ( int  id,
const QStringList &  names,
QMap< int, QgsNumericSortTreeWidgetItem * > &  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
QString QgsOWSSourceSelect::descriptionForAuthId ( QString  authId)
protected

Returns a textual description for the authority id.

void QgsOWSSourceSelect::enableLayersForCrs ( QTreeWidgetItem *  item)
protectedvirtual
void QgsOWSSourceSelect::on_mAddDefaultButton_clicked ( )
slot

Add some default wms servers to the list.

void QgsOWSSourceSelect::on_mChangeCRSButton_clicked ( )
slot

Opens the Spatial Reference System dialog.

void QgsOWSSourceSelect::on_mConnectButton_clicked ( )
slot

Connects to the database using the stored connection parameters. Once connected, available layers are displayed.

void QgsOWSSourceSelect::on_mConnectionsComboBox_activated ( int  )
slot

Stores the selected datasource whenerver it is changed.

void QgsOWSSourceSelect::on_mDeleteButton_clicked ( )
slot

Deletes the selected connection.

void QgsOWSSourceSelect::on_mDialogButtonBox_helpRequested ( )
inlineslot
void QgsOWSSourceSelect::on_mEditButton_clicked ( )
slot

Opens a dialog to edit an existing connection.

void QgsOWSSourceSelect::on_mLayersTreeWidget_itemSelectionChanged ( )
virtualslot

Signaled when a layer selection is changed.

void QgsOWSSourceSelect::on_mLoadButton_clicked ( )
slot

Loads connections from the file.

void QgsOWSSourceSelect::on_mNewButton_clicked ( )
slot

Opens the create connection dialog to build a new connection.

void QgsOWSSourceSelect::on_mSaveButton_clicked ( )
slot

Saves connections to the file.

void QgsOWSSourceSelect::populateConnectionList ( )
protected

Populate the connection list combo box.

void QgsOWSSourceSelect::populateCRS ( )
protected

Set supported CRSs.

void QgsOWSSourceSelect::populateFormats ( )
protected

Populate supported formats.

void QgsOWSSourceSelect::populateLayerList ( )
protectedvirtual

Populate the layer list.

Return values
falseif the layers could not be retrieved or parsed
void QgsOWSSourceSelect::populateTimes ( )
protected

Populate times.

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

List of image formats (encodings) supported by provider.

Returns
list of format/label pairs
void QgsOWSSourceSelect::searchFinished ( )
slot
QNetworkRequest::CacheLoadControl QgsOWSSourceSelect::selectedCacheLoadControl ( )
protected

Returns currently selected cache load control.

QString QgsOWSSourceSelect::selectedCRS ( )
protected

Returns currently selected Crs.

QString QgsOWSSourceSelect::selectedFormat ( )
protected

Returns currently selected format.

QStringList QgsOWSSourceSelect::selectedLayersCRSs ( )
protectedvirtual

Server CRS supported for currently selected layer item(s)

QStringList QgsOWSSourceSelect::selectedLayersFormats ( )
protectedvirtual

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

QStringList QgsOWSSourceSelect::selectedLayersTimes ( )
protectedvirtual

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

QString QgsOWSSourceSelect::selectedTime ( )
protected

Returns currently selected time.

void QgsOWSSourceSelect::setConnectionListPosition ( )
protected

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

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

show whatever error is exposed.

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

Set status message to theMessage.

Member Data Documentation

QPushButton* QgsOWSSourceSelect::mAddButton
protected
QString QgsOWSSourceSelect::mConnectionInfo
protected

Connection info for selected connection.

QString QgsOWSSourceSelect::mConnName
protected

Name for selected connection.

QMap<QString, QString> QgsOWSSourceSelect::mCrsNames
protected
QList<QTreeWidgetItem*> QgsOWSSourceSelect::mCurrentSelection
protected
QTableWidgetItem* QgsOWSSourceSelect::mCurrentTileset
protected
bool QgsOWSSourceSelect::mEmbeddedMode
protected

Embedded mode, without 'Close'.

QString QgsOWSSourceSelect::mLastLayerName
protected

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

bool QgsOWSSourceSelect::mManagerMode
protected

Connections manager mode.

QString QgsOWSSourceSelect::mService
protected

Service name.

QgsDataSourceURI QgsOWSSourceSelect::mUri
protected

URI for selected connection.


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