QPdfPageNavigation 类

QPdfPageNavigation 类处理 PDF 文档导航。 更多...

头: #include <QPdfPageNavigation>
Since: Qt 5.10
继承: QObject

该类在 Qt 5.10 引入。

特性

公共函数

QPdfPageNavigation (QObject * parent = nullptr)
virtual ~QPdfPageNavigation ()
bool canGoToNextPage () const
bool canGoToPreviousPage () const
int currentPage () const
QPdfDocument * document () const
int pageCount () const
void setCurrentPage (int page )
void setDocument (QPdfDocument * document )

公共槽

void goToNextPage ()
void goToPreviousPage ()

信号

void canGoToNextPageChanged (bool canGo )
void canGoToPreviousPageChanged (bool canGo )
void currentPageChanged (int currentPage )
void documentChanged (QPdfDocument * document )
void pageCountChanged (int pageCount )

详细描述

另请参阅 QPdfDocument .

特性文档编制

canGoToNextPage : const bool

Indicates whether there is a page after the current page.

访问函数:

bool canGoToNextPage () const

通知程序信号:

void canGoToNextPageChanged (bool canGo )

另请参阅 canGoToNextPage () 和 goToNextPage ().

canGoToPreviousPage : const bool

Indicates whether there is a page before the current page.

访问函数:

bool canGoToPreviousPage () const

通知程序信号:

void canGoToPreviousPageChanged (bool canGo )

另请参阅 canGoToPreviousPage () 和 goToPreviousPage ().

currentPage : int

This property holds the current page number in the document.

访问函数:

int currentPage () const
void setCurrentPage (int page )

通知程序信号:

void currentPageChanged (int currentPage )

另请参阅 currentPage () 和 setCurrentPage ().

document : QPdfDocument *

This property holds the document instance on which this object navigates.

默认情况下,此特性为 nullptr .

访问函数:

QPdfDocument * document () const
void setDocument (QPdfDocument * document )

通知程序信号:

void documentChanged (QPdfDocument * document )

另请参阅 document (), setDocument (),和 QPdfDocument .

pageCount : const int

This property holds the number of pages in the document.

访问函数:

int pageCount () const

通知程序信号:

void pageCountChanged (int pageCount )

另请参阅 pageCount ().

成员函数文档编制

QPdfPageNavigation:: QPdfPageNavigation ( QObject * parent = nullptr)

Constructs a page navigation object with parent object parent .

[slot] void QPdfPageNavigation:: goToNextPage ()

Changes the current page to the next page.

If there is no next page in the document, nothing happens.

另请参阅 canGoToNextPage .

[slot] void QPdfPageNavigation:: goToPreviousPage ()

Changes the current page to the previous page.

If there is no previous page in the document, nothing happens.

另请参阅 canGoToPreviousPage .

[虚拟] QPdfPageNavigation:: ~QPdfPageNavigation ()

Destroys the page navigation object.

bool QPdfPageNavigation:: canGoToNextPage () const

Returns whether there is a page after the current one.

注意: Getter function for property canGoToNextPage.

bool QPdfPageNavigation:: canGoToPreviousPage () const

Returns whether there is a page before the current one.

注意: Getter function for property canGoToPreviousPage.

int QPdfPageNavigation:: currentPage () const

Returns the current page number or 0 if there is no document set.

After a document has been loaded, the currentPage will always be 0 .

注意: Getter function for property currentPage.

另请参阅 setCurrentPage ().

QPdfDocument *QPdfPageNavigation:: document () const

Returns the document on which this object navigates, or a nullptr if none has set before.

注意: Getter function for property document.

另请参阅 setDocument () 和 QPdfDocument .

int QPdfPageNavigation:: pageCount () const

Returns the number of pages in the document or 0 if there is no document set.

注意: getter 函数对于特性 pageCount。

void QPdfPageNavigation:: setCurrentPage ( int page )

设置当前 page 编号。

注意: setter 函数对于特性 currentPage .

另请参阅 currentPage ().

void QPdfPageNavigation:: setDocument ( QPdfDocument * document )

设置 document this object navigates on.

After a new document has been set, the currentPage 将是 0 .

注意: setter 函数对于特性 document .

另请参阅 document () 和 QPdfDocument .