-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathqgswfsdataitems.h
92 lines (72 loc) · 2.65 KB
/
qgswfsdataitems.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/***************************************************************************
qgswfsdataitems.h
---------------------
begin : October 2011
copyright : (C) 2011 by Martin Dobias
email : wonder dot sk at gmail dot 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. *
* *
***************************************************************************/
#ifndef QGSWFSDATAITEMS_H
#define QGSWFSDATAITEMS_H
#include "qgsconnectionsitem.h"
#include "qgsdatacollectionitem.h"
#include "qgsdataitemprovider.h"
#include "qgsdataprovider.h"
#include "qgsdatasourceuri.h"
#include "qgswfscapabilities.h"
#include "qgslayeritem.h"
#include "qgsconfig.h"
class QgsWfsRootItem : public QgsConnectionsRootItem
{
Q_OBJECT
public:
QgsWfsRootItem( QgsDataItem *parent, QString name, QString path );
QVector<QgsDataItem *> createChildren() override;
QVariant sortKey() const override { return 9; }
#ifdef HAVE_GUI
QWidget *paramWidget() override;
#endif
public slots:
#ifdef HAVE_GUI
void onConnectionsChanged();
#endif
};
class QgsWfsConnection;
class QgsWfsConnectionItem : public QgsDataCollectionItem
{
Q_OBJECT
public:
QgsWfsConnectionItem( QgsDataItem *parent, QString name, QString path, QString uri );
QVector<QgsDataItem *> createChildren() override;
//virtual bool equal( const QgsDataItem *other );
private:
QString mUri;
QVector<QgsDataItem *> createChildrenOapif();
// QgsDataItem interface
public:
bool layerCollection() const override;
};
class QgsWfsLayerItem : public QgsLayerItem
{
Q_OBJECT
public:
QgsWfsLayerItem( QgsDataItem *parent, QString name, const QgsDataSourceUri &uri, QString featureType, QString title, QString crsString, const QString &providerKey );
protected:
QString mBaseUri;
};
//! Provider for WFS root data item
class QgsWfsDataItemProvider : public QgsDataItemProvider
{
public:
QString name() override;
QString dataProviderKey() const override;
Qgis::DataItemProviderCapabilities capabilities() const override;
QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) override;
};
#endif // QGSWFSDATAITEMS_H