Poppler Qt5 24.02.0
poppler-optcontent.h
1/* poppler-optcontent.h: qt interface to poppler
2 *
3 * Copyright (C) 2007, Brad Hards <bradh@kde.org>
4 * Copyright (C) 2008, Pino Toscano <pino@kde.org>
5 * Copyright (C) 2013, Anthony Granger <grangeranthony@gmail.com>
6 * Copyright (C) 2016, 2021, Albert Astals Cid <aacid@kde.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22
23#ifndef POPPLER_OPTCONTENT_H
24#define POPPLER_OPTCONTENT_H
25
26#include <QtCore/QAbstractListModel>
27
28#include "poppler-export.h"
29#include "poppler-link.h"
30
31class OCGs;
32
33namespace Poppler {
34class Document;
35class OptContentModelPrivate;
36
48class POPPLER_QT5_EXPORT OptContentModel : public QAbstractItemModel
49{
50 friend class Document;
51
52 Q_OBJECT
53
54public:
55 ~OptContentModel() override;
56
57 QModelIndex index(int row, int column, const QModelIndex &parent) const override;
58 QModelIndex parent(const QModelIndex &child) const override;
59
60 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
61 int columnCount(const QModelIndex &parent) const override;
62
63 QVariant data(const QModelIndex &index, int role) const override;
64 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
65
66 Qt::ItemFlags flags(const QModelIndex &index) const override;
67
68 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
69
75
76private:
77 explicit OptContentModel(OCGs *optContent, QObject *parent = nullptr);
78
79 friend class OptContentModelPrivate;
80 OptContentModelPrivate *d;
81};
82}
83
84#endif
PDF document.
Definition poppler-qt5.h:1145
OCGState: an optional content group state change.
Definition poppler-link.h:630
Model for optional content.
Definition poppler-optcontent.h:49
void applyLink(LinkOCGState *link)
Applies the Optional Content Changes specified by that link.
The Poppler Qt5 binding.
Definition poppler-annotation.h:50