QGIS API Documentation  3.12.1-BucureČ™ti (121cc00ff0)
qgsgeopdflayertreemodel.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgeopdflayertreemodel.h
3  ---------------------
4  begin : August 2019
5  copyright : (C) 2019 by Nyall Dawson
6  email : nyall dot dawson 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 QGSGEOPDFLAYERTREEMODEL_H
16 #define QGSGEOPDFLAYERTREEMODEL_H
17 
18 // We don't want to expose this in the public API
19 #define SIP_NO_FILE
20 
21 #include <QSortFilterProxyModel>
22 #include <QItemDelegate>
23 
24 #include "qgis_gui.h"
25 #include "qgslayertreemodel.h"
26 
27 class QgsMapCanvas;
28 class QgsProject;
29 
30 
38 class GUI_EXPORT QgsGeoPdfLayerTreeModel : public QgsLayerTreeModel
39 {
40  Q_OBJECT
41 
42  public:
44  QgsGeoPdfLayerTreeModel( QgsLayerTree *rootNode, QObject *parent = nullptr );
45 
46  int columnCount( const QModelIndex &parent ) const override;
47  QVariant headerData( int section, Qt::Orientation orientation, int role ) const override;
48  Qt::ItemFlags flags( const QModelIndex &idx ) const override;
49  QVariant data( const QModelIndex &index, int role ) const override;
50  bool setData( const QModelIndex &index, const QVariant &value, int role ) override;
51 
52  private:
53  enum Columns
54  {
55  LayerColumn = 0,
56  GroupColumn
57  };
58 
59  QgsVectorLayer *vectorLayer( const QModelIndex &idx ) const;
60 };
61 
62 #endif // QGSGEOPDFLAYERTREEMODEL_H
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:75
The QgsLayerTreeModel class is model implementation for Qt item views framework.
Namespace with helper functions for layer tree operations.
Definition: qgslayertree.h:32
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
Definition: qgsproject.h:91
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Flags flags() const
Returns OR-ed combination of model flags.
Layer tree model for Geo-PDF layers.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Represents a vector layer which manages a vector based data sets.