QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
layout
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
20
#include "qgis_gui.h"
21
#include "
qgsmaplayermodel.h
"
22
23
#include <QItemDelegate>
24
#include <QSortFilterProxyModel>
25
26
#define SIP_NO_FILE
27
28
class
QgsMapCanvas
;
29
class
QgsProject
;
30
class
QgsVectorLayer
;
31
32
40
class
GUI_EXPORT
QgsGeospatialPdfLayerTreeModel
:
public
QgsMapLayerModel
41
{
42
Q_OBJECT
43
44
public
:
46
enum
Columns
47
{
48
LayerColumn
= 0,
49
GroupColumn
,
50
InitiallyVisible
,
51
IncludeVectorAttributes
52
};
53
55
QgsGeospatialPdfLayerTreeModel
(
const
QList<QgsMapLayer *> &layers, QObject *parent =
nullptr
);
56
57
int
columnCount
(
const
QModelIndex &parent )
const override
;
58
QVariant headerData(
int
section, Qt::Orientation orientation,
int
role )
const override
;
59
Qt::ItemFlags
flags
(
const
QModelIndex &idx )
const override
;
60
QVariant
data
(
const
QModelIndex &index,
int
role )
const override
;
61
bool
setData
(
const
QModelIndex &index,
const
QVariant &value,
int
role )
override
;
62
66
void
checkAll
(
bool
checked,
const
QModelIndex &parent = QModelIndex(),
int
column = IncludeVectorAttributes );
67
68
private
:
69
QgsMapLayer
*mapLayer(
const
QModelIndex &idx )
const
;
70
QgsVectorLayer
*vectorLayer(
const
QModelIndex &idx )
const
;
71
};
72
73
75
class
GUI_EXPORT QgsGeospatialPdfLayerFilteredTreeModel :
public
QSortFilterProxyModel
76
{
77
Q_OBJECT
78
public
:
79
QgsGeospatialPdfLayerFilteredTreeModel( QgsGeospatialPdfLayerTreeModel *sourceModel, QObject *parent =
nullptr
);
80
81
bool
filterAcceptsRow(
int
source_row,
const
QModelIndex &source_parent )
const override
;
82
83
private
:
84
QgsGeospatialPdfLayerTreeModel *mLayerTreeModel =
nullptr
;
85
};
87
88
#endif
// QGSGEOPDFLAYERTREEMODEL_H
QgsGeospatialPdfLayerTreeModel
Layer tree model for Geo-PDF layers.
Definition
qgsgeopdflayertreemodel.h:41
QgsGeospatialPdfLayerTreeModel::Columns
Columns
Model columns.
Definition
qgsgeopdflayertreemodel.h:47
QgsGeospatialPdfLayerTreeModel::GroupColumn
@ GroupColumn
PDF group.
Definition
qgsgeopdflayertreemodel.h:49
QgsGeospatialPdfLayerTreeModel::LayerColumn
@ LayerColumn
Layer name.
Definition
qgsgeopdflayertreemodel.h:48
QgsGeospatialPdfLayerTreeModel::InitiallyVisible
@ InitiallyVisible
Initial visibility state.
Definition
qgsgeopdflayertreemodel.h:50
QgsGeospatialPdfLayerTreeModel::IncludeVectorAttributes
@ IncludeVectorAttributes
Vector attribute.
Definition
qgsgeopdflayertreemodel.h:51
QgsGeospatialPdfLayerTreeModel::QgsGeospatialPdfLayerTreeModel
QgsGeospatialPdfLayerTreeModel(const QList< QgsMapLayer * > &layers, QObject *parent=nullptr)
constructor
Definition
qgsgeopdflayertreemodel.cpp:31
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:96
QgsMapLayerModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition
qgsmaplayermodel.cpp:432
QgsMapLayerModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition
qgsmaplayermodel.cpp:321
QgsMapLayerModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition
qgsmaplayermodel.cpp:314
QgsMapLayerModel::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition
qgsmaplayermodel.cpp:585
QgsMapLayerModel::checkAll
void checkAll(Qt::CheckState checkState)
checkAll changes the checkstate for all the layers
Definition
qgsmaplayermodel.cpp:104
QgsMapLayerModel::QgsMapLayerModel
QgsMapLayerModel(QObject *parent=nullptr, QgsProject *project=nullptr)
QgsMapLayerModel creates a model to display layers in widgets.
Definition
qgsmaplayermodel.cpp:38
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgsmaplayermodel.h
Generated on
for QGIS API Documentation by
1.17.0