QGIS/src/providers/wms/qgswmsdataitems.h

79 lines
2.5 KiB
C
Raw Normal View History

/***************************************************************************
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
#include "qgsdataitem.h"
2011-10-13 21:17:05 -03:00
#include "qgswmsprovider.h"
class QgsWMSConnectionItem : public QgsDataCollectionItem
{
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 );
virtual QList<QAction*> actions();
2011-10-13 21:17:05 -03:00
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
QString mConnInfo;
QVector<QgsWmsLayerProperty> mLayerProperties;
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,
QgsWmsCapabilitiesProperty capabilitiesProperty, QString connInfo, QgsWmsLayerProperty layerProperties );
2011-10-13 21:17:05 -03:00
~QgsWMSLayerItem();
QString createUri();
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
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();
virtual QList<QAction*> actions();
2011-10-13 21:17:05 -03:00
virtual QWidget * paramWidget();
public slots:
void connectionsChanged();
void newConnection();
2011-10-13 21:17:05 -03:00
};
#endif // QGSWMSDATAITEMS_H