QPdfLinkModel Class
QPdfLinkModel 클래스는 지정된 page 에 포함된 각 링크의 지오메트리와 대상을 보유합니다. 더 보기...
Header: | #include <QPdfLinkModel> |
Since: | Qt 6.6 |
Inherits: | QAbstractListModel |
공용 유형
enum class | Role { Link, Rectangle, Url, Page, Location, Zoom } |
속성
공용 함수
QPdfLinkModel(QObject *parent = nullptr) | |
virtual | ~QPdfLinkModel() override |
QPdfDocument * | document() const |
QPdfLink | linkAt(QPointF point) const |
int | page() const |
재구현된 공용 함수
virtual QVariant | data(const QModelIndex &index, int role) const override |
virtual int | rowCount(const QModelIndex &parent) const override |
공용 슬롯
void | setDocument(QPdfDocument *document) |
void | setPage(int page) |
신호
void | documentChanged() |
void | pageChanged(int page) |
멤버 유형 문서
enum class QPdfLinkModel::Role
상수 | 값 | 설명 |
---|---|---|
QPdfLinkModel::Role::Link | Qt::UserRole | QPdfLink 객체입니다. |
QPdfLinkModel::Role::Rectangle | 257 | 링크를 둘러싼 바운딩 사각형입니다. |
QPdfLinkModel::Role::Url | 258 | 링크가 웹 링크인 경우 해당 링크의 URL, 그렇지 않으면 빈 URL입니다. |
QPdfLinkModel::Role::Page | 259 | 링크가 내부 링크인 경우 링크가 이동해야 하는 페이지 번호, 그렇지 않으면 -1 입니다. |
QPdfLinkModel::Role::Location | 260 | 링크가 내부 링크인 경우 링크가 점프해야 하는 페이지의 위치입니다. |
QPdfLinkModel::Role::Zoom | 261 | 링크가 내부 링크인 경우 대상 페이지의 권장 확대/축소 수준입니다. |
속성 문서
document : QPdfDocument*
이 속성에는 링크를 로드할 문서가 저장됩니다.
액세스 함수:
QPdfDocument * | document() const |
void | setDocument(QPdfDocument *document) |
알림 신호:
void | documentChanged() |
page : int
이 속성에는 링크를 로드할 페이지가 저장됩니다.
액세스 함수:
int | page() const |
void | setPage(int page) |
알림 신호:
void | pageChanged(int page) |
멤버 함수 문서
[explicit]
QPdfLinkModel::QPdfLinkModel(QObject *parent = nullptr)
부모 객체가 있는 새 링크 모델을 구축합니다 parent.
[override virtual noexcept]
QPdfLinkModel::~QPdfLinkModel()
모델을 파괴합니다.
[override virtual]
QVariant QPdfLinkModel::data(const QModelIndex &index, int role) const
재구현합니다: QAbstractItemModel::data(const QModelIndex &index, int role) const.
QPdfLink QPdfLinkModel::linkAt(QPointF point) const
point (포인트 단위, 1/72인치) 아래에서 발견되면 valid 링크를 반환하고, 발견되지 않으면 유효하지 않은 링크를 반환합니다. 즉, 이 함수는 마우스 클릭이나 마우스오버를 처리하기 위한 선택에 유용합니다.
[override virtual]
int QPdfLinkModel::rowCount(const QModelIndex &parent) const
재구현합니다: QAbstractItemModel::rowCount(const QModelIndex &parent) const.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.