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
qpdfpageselector_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QPDFPAGESELECTOR_P_H
5#define QPDFPAGESELECTOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
19
20#include <QtWidgets/qspinbox.h>
21
22#include <QPointer>
23
25
27{
29public:
33
34 void setDocument(QPdfDocument *document);
35 QPdfDocument *document() const { return m_document.get(); }
36
39
40protected:
41 int valueFromText(const QString &text) const override;
42 QString textFromValue(int value) const override;
43 QValidator::State validate(QString &text, int &pos) const override;
44
45private:
46 void documentStatusChanged();
47private:
48 QPointer<QPdfDocument> m_document;
49 QMetaObject::Connection m_documentStatusChangedConnection;
50};
51
57
58QT_END_NAMESPACE
59
60#endif // QPDFPAGESELECTOR_P_H
QPdfPageSelectorSpinBox * spinBox
QValidator::State validate(QString &text, int &pos) const override
This virtual function is called by the QAbstractSpinBox to determine whether input is valid.
int valueFromText(const QString &text) const override
This virtual function is used by the spin box whenever it needs to interpret text entered by the user...
QPdfDocument * document() const
void setDocument(QPdfDocument *document)
QString textFromValue(int value) const override
This virtual function is used by the spin box whenever it needs to display the given value.
\inmodule QtPdf