Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qpdfpageselector.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_H
5
#
define
QPDFPAGESELECTOR_H
6
7
#
include
<
QtPdfWidgets
/
qtpdfwidgetsglobal
.
h
>
8
9
#
include
<
QtWidgets
/
qwidget
.
h
>
10
11
#
include
<
memory
>
12
13
QT_BEGIN_NAMESPACE
14
15
class
QPdfDocument;
16
class
QPdfPageSelectorPrivate
;
17
18
class
Q_PDF_WIDGETS_EXPORT
QPdfPageSelector
:
public
QWidget
19
{
20
Q_OBJECT
21
22
Q_PROPERTY(QPdfDocument* document READ document WRITE setDocument NOTIFY documentChanged)
23
Q_PROPERTY(
int
currentPage READ currentPage WRITE setCurrentPage NOTIFY currentPageChanged USER
true
)
24
Q_PROPERTY(QString currentPageLabel READ currentPageLabel NOTIFY currentPageLabelChanged)
25
public
:
26
QPdfPageSelector() : QPdfPageSelector(
nullptr
) {}
27
explicit
QPdfPageSelector(QWidget *parent);
28
~QPdfPageSelector() override;
29
30
void
setDocument(QPdfDocument *document);
31
QPdfDocument *document()
const
;
32
33
int
currentPage()
const
;
34
QString currentPageLabel()
const
;
35
36
public
Q_SLOTS:
37
void
setCurrentPage(
int
index);
38
39
Q_SIGNALS:
40
void
documentChanged(QPdfDocument *document);
41
void
currentPageChanged(
int
index);
42
void
currentPageLabelChanged(
const
QString &label);
43
44
private
:
45
Q_DECLARE_PRIVATE(QPdfPageSelector)
46
const
std::unique_ptr<QPdfPageSelectorPrivate> d_ptr;
47
};
48
49
QT_END_NAMESPACE
50
51
#
endif
// QPDFPAGESELECTOR_H
QPdfPageSelectorPrivate
Definition
qpdfpageselector_p.h:53
QPdfPageSelectorSpinBox
Definition
qpdfpageselector_p.h:27
QPdfPageSelectorSpinBox::validate
QValidator::State validate(QString &text, int &pos) const override
This virtual function is called by the QAbstractSpinBox to determine whether input is valid.
Definition
qpdfpageselector.cpp:162
QPdfPageSelectorSpinBox::~QPdfPageSelectorSpinBox
~QPdfPageSelectorSpinBox()
QPdfPageSelectorSpinBox::valueFromText
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...
Definition
qpdfpageselector.cpp:146
QPdfPageSelectorSpinBox::setDocument
void setDocument(QPdfDocument *document)
Definition
qpdfpageselector.cpp:118
QPdfPageSelectorSpinBox::textFromValue
QString textFromValue(int value) const override
This virtual function is used by the spin box whenever it needs to display the given value.
Definition
qpdfpageselector.cpp:154
QPdfPageSelector
\inmodule QtPdf
Definition
qpdfpageselector.h:19
qtwebengine
src
pdfwidgets
qpdfpageselector.h
Generated on
for Qt by
1.18.0