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 .