QObject wrapper around CPage. More...
#include <qspage.h>
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 |
QObject wrapper around CPage.
| gui::QSPage::~QSPage | ( | ) | [virtual] |
destructor
| gui::QSPage::QSPage | ( | const QSPage & | source | ) |
Construct wrapper with given CPage
| _page | CPage shared pointer | |
| _base | scripting base |
References numStreams, and obj.
| void gui::QSPage::addAnnotation | ( | QObject * | an | ) | [slot] |
Add copy of given annotation to this page
| an | Annotation to add |
References addAnnotation().
| void gui::QSPage::addAnnotation | ( | QSAnnotation * | an | ) | [slot] |
Add copy of given annotation to this page
| 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
| 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
| 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
| 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 |
get CPage held inside this class. Not exposed to scripting
References obj.
Referenced by gui::QSPdf::getNextPage(), gui::QSPdf::getPagePosition(), gui::QSPdf::getPrevPage(), gui::QSPdf::hasNextPage(), gui::QSPdf::hasPrevPage(), gui::QSPdf::insertPage(), gui::PdfEditWindow::pageNumber(), and gui::PageSpace::refresh().
| QSContentStream * gui::QSPage::getChange | ( | int | changeNumber | ) | [slot] |
Return change with given number as content stream
| changeNumber | number of change to get |
References gui::QSCObject::base, and obj.
| int gui::QSPage::getChangeCount | ( | ) | [slot] |
| 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
| streamNumber | number of stream to get |
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
References loadContentStreams(), and numStreams.
| QSDict * gui::QSPage::getDictionary | ( | ) | [slot] |
Call CPage::getDictionary
References gui::QSCObject::base, and obj.
| 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
| fontName | name of desired font |
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)
| onlyNames | if true, id's are ommited and only list of names is returned instead. |
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] |
Call CPage::getContentStreams(), store result
References numStreams, obj, and streams.
Referenced by getContentStream(), getContentStreamCount(), and removeContentStream().
| QVariant gui::QSPage::mediabox | ( | ) | [slot] |
| void gui::QSPage::moveAbove | ( | int | csi | ) | [slot] |
| 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] |
| cs | Content stream to move one level up painting order |
References moveAbove(), and gui::QSCObject::qobject_cast().
| void gui::QSPage::moveAbove | ( | QSContentStream * | cs | ) | [slot] |
| 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] |
| 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] |
| cs | Content stream to move one level up painting order |
References moveBelow(), and gui::QSCObject::qobject_cast().
| void gui::QSPage::moveBelow | ( | QSContentStream * | cs | ) | [slot] |
| 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
| 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
| 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.
| streamNumber | number of stream to remove |
References loadContentStreams(), numStreams, and obj.
| void gui::QSPage::setMediabox | ( | QRect | rc | ) | [slot] |
Set mediabox for this page
| 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
| 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
| tMatrix | Array with 6 integers |
References gui::QSCObject::base, gui::BaseCore::errorException(), and obj.
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] |
Object held in class
Referenced by addAnnotation(), addSystemType1Font(), appendContentStream(), get(), getChange(), getChangeCount(), getDictionary(), getFontId(), getFontIdsAndNames(), getText(), loadContentStreams(), mediabox(), moveAbove(), moveBelow(), prependContentStream(), QSPage(), removeContentStream(), setMediabox(), and setTransformMatrix().
std::vector<boost::shared_ptr<CContentStream> > gui::QSPage::streams [private] |
Vector with content streams
Referenced by getContentStream(), and loadContentStreams().