Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpdfselection.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPDFSELECTION_H
5#define QPDFSELECTION_H
6
7#include <QtPdf/qtpdfglobal.h>
8
9#include <QtCore/qobject.h>
10#include <QtCore/qshareddata.h>
11#include <QtGui/qclipboard.h>
12#include <QtGui/qpolygon.h>
13
14QT_BEGIN_NAMESPACE
15
16class QPdfSelectionPrivate;
17
19{
20 Q_GADGET_EXPORT(Q_PDF_EXPORT)
27
28public:
32
35
36 void swap(QPdfSelection &other) noexcept { d.swap(other.d); }
37
38 Q_PDF_EXPORT bool isValid() const;
40 Q_PDF_EXPORT QString text() const;
41 Q_PDF_EXPORT QRectF boundingRectangle() const;
42 Q_PDF_EXPORT int startIndex() const;
43 Q_PDF_EXPORT int endIndex() const;
44#if QT_CONFIG(clipboard)
46#endif
47
48private:
49 QPdfSelection();
50 QPdfSelection(const QString &text, QList<QPolygonF> bounds, QRectF boundingRect, int startIndex, int endIndex);
51 QPdfSelection(QPdfSelectionPrivate *d);
52 friend class QPdfDocument;
53 friend class QQuickPdfSelection;
54
55private:
56 QExplicitlySharedDataPointer<QPdfSelectionPrivate> d;
57};
58Q_DECLARE_SHARED(QPdfSelection)
59
60QT_END_NAMESPACE
61
62#endif // QPDFSELECTION_H
The QPdfSelection class defines a range of text that has been selected on one page in a PDF document,...
Q_PDF_EXPORT int startIndex() const
Q_PDF_EXPORT int endIndex() const
Combined button and popup list for selecting options.