Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
18#include "qpdfpageselector.h"
19
20#include <QtWidgets/qspinbox.h>
21
22#include <QPointer>
23
25
27{
29public:
33
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
59
60#endif // QPDFPAGESELECTOR_P_H
QString text
the spin box's text, including any prefix and suffix
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPdfDocument class loads a PDF document and renders pages from it.
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...
void _q_documentChanged(QPdfDocument *document)
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.
T * get() const noexcept
Definition qpointer.h:75
The QSpinBox class provides a spin box widget.
Definition qspinbox.h:16
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
State
This enum type defines the states in which a validated string can exist.
Definition qvalidator.h:30
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QPoint pos
the position of the widget within its parent widget
Definition qwidget.h:111
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_OBJECT
#define Q_SIGNALS
QObject::connect nullptr