blob: bc2e352f7713496f5690377b6ee0e51285c6fb6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright (C) 2023 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 QPDFPAGESELECTOR_H
#define QPDFPAGESELECTOR_H
#include <QtPdfWidgets/qtpdfwidgetsglobal.h>
#include <QtWidgets/qspinbox.h>
QT_BEGIN_NAMESPACE
class QPdfDocument;
class QPdfPageNavigator;
class QPdfPageSelectorPrivate;
class Q_PDF_WIDGETS_EXPORT QPdfPageSelector : public QSpinBox
{
Q_OBJECT
Q_PROPERTY(QPdfDocument* document READ document WRITE setDocument NOTIFY documentChanged)
public:
QPdfPageSelector() : QPdfPageSelector(nullptr) {}
explicit QPdfPageSelector(QWidget *parent);
~QPdfPageSelector();
void setDocument(QPdfDocument *document);
QPdfDocument *document() const;
Q_SIGNALS:
void documentChanged(QPdfDocument *document);
protected:
int valueFromText(const QString &text) const override;
QString textFromValue(int value) const override;
private:
Q_DECLARE_PRIVATE(QPdfPageSelector)
QScopedPointer<QPdfPageSelectorPrivate> d_ptr;
};
QT_END_NAMESPACE
#endif // QPDFPAGESELECTOR_H
|