9#include <QtWidgets/qboxlayout.h>
35 d->spinBox->setObjectName(u
"_q_spinBox"_s);
37 vlay->setContentsMargins({});
38 vlay->addWidget(
d->spinBox);
61 d->spinBox->setDocument(doc);
67 return d->spinBox->document();
80 return d->spinBox->value();
86 d->spinBox->setValue(
index);
103 return d->spinBox->text();
110void QPdfPageSelectorSpinBox::documentStatusChanged()
124 disconnect(m_documentStatusChangedConnection);
130 m_documentStatusChangedConnection =
132 this, &QPdfPageSelectorSpinBox::documentStatusChanged);
135 documentStatusChanged();
170#include "moc_qpdfpageselector_p.cpp"
171#include "moc_qpdfpageselector.cpp"
QString text
the spin box's text, including any prefix and suffix
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPdfDocument class loads a PDF document and renders pages from it.
Status status
This property holds the current status of the document.
int pageCount
This property holds the number of pages in the loaded document or 0 if no document is loaded.
Q_INVOKABLE int pageIndexForLabel(const QString &label)
Returns the index of the page that has the label, or -1 if not found.
Q_INVOKABLE QString pageLabel(int page)
Returns the page number to be used for display purposes.
void statusChanged(QPdfDocument::Status status)
QPdfPageSelectorSpinBox()
QValidator::State validate(QString &text, int &pos) const override
This virtual function is called by the QAbstractSpinBox to determine whether input is valid.
~QPdfPageSelectorSpinBox()
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.
int currentPage
This property holds the index ({0}-based) of the current page in the document.
void setCurrentPage(int index)
QPdfDocument * document
This property holds the document to be viewed.
void setDocument(QPdfDocument *document)
void currentPageLabelChanged(const QString &label)
void currentPageChanged(int index)
QString currentPageLabel
This property holds the page label corresponding to the current page in the document.
~QPdfPageSelector() override
Destroys the page selector.
void documentChanged(QPdfDocument *document)
The QSpinBox class provides a spin box widget.
void textChanged(const QString &)
void valueChanged(int)
This signal is emitted whenever the spin box's value is changed.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString trimmed() const &
The QVBoxLayout class lines up widgets vertically.
State
This enum type defines the states in which a validated string can exist.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
myObject disconnect()
[26]