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 "qgsconnectionsitem.h"
19 #include "qgslayeritem.h"
20 #include "qgsdataitemprovider.h"
21 
22 ///@cond PRIVATE
23 #define SIP_NO_FILE
24 
25 //! Root item for XYZ tile layers
26 class CORE_EXPORT QgsVectorTileRootItem : public QgsConnectionsRootItem
27 {
28     Q_OBJECT
29   public:
30     QgsVectorTileRootItem( QgsDataItem *parent, QString name, QString path );
31 
32     QVector<QgsDataItem *> createChildren() override;
33 
sortKey()34     QVariant sortKey() const override { return 8; }
35 
36 };
37 
38 //! Item implementation for XYZ tile layers
39 class CORE_EXPORT QgsVectorTileLayerItem : public QgsLayerItem
40 {
41     Q_OBJECT
42   public:
43     QgsVectorTileLayerItem( QgsDataItem *parent, QString name, QString path, const QString &encodedUri );
44 
45 };
46 
47 
48 //! Provider for XYZ root data item
49 class QgsVectorTileDataItemProvider : public QgsDataItemProvider
50 {
51   public:
52     QString name() override;
53     QString dataProviderKey() const override;
54     int capabilities() const override;
55 
56     QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) override;
57 };
58 
59 ///@endcond
60 
61 #endif // QGSVECTORTILEDATAITEMS_H
62