Poppler Qt6 25.01.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 * Copyright (C) 2025, g10 Code GmbH, Author: Sune Stolborg Vuorela <sune@vuorela.dk>
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, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22 */
23
24#ifndef POPPLER_OPTCONTENT_H
25#define POPPLER_OPTCONTENT_H
26
27#include <QtCore/QAbstractListModel>
28
29#include "poppler-export.h"
30#include "poppler-link.h"
31
32class OCGs;
33
34namespace Poppler {
35class Document;
36class OptContentModelPrivate;
37
47class POPPLER_QT6_EXPORT OptContentModel : public QAbstractItemModel
48{
49 friend class Document;
50
51 Q_OBJECT
52
53public:
54 ~OptContentModel() override;
55
56 QModelIndex index(int row, int column, const QModelIndex &parent) const override;
57 QModelIndex parent(const QModelIndex &child) const override;
58
59 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
60 int columnCount(const QModelIndex &parent) const override;
61
62 QVariant data(const QModelIndex &index, int role) const override;
63 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
64
65 Qt::ItemFlags flags(const QModelIndex &index) const override;
66
67 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
68
73
74private:
75 explicit OptContentModel(const OCGs *optContent, QObject *parent = nullptr);
76
77 friend class OptContentModelPrivate;
78 OptContentModelPrivate *d;
79};
80}
81
82#endif
PDF document.
Definition poppler-qt6.h:1056
OCGState: an optional content group state change.
Definition poppler-link.h:624
Model for optional content.
Definition poppler-optcontent.h:48
void applyLink(LinkOCGState *link)
Applies the Optional Content Changes specified by that link.
The Poppler Qt6 binding.
Definition poppler-annotation.h:51