summaryrefslogtreecommitdiffstats
path: root/src/pdf/qpdfselection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/qpdfselection.h')
-rw-r--r--src/pdf/qpdfselection.h69
1 files changed, 20 insertions, 49 deletions
diff --git a/src/pdf/qpdfselection.h b/src/pdf/qpdfselection.h
index 70077fdb0..8fcfaf2d8 100644
--- a/src/pdf/qpdfselection.h
+++ b/src/pdf/qpdfselection.h
@@ -1,38 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtPDF module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QPDFSELECTION_H
#define QPDFSELECTION_H
@@ -48,9 +15,9 @@ QT_BEGIN_NAMESPACE
class QPdfSelectionPrivate;
-class Q_PDF_EXPORT QPdfSelection
+class QPdfSelection
{
- Q_GADGET
+ Q_GADGET_EXPORT(Q_PDF_EXPORT)
Q_PROPERTY(bool valid READ isValid)
Q_PROPERTY(QList<QPolygonF> bounds READ bounds)
Q_PROPERTY(QRectF boundingRectangle READ boundingRectangle)
@@ -59,20 +26,23 @@ class Q_PDF_EXPORT QPdfSelection
Q_PROPERTY(int endIndex READ endIndex)
public:
- ~QPdfSelection();
- QPdfSelection(const QPdfSelection &other);
- QPdfSelection &operator=(const QPdfSelection &other);
- QPdfSelection(QPdfSelection &&other) noexcept;
- QPdfSelection &operator=(QPdfSelection &&other) noexcept { swap(other); return *this; }
+ Q_PDF_EXPORT ~QPdfSelection();
+ Q_PDF_EXPORT QPdfSelection(const QPdfSelection &other);
+ Q_PDF_EXPORT QPdfSelection &operator=(const QPdfSelection &other);
+
+ Q_PDF_EXPORT QPdfSelection(QPdfSelection &&other) noexcept;
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPdfSelection)
+
void swap(QPdfSelection &other) noexcept { d.swap(other.d); }
- bool isValid() const;
- QList<QPolygonF> bounds() const;
- QString text() const;
- QRectF boundingRectangle() const;
- int startIndex() const;
- int endIndex() const;
+
+ Q_PDF_EXPORT bool isValid() const;
+ Q_PDF_EXPORT QList<QPolygonF> bounds() const;
+ Q_PDF_EXPORT QString text() const;
+ Q_PDF_EXPORT QRectF boundingRectangle() const;
+ Q_PDF_EXPORT int startIndex() const;
+ Q_PDF_EXPORT int endIndex() const;
#if QT_CONFIG(clipboard)
- void copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const;
+ Q_PDF_EXPORT void copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const;
#endif
private:
@@ -85,6 +55,7 @@ private:
private:
QExplicitlySharedDataPointer<QPdfSelectionPrivate> d;
};
+Q_DECLARE_SHARED(QPdfSelection)
QT_END_NAMESPACE