QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsvectortiledataitems.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectortiledataitems.h
3  ---------------------
4  begin : March 2020
5  copyright : (C) 2020 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSVECTORTILEDATAITEMS_H
16 #define QGSVECTORTILEDATAITEMS_H
17 
18 #include "qgsdataitem.h"
19 #include "qgsdataitemprovider.h"
20 
22 #define SIP_NO_FILE
23 
25 class CORE_EXPORT QgsVectorTileRootItem : public QgsDataCollectionItem
26 {
27  Q_OBJECT
28  public:
29  QgsVectorTileRootItem( QgsDataItem *parent, QString name, QString path );
30 
31  QVector<QgsDataItem *> createChildren() override;
32 
33  QVariant sortKey() const override { return 8; }
34 
35 };
36 
38 class CORE_EXPORT QgsVectorTileLayerItem : public QgsLayerItem
39 {
40  Q_OBJECT
41  public:
42  QgsVectorTileLayerItem( QgsDataItem *parent, QString name, QString path, const QString &encodedUri );
43 
44 };
45 
46 
48 class QgsVectorTileDataItemProvider : public QgsDataItemProvider
49 {
50  public:
51  QString name() override;
52  QString dataProviderKey() const override;
53  int capabilities() const override;
54 
55  QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) override;
56 };
57 
59 
60 #endif // QGSVECTORTILEDATAITEMS_H
QgsDataItemProvider::capabilities
virtual int capabilities() const =0
Returns combination of flags from QgsDataProvider::DataCapabilities.
QgsDataCollectionItem
Definition: qgsdataitem.h:618
QgsDataItem::sortKey
virtual QVariant sortKey() const
Returns the sorting key for the item.
Definition: qgsdataitem.cpp:172
qgsdataitem.h
QgsDataItemProvider::createDataItem
virtual QgsDataItem * createDataItem(const QString &path, QgsDataItem *parentItem)=0
Create a new instance of QgsDataItem (or nullptr) for given path and parent item.
QgsDataItemProvider::name
virtual QString name()=0
Human-readable name of the provider name.
QgsDataItemProvider
Definition: qgsdataitemprovider.h:45
qgsdataitemprovider.h
QgsDataItemProvider::dataProviderKey
virtual QString dataProviderKey() const
Returns the data provider key (if the data item provider is associated with a data provider),...
Definition: qgsdataitemprovider.h:59
QgsLayerItem
Definition: qgsdataitem.h:499
QgsDataItem
Definition: qgsdataitem.h:49
QgsDataItem::createChildren
virtual QVector< QgsDataItem * > createChildren()
Create children.
Definition: qgsdataitem.cpp:255