2012-05-18 19:35:43 +02:00
|
|
|
/***************************************************************************
|
|
|
|
qgswmsdataitems.h
|
|
|
|
---------------------
|
|
|
|
begin : October 2011
|
|
|
|
copyright : (C) 2011 by Martin Dobias
|
|
|
|
email : wonder.sk at gmail.com
|
|
|
|
***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
2011-10-13 21:17:05 -03:00
|
|
|
#ifndef QGSWMSDATAITEMS_H
|
|
|
|
#define QGSWMSDATAITEMS_H
|
|
|
|
|
2011-10-18 23:02:09 -03:00
|
|
|
#include "qgsdataitem.h"
|
2011-10-13 21:17:05 -03:00
|
|
|
#include "qgswmsprovider.h"
|
|
|
|
|
|
|
|
class QgsWMSConnectionItem : public QgsDataCollectionItem
|
|
|
|
{
|
2011-10-13 21:28:37 -03:00
|
|
|
Q_OBJECT
|
2011-10-13 21:17:05 -03:00
|
|
|
public:
|
|
|
|
QgsWMSConnectionItem( QgsDataItem* parent, QString name, QString path );
|
|
|
|
~QgsWMSConnectionItem();
|
|
|
|
|
|
|
|
QVector<QgsDataItem*> createChildren();
|
|
|
|
virtual bool equal( const QgsDataItem *other );
|
|
|
|
|
2011-10-13 21:28:37 -03:00
|
|
|
virtual QList<QAction*> actions();
|
|
|
|
|
2011-10-13 21:17:05 -03:00
|
|
|
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
|
|
|
|
QString mConnInfo;
|
|
|
|
QVector<QgsWmsLayerProperty> mLayerProperties;
|
2011-10-13 21:28:37 -03:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void editConnection();
|
|
|
|
void deleteConnection();
|
2011-10-13 21:17:05 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
// WMS Layers may be nested, so that they may be both QgsDataCollectionItem and QgsLayerItem
|
|
|
|
// We have to use QgsDataCollectionItem and support layer methods if necessary
|
|
|
|
class QgsWMSLayerItem : public QgsLayerItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
QgsWMSLayerItem( QgsDataItem* parent, QString name, QString path,
|
2012-04-19 00:19:04 +02:00
|
|
|
QgsWmsCapabilitiesProperty capabilitiesProperty, QString connInfo, QgsWmsLayerProperty layerProperties );
|
2011-10-13 21:17:05 -03:00
|
|
|
~QgsWMSLayerItem();
|
|
|
|
|
|
|
|
QString createUri();
|
|
|
|
|
|
|
|
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
|
2012-04-19 00:19:04 +02:00
|
|
|
QString mConnInfo;
|
2011-10-13 21:17:05 -03:00
|
|
|
QgsWmsLayerProperty mLayerProperty;
|
|
|
|
};
|
|
|
|
|
|
|
|
class QgsWMSRootItem : public QgsDataCollectionItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
QgsWMSRootItem( QgsDataItem* parent, QString name, QString path );
|
|
|
|
~QgsWMSRootItem();
|
|
|
|
|
|
|
|
QVector<QgsDataItem*> createChildren();
|
|
|
|
|
2011-10-13 21:28:37 -03:00
|
|
|
virtual QList<QAction*> actions();
|
|
|
|
|
2011-10-13 21:17:05 -03:00
|
|
|
virtual QWidget * paramWidget();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void connectionsChanged();
|
2011-10-13 21:28:37 -03:00
|
|
|
|
|
|
|
void newConnection();
|
2011-10-13 21:17:05 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QGSWMSDATAITEMS_H
|