kword

KWPage Class Reference

#include <KWPage.h>

List of all members.


Detailed Description

This class represents a printed page of the document.

Definition at line 30 of file KWPage.h.


Public Types

enum  PageSideEnum { Left, Right }

Public Member Functions

void setWidth (const double &x)
void setHeight (const double &y)
void setTopMargin (const double &x)
void setBottomMargin (const double &y)
void setPageEdgeMargin (const double &x)
void setMarginClosestBinding (const double &y)
void setLeftMargin (const double &l)
void setRightMargin (const double &r)
double width () const
double height () const
double topMargin () const
double bottomMargin () const
double leftMargin () const
double rightMargin () const
double pageEdgeMargin () const
double marginClosestBinding () const
double offsetInDocument () const
PageSideEnum pageSide () const
void setPageSide (PageSideEnum ps)
int pageNumber () const
QRect zoomedRect (KoZoomHandler *zoomHandler)
const KoRect rect () const

Friends

class KWPageManager

Member Enumeration Documentation

enum KWPage::PageSideEnum
 

An enum to define if this is a page that is printed to be a left or a right page.

Definition at line 33 of file KWPage.h.


Member Function Documentation

double KWPage::bottomMargin  )  const
 

return the height of the margin at bottom (in pt);

Definition at line 92 of file KWPage.cpp.

double KWPage::height  )  const
 

return the height of this page (in pt)

Definition at line 44 of file KWPage.cpp.

double KWPage::leftMargin  )  const
 

return the width of the margin at left (in pt);

Definition at line 97 of file KWPage.cpp.

double KWPage::marginClosestBinding  )  const
 

return width of the margin that is the closest to the binding, i.e. right for even pages

Definition at line 122 of file KWPage.cpp.

double KWPage::offsetInDocument  )  const
 

All Pages are in a document-wide coordinate system that simply puts every page under the next page and keeps the Y coordinate counting throughout the doc.

The X coordinate off each page in the document is zero, i.e. aligned to the left. This method returns the offset of this page in the whole document which means it will add the height of all the pages that come before this one.

Definition at line 128 of file KWPage.cpp.

double KWPage::pageEdgeMargin  )  const
 

return width of the margin that is the closest to the page edge, i.e. left for even pages

Definition at line 117 of file KWPage.cpp.

int KWPage::pageNumber  )  const [inline]
 

returns the number of this page as it will be shown to the user.

Definition at line 102 of file KWPage.h.

PageSideEnum KWPage::pageSide  )  const [inline]
 

Return the pageSide of this page, see the PageSideEnum.

Definition at line 97 of file KWPage.h.

const KoRect KWPage::rect  )  const
 

return a KoRect with the (pt) sizes of this page. Margins are ignored for this function.

Definition at line 137 of file KWPage.cpp.

double KWPage::rightMargin  )  const
 

return the width of the margin at left (in pt);

Definition at line 108 of file KWPage.cpp.

void KWPage::setBottomMargin const double &  y  ) 
 

set height of the bottom margin in pt

Definition at line 59 of file KWPage.cpp.

void KWPage::setHeight const double &  y  ) 
 

set the height of the page in pt

Definition at line 53 of file KWPage.cpp.

void KWPage::setLeftMargin const double &  l  ) 
 

set width of the left margin.

Any page should either use valid left and right margins, or valid pageedge/binding ones, setting this one will remove the pageedge/closest-binding ones.

Definition at line 72 of file KWPage.cpp.

void KWPage::setMarginClosestBinding const double &  y  ) 
 

set width of the margin that is the closest to the binding, i.e.

right for even pages. Any page should either use valid left and right margins, or valid pageedge/binding ones, setting this one will remove the left/right ones.

Definition at line 67 of file KWPage.cpp.

void KWPage::setPageEdgeMargin const double &  x  ) 
 

set width of the margin that is the closest to the page edge, i.e.

left for even pages. Any page should either use valid left and right margins, or valid pageedge/binding ones, setting this one will remove the left/right ones.

Definition at line 62 of file KWPage.cpp.

void KWPage::setPageSide PageSideEnum  ps  )  [inline]
 

set the pageSide of this page, see the PageSideEnum

Definition at line 99 of file KWPage.h.

void KWPage::setRightMargin const double &  r  ) 
 

set width of the right margin.

Any page should either use valid left and right margins, or valid pageedge/binding ones, setting this one will remove the pageedge/closest-binding ones.

Definition at line 79 of file KWPage.cpp.

void KWPage::setTopMargin const double &  x  ) 
 

set height of the top margin in pt

Definition at line 56 of file KWPage.cpp.

void KWPage::setWidth const double &  x  ) 
 

set the width of the page in pt

Definition at line 50 of file KWPage.cpp.

double KWPage::topMargin  )  const
 

return the height of the margin at top (in pt);

Definition at line 87 of file KWPage.cpp.

double KWPage::width  )  const
 

return the width of this page (in pt)

Definition at line 38 of file KWPage.cpp.

QRect KWPage::zoomedRect KoZoomHandler *  zoomHandler  ) 
 

return a QRect with the size of this page in pixels.

Parameters:
zoomHandler the zoomhandler knows the current zoom levels. The KWDocument currently implements that interface.

Definition at line 132 of file KWPage.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys