Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
15
17
19{
21 Q_PROPERTY(bool valid READ isValid)
27
28public:
32
34 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPdfSelection)
35
36 void swap(QPdfSelection &other) noexcept { d.swap(other.d); }
37
38 Q_PDF_EXPORT bool isValid() const;
42 Q_PDF_EXPORT int startIndex() const;
43 Q_PDF_EXPORT int endIndex() const;
44#if QT_CONFIG(clipboard)
45 Q_PDF_EXPORT void copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const;
46#endif
47
48private:
52 friend class QPdfDocument;
53 friend class QQuickPdfSelection;
54
55private:
57};
58Q_DECLARE_SHARED(QPdfSelection)
59
61
62#endif // QPDFSELECTION_H
Mode
\keyword clipboard mode
Definition qclipboard.h:27
void swap(QExplicitlySharedDataPointer &other) noexcept
Swap this instance's explicitly shared data pointer with the explicitly shared data pointer in other.
Definition qlist.h:74
The QPdfDocument class loads a PDF document and renders pages from it.
The QPdfSelection class defines a range of text that has been selected on one page in a PDF document,...
Q_PDF_EXPORT ~QPdfSelection()
Q_PDF_EXPORT QPdfSelection & operator=(const QPdfSelection &other)
int startIndex
This property holds the index at the beginning of \l text within the full text on the page.
QString text
This property holds the selected text.
QList< QPolygonF > bounds
This property holds a set of regions that the selected text occupies on the page, represented as poly...
Q_PDF_EXPORT QPdfSelection(const QPdfSelection &other)
QRectF boundingRectangle
This property holds the overall bounding rectangle (convex hull) around \l bounds.
Q_PDF_EXPORT bool isValid() const
int endIndex
This property holds the index at the end of \l text within the full text on the page.
Q_PDF_EXPORT QPdfSelection(QPdfSelection &&other) noexcept
bool valid
This property holds whether the selection is valid.
\inmodule QtCore\reentrant
Definition qrect.h:483
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLenum mode
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define Q_PROPERTY(...)
#define Q_GADGET_EXPORT(...)
#define Q_PDF_EXPORT
Definition qtpdfglobal.h:16
QSharedPointer< T > other(t)
[5]