Poppler Qt5 25.04.90
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
49class POPPLER_QT5_EXPORT OptContentModel : public QAbstractItemModel
50{
51 friend class Document;
52
53 Q_OBJECT
54
55public:
56 ~OptContentModel() override;
57
58 QModelIndex index(int row, int column, const QModelIndex &parent) const override;
59 QModelIndex parent(const QModelIndex &child) const override;
60
61 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
62 int columnCount(const QModelIndex &parent) const override;
63
64 QVariant data(const QModelIndex &index, int role) const override;
65 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
66
67 Qt::ItemFlags flags(const QModelIndex &index) const override;
68
69 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
70
76
77private:
78 explicit OptContentModel(const OCGs *optContent, QObject *parent = nullptr);
79
80 friend class OptContentModelPrivate;
81 OptContentModelPrivate *d;
82};
83}
84
85#endif
PDF document.
Definition poppler-qt5.h:1146
OCGState: an optional content group state change.
Definition poppler-link.h:648
Model for optional content.
Definition poppler-optcontent.h:50
void applyLink(LinkOCGState *link)
Applies the Optional Content Changes specified by that link.
The Poppler Qt5 binding.
Definition poppler-annotation.h:50