gui::QSPage Class Reference

QObject wrapper around CPage. More...

#include <qspage.h>

Inheritance diagram for gui::QSPage:
gui::QSCObject

List of all members.

Public Slots

void moveAbove (QSContentStream *cs)
void moveAbove (QObject *cs)
void moveBelow (QSContentStream *cs)
void moveBelow (QObject *cs)
void moveAbove (int csi)
void moveBelow (int csi)
void addAnnotation (QSAnnotation *an)
void addAnnotation (QObject *an)
void setTransformMatrix (QVariant tMatrix)
void prependContentStream (QSPdfOperatorStack *opStack)
void prependContentStream (QObject *opStack)
void appendContentStream (QSPdfOperatorStack *opStack)
void appendContentStream (QObject *opStack)
QString getFontId (const QString &fontName)
QStringList getFontIdsAndNames (bool onlyNames=false)
void addSystemType1Font (const QString &fontName)
QSContentStream * getContentStream (int streamNumber)
void removeContentStream (int streamNumber)
int getContentStreamCount ()
QSContentStream * getChange (int changeNumber)
int getChangeCount ()
void loadContentStreams ()
QSDict * getDictionary ()
QString getText ()
QVariant mediabox ()
void setMediabox (double x1, double y1, double x2, double y2)
void setMediabox (QRect rc)

Public Member Functions

virtual ~QSPage ()
 QSPage (const QSPage &source)
 QSPage (boost::shared_ptr< CPage > _page, BaseCore *_base)
boost::shared_ptr< CPage > get () const

Private Attributes

boost::shared_ptr< CPage > obj
std::vector< boost::shared_ptr
< CContentStream > > 
streams
int numStreams

Detailed Description

QObject wrapper around CPage.


Constructor & Destructor Documentation

gui::QSPage::~QSPage (  )  [virtual]

destructor

gui::QSPage::QSPage ( const QSPage &  source  ) 

Copy constructor

Parameters:
source Source page to copy

References numStreams, and obj.

gui::QSPage::QSPage ( boost::shared_ptr< CPage >  _page,
BaseCore *  _base 
)

Construct wrapper with given CPage

Parameters:
_page CPage shared pointer
_base scripting base

References numStreams, and obj.


Member Function Documentation

void gui::QSPage::addAnnotation ( QObject *  an  )  [slot]

Add copy of given annotation to this page

Parameters:
an Annotation to add

References addAnnotation().

void gui::QSPage::addAnnotation ( QSAnnotation *  an  )  [slot]

Add copy of given annotation to this page

Parameters:
an Annotation to add

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSAnnotation::get(), and obj.

Referenced by addAnnotation().

void gui::QSPage::addSystemType1Font ( const QString &  fontName  )  [slot]

Add new Type 1 font to this page resource dictionary

See also:
CPage::addSystemType1Font
Parameters:
fontName name of font

References gui::QSCObject::base, util::convertFromUnicode(), gui::BaseCore::errorException(), obj, and util::PDF.

void gui::QSPage::appendContentStream ( QObject *  opStack  )  [slot]

Add content stream to page, created from new operator stack Content stream is prepended before other content streams

See also:
CPage::addContentStreamToFront
Parameters:
opStack PDF Operator stack

References prependContentStream().

void gui::QSPage::appendContentStream ( QSPdfOperatorStack *  opStack  )  [slot]

Add content stream to page, created from new operator stack Content stream in appended after other content streams

See also:
CPage::addContentStreamToBack
Parameters:
opStack PDF Operator stack

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSPdfOperatorStack::get(), and obj.

Referenced by prependContentStream().

boost::shared_ptr< CPage > gui::QSPage::get (  )  const
QSContentStream * gui::QSPage::getChange ( int  changeNumber  )  [slot]

Return change with given number as content stream

Parameters:
changeNumber number of change to get
Returns:
ContentStream with given change, or NULL if number is outside range

References gui::QSCObject::base, and obj.

int gui::QSPage::getChangeCount (  )  [slot]

Return number of changes

Returns:
number of changes in this Page

References obj.

QSContentStream * gui::QSPage::getContentStream ( int  streamNumber  )  [slot]

Return stream with given number from page. Get the streams from CPage and store for later use if necessary

Parameters:
streamNumber number of stream to get
Returns:
ContentStream with given number, or NULL if number is outside range

References gui::QSCObject::base, loadContentStreams(), numStreams, and streams.

int gui::QSPage::getContentStreamCount (  )  [slot]

Return number of content streams in page Get the streams from CPage and store for later use if necessary

Returns:
number of streams in this Page

References loadContentStreams(), and numStreams.

QSDict * gui::QSPage::getDictionary (  )  [slot]
QString gui::QSPage::getFontId ( const QString &  fontName  )  [slot]

For given font name (case sensitive) return it's ID if present on page. If the font is not present, returns NULL

Parameters:
fontName name of desired font
Returns:
ID of font with given name, or NULL if not found in the page

References util::convertFromUnicode(), util::convertToUnicode(), obj, and util::PDF.

QStringList gui::QSPage::getFontIdsAndNames ( bool  onlyNames = false  )  [slot]

Return list of font id's and names, for each font id and name return two elements in output array (id followed by name)

Parameters:
onlyNames if true, id's are ommited and only list of names is returned instead.
Returns:
list of font id's and names

References util::convertToUnicode(), obj, and util::PDF.

QString gui::QSPage::getText (  )  [slot]

Call CPage::getText(ret); return ret

References obj.

void gui::QSPage::loadContentStreams (  )  [slot]
QVariant gui::QSPage::mediabox (  )  [slot]

Return mediabox from Page

See also:
CPage::getMediabox

References obj.

void gui::QSPage::moveAbove ( int  csi  )  [slot]
See also:
CPage::moveAbove
Parameters:
csi Index of content stream to move one level up painting order

References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.

void gui::QSPage::moveAbove ( QObject *  cs  )  [slot]
See also:
CPage::moveAbove
Parameters:
cs Content stream to move one level up painting order

References moveAbove(), and gui::QSCObject::qobject_cast().

void gui::QSPage::moveAbove ( QSContentStream *  cs  )  [slot]
See also:
CPage::moveAbove
Parameters:
cs Content stream to move one level up painting order

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSContentStream::get(), and obj.

Referenced by moveAbove().

void gui::QSPage::moveBelow ( int  csi  )  [slot]
See also:
CPage::moveBelow
Parameters:
csi Index of content stream to move one level below in painting order

References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.

void gui::QSPage::moveBelow ( QObject *  cs  )  [slot]
See also:
CPage::moveBelow
Parameters:
cs Content stream to move one level up painting order

References moveBelow(), and gui::QSCObject::qobject_cast().

void gui::QSPage::moveBelow ( QSContentStream *  cs  )  [slot]
See also:
CPage::moveBelow
Parameters:
cs Content stream to move one level below in painting order

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSContentStream::get(), and obj.

Referenced by moveBelow().

void gui::QSPage::prependContentStream ( QObject *  opStack  )  [slot]

Add content stream to page, created from new operator stack Content stream in appended after other content streams

See also:
CPage::addContentStreamToBack
Parameters:
opStack PDF Operator stack

References appendContentStream().

void gui::QSPage::prependContentStream ( QSPdfOperatorStack *  opStack  )  [slot]

Add content stream to page, created from new operator stack Content stream is prepended before other content streams

See also:
CPage::addContentStreamToFront
Parameters:
opStack PDF Operator stack

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSPdfOperatorStack::get(), and obj.

Referenced by appendContentStream().

void gui::QSPage::removeContentStream ( int  streamNumber  )  [slot]

Remove stream with given number from page.

Parameters:
streamNumber number of stream to remove

References loadContentStreams(), numStreams, and obj.

void gui::QSPage::setMediabox ( QRect  rc  )  [slot]

Set mediabox for this page

See also:
CPage::getMediabox
Parameters:
rc rectangle specifying media box

References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.

void gui::QSPage::setMediabox ( double  x1,
double  y1,
double  x2,
double  y2 
) [slot]

Set mediabox for this page

See also:
CPage::getMediabox
Parameters:
x1 X coordinate of upper left media box corner
y1 Y coordinate of upper left media box corner
x2 X coordinate of lower right media box corner
y2 Y coordinate of lower right media box corner

References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.

void gui::QSPage::setTransformMatrix ( QVariant  tMatrix  )  [slot]

Set transform matrix of this page

See also:
CPage::setTransformMatrix
Parameters:
tMatrix Array with 6 integers

References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.


Member Data Documentation

int gui::QSPage::numStreams [private]

Number of content streams in vector. -1 mean no streams yet parsed

Referenced by getContentStream(), getContentStreamCount(), loadContentStreams(), QSPage(), and removeContentStream().

boost::shared_ptr<CPage> gui::QSPage::obj [private]
std::vector<boost::shared_ptr<CContentStream> > gui::QSPage::streams [private]

Vector with content streams

Referenced by getContentStream(), and loadContentStreams().


The documentation for this class was generated from the following files: