kword
KWPageManager Class Reference
#include <KWPageManager.h>
Detailed Description
The Page Manager manages all the pages a document contains and separates all the frames the document contains into actual printed pages.
Definition at line 33 of file KWPageManager.h.
Public Member Functions | |
KWPageManager () | |
int | pageNumber (const KoRect *rect) const |
int | pageNumber (const KoRect &rect) const |
int | pageNumber (const KoPoint &point) const |
int | pageNumber (double ptY) const |
int | pageCount () const |
int | lastPageNumber () const |
KWPage * | page (int pageNumber) const |
KWPage * | page (const KoRect &rect) const |
KWPage * | page (const KoRect *frame) const |
KWPage * | page (const KoPoint &point) const |
KWPage * | page (double ptY) const |
double | topOfPage (int pageNumber) const |
double | bottomOfPage (int pageNumber) const |
void | setStartPage (int startPage) |
int | startPage () const |
void | setOnlyAllowAppend (bool appendOnly) |
bool | onlyAllowAppend () |
KWPage * | insertPage (int pageNumber) |
KWPage * | appendPage () |
void | removePage (int pageNumber) |
void | removePage (KWPage *page) |
const KoPageLayout | pageLayout (int pageNumber) const |
void | setDefaultPage (const KoPageLayout &layout) |
KoPoint | clipToDocument (const KoPoint &point) |
Friends | |
class | KWPage |
Member Function Documentation
int KWPageManager::pageNumber | ( | const KoRect * | rect | ) | const |
return pageNumber of frame
, pagenumbers for a normal document start at 1.
Definition at line 71 of file KWPageManager.cpp.
int KWPageManager::pageNumber | ( | const KoRect & | rect | ) | const |
return pageNumber of rect
, pagenumbers for a normal document start at 1.
Definition at line 31 of file KWPageManager.cpp.
int KWPageManager::pageNumber | ( | const KoPoint & | point | ) | const |
return pageNumber of point
, pagenumbers for a normal document start at 1.
Definition at line 65 of file KWPageManager.cpp.
int KWPageManager::pageNumber | ( | double | ptY | ) | const |
return pageNumber of page with document-offset (in the Y direction) of ptY
, pagenumbers for a normal document start at 1.
Definition at line 68 of file KWPageManager.cpp.
int KWPageManager::pageCount | ( | ) | const |
int KWPageManager::lastPageNumber | ( | ) | const |
return the highest page number we have in this document.
Definition at line 119 of file KWPageManager.cpp.
KWPage * KWPageManager::page | ( | int | pageNumber | ) | const |
return the KWPage of a specific page number. Returns 0 if page does not exist.
Definition at line 80 of file KWPageManager.cpp.
KWPage * KWPageManager::page | ( | const KoRect & | rect | ) | const |
return the KWPage instance where the rect is on. Returns 0 if page does not exist.
Definition at line 93 of file KWPageManager.cpp.
KWPage * KWPageManager::page | ( | const KoRect * | frame | ) | const |
return the KWPage instance where the rect or frame is on. Returns 0 if page does not exist.
Definition at line 102 of file KWPageManager.cpp.
KWPage * KWPageManager::page | ( | const KoPoint & | point | ) | const |
return the KWPage instance where the point is on. Returns 0 if page does not exist.
Definition at line 96 of file KWPageManager.cpp.
KWPage * KWPageManager::page | ( | double | ptY | ) | const |
return the KWPage instance of the y-coordinate in the document. Returns 0 if page does not exist.
Definition at line 99 of file KWPageManager.cpp.
double KWPageManager::topOfPage | ( | int | pageNumber | ) | const |
Return the y-offset in this document of the top of page with pageNumber
Note that pageNumber is NOT an offset in the document, but the real number of the page.
- See also:
- setStartPage(int)
Definition at line 158 of file KWPageManager.cpp.
double KWPageManager::bottomOfPage | ( | int | pageNumber | ) | const |
Return the y-offset in this document of the bottom of page with pageNumber
Note that pageNumber is NOT an offset in the document, but the real number of the page.
- See also:
- setStartPage(int)
Definition at line 161 of file KWPageManager.cpp.
void KWPageManager::setStartPage | ( | int | startPage | ) |
Set a new startpage for this document, renumbering all pages already added.
Definition at line 107 of file KWPageManager.cpp.
int KWPageManager::startPage | ( | ) | const [inline] |
void KWPageManager::setOnlyAllowAppend | ( | bool | appendOnly | ) | [inline] |
Register if new pages can only be appended after the last one and not somewhere in between.
- Parameters:
-
appendOnly the new value
Definition at line 88 of file KWPageManager.h.
bool KWPageManager::onlyAllowAppend | ( | ) | [inline] |
return if new pages can only be appended after the last one and not somewhere in between.
Definition at line 93 of file KWPageManager.h.
KWPage * KWPageManager::insertPage | ( | int | pageNumber | ) |
Inserts a new page at the specified position in the document.
Shifts the page currently at that position (if any) and any subsequent pages after. if onlyAllowAppend is set to true the pagenumber will be ignored and the new page will always be appended.
- Parameters:
-
pageNumber page number of the new page
Definition at line 123 of file KWPageManager.cpp.
KWPage * KWPageManager::appendPage | ( | ) |
void KWPageManager::removePage | ( | int | pageNumber | ) |
Remove the page with pageNumber
renumbering all pages after pages already added.
Definition at line 182 of file KWPageManager.cpp.
void KWPageManager::removePage | ( | KWPage * | page | ) |
Remove page
renumbering all pages after pages already added.
Definition at line 185 of file KWPageManager.cpp.
const KoPageLayout KWPageManager::pageLayout | ( | int | pageNumber | ) | const |
return the effective pageLayout of pageNumber
combining the default and the page specific ones
Definition at line 144 of file KWPageManager.cpp.
KoPoint KWPageManager::clipToDocument | ( | const KoPoint & | point | ) |
Returns the argument point, with altered coordinats if the point happens to be outside all pages.
The resulting point is the shortest distance from the argument inside the document.
- Parameters:
-
point the point to test
Definition at line 214 of file KWPageManager.cpp.
The documentation for this class was generated from the following files: