gui::QSPdfOperator Class Reference

QObject wrapper around PdfOperator. More...

#include <qspdfoperator.h>

Inheritance diagram for gui::QSPdfOperator:
gui::QSCObject

List of all members.

Public Slots

bool equals (QObject *otherObject)
QVariant getBBox ()
QSPdfOperatorgetLastOperator ()
bool isEmpty ()
bool containsNonStrokingOperator ()
bool containsStrokingOperator ()
QSPdfOperatorIteratoriterator ()
QSPdfOperatorIteratorgraphicalIterator (bool forwardDir=true)
QSPdfOperatorIteratorinlineImageIterator (bool forwardDir=true)
QSPdfOperatorIteratortextIterator (bool forwardDir=true)
QSPdfOperatorIteratorchangeableIterator (bool forwardDir=true)
QSPdfOperatorIteratorstrokingIterator (bool forwardDir=true)
QSPdfOperatorIteratornonStrokingIterator (bool forwardDir=true)
QSPdfOperatorIteratorfontIterator (bool forwardDir=true)
QSPdfOperatorStackchilds ()
int childCount ()
QString getText ()
QString getEncodedText ()
QString getName ()
QSIPropertyArrayparams ()
int paramCount ()
void pushBack (QSPdfOperator *op, QSPdfOperator *prev=NULL)
void pushBack (QObject *op, QObject *prev=NULL)
void remove ()
void setNext (QSPdfOperator *op)
void setNext (QObject *op)
void setPrev (QSPdfOperator *op)
void setPrev (QObject *op)
QSPdfOperatorclone ()
QSContentStreamstream ()

Public Member Functions

 QSPdfOperator (BaseCore *_base)
 QSPdfOperator (boost::shared_ptr< PdfOperator > op, BaseCore *_base)
 QSPdfOperator (boost::shared_ptr< PdfOperator > op, boost::shared_ptr< CContentStream > cs, BaseCore *_base)
virtual ~QSPdfOperator ()
boost::shared_ptr< PdfOperatorget ()

Private Member Functions

void csCheck ()

Private Attributes

boost::shared_ptr< PdfOperatorobj
boost::shared_ptr< CContentStreamcsRef

Detailed Description

QObject wrapper around PdfOperator.


Constructor & Destructor Documentation

gui::QSPdfOperator::QSPdfOperator ( BaseCore _base  ) 

Construct wrapper with empty PdfOperator (NULL)

Parameters:
_base scripting base

Referenced by clone(), and getLastOperator().

gui::QSPdfOperator::QSPdfOperator ( boost::shared_ptr< PdfOperator op,
BaseCore _base 
)

Construct wrapper with given PdfOperator

Parameters:
op PDF Operator
_base scripting base

References obj.

gui::QSPdfOperator::QSPdfOperator ( boost::shared_ptr< PdfOperator op,
boost::shared_ptr< CContentStream cs,
BaseCore _base 
)

Construct wrapper with given PdfOperator and reference to its content stream

Parameters:
op PDF Operator
cs CContentstream in which this PdfOperator is contained
_base scripting base

References csCheck(), csRef, and obj.

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

destructor


Member Function Documentation

QSPdfOperatorIterator * gui::QSPdfOperator::changeableIterator ( bool  forwardDir = true  )  [slot]

Create new changeable operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new changeable iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

int gui::QSPdfOperator::childCount (  )  [slot]

Return number of child operators under this operator

Returns:
number of child operators

References gui::QSCObject::nullPtr(), and obj.

QSPdfOperatorStack * gui::QSPdfOperator::childs (  )  [slot]

Return stack with all child operators

Returns:
Operator stack

References gui::QSPdfOperatorStack::append(), gui::QSCObject::base, gui::QSCObject::nullPtr(), and obj.

QSPdfOperator * gui::QSPdfOperator::clone (  )  [slot]

Clone this object.

Returns:
Clone of this object.

References gui::QSCObject::base, csCheck(), obj, and QSPdfOperator().

bool gui::QSPdfOperator::containsNonStrokingOperator (  )  [slot]

Call containsNonStrokingOperator() on this operator

Returns:
result

References gui::QSCObject::nullPtr(), and obj.

bool gui::QSPdfOperator::containsStrokingOperator (  )  [slot]

Call containsStrokingOperator() on this operator

Returns:
result

References gui::QSCObject::nullPtr(), and obj.

void gui::QSPdfOperator::csCheck (  )  [private]
bool gui::QSPdfOperator::equals ( QObject *  otherObject  )  [slot]

Return true, if this operator is equal to given object (i.e. if objects inside the wrapper are the same)

Parameters:
otherObject object to compare with this one
Returns:
True if the both objects hold the same item, false otherwise

References get(), and obj.

QSPdfOperatorIterator * gui::QSPdfOperator::fontIterator ( bool  forwardDir = true  )  [slot]

Create new font operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new font iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

boost::shared_ptr< PdfOperator > gui::QSPdfOperator::get (  ) 

Get Pdf Operator shared pointer held inside this class. Not exposed to scripting

Returns:
Pdf Operator shared pointer

References obj.

Referenced by gui::QSPdfOperatorStack::append(), equals(), gui::QSPdfOperatorStack::prepend(), pushBack(), setNext(), and setPrev().

QVariant gui::QSPdfOperator::getBBox (  )  [slot]

Return bounding box of this PDF operator

Returns:
bounding box

References obj.

QString gui::QSPdfOperator::getEncodedText (  )  [slot]
QSPdfOperator * gui::QSPdfOperator::getLastOperator (  )  [slot]
QString gui::QSPdfOperator::getName (  )  [slot]

Get operator name

See also:
PdfOperator::getOperatorName
Returns:
operator name

References util::convertToUnicode(), gui::QSCObject::nullPtr(), obj, and util::PDF.

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

Return text representation of pdf operator

See also:
PdfOperator::getStringRepresentation
Returns:
string representation

References util::convertToUnicode(), gui::QSCObject::nullPtr(), obj, and util::PDF.

QSPdfOperatorIterator * gui::QSPdfOperator::graphicalIterator ( bool  forwardDir = true  )  [slot]

Create new graphical operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new graphical iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

QSPdfOperatorIterator * gui::QSPdfOperator::inlineImageIterator ( bool  forwardDir = true  )  [slot]

Create new inline image operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new inline image iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

bool gui::QSPdfOperator::isEmpty (  )  [slot]

Return true, if operator inside this wrapper is empty (NULL) operator. In that case, most operations of this operator will fail, throwing an exception.

The only methods that are guaranteed to succeed in that case are isEmpty(), textIterator() and iterator() and also you can pass this empty operator as parameter to some functions.

Return true, if operator inside this wrapper is NULL

Returns:
Is operator empty?

References obj.

QSPdfOperatorIterator * gui::QSPdfOperator::iterator (  )  [slot]

Create new operator iterator from this PDF operator. The iterator will be initially positioned at this item

Returns:
new iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

QSPdfOperatorIterator * gui::QSPdfOperator::nonStrokingIterator ( bool  forwardDir = true  )  [slot]

Create new non stroking operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new non stroking iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

int gui::QSPdfOperator::paramCount (  )  [slot]

Return number of parameters for this operator

Returns:
number of parameters

References gui::QSCObject::nullPtr(), and obj.

QSIPropertyArray * gui::QSPdfOperator::params (  )  [slot]

Return all parameters of this operator

Returns:
Array with parameters

References gui::QSIPropertyArray::append(), gui::QSCObject::base, gui::QSCObject::nullPtr(), and obj.

void gui::QSPdfOperator::pushBack ( QObject *  op,
QObject *  prev = NULL 
) [slot]

QSA bug workaround version Add an operator to the end of composite.

See also:
PdfOperator::push_back
Parameters:
op Operator to be added.
prev Operator, after which we should place the added one

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

void gui::QSPdfOperator::pushBack ( QSPdfOperator op,
QSPdfOperator prev = NULL 
) [slot]

Add an operator to the end of composite.

See also:
PdfOperator::push_back
Parameters:
op Operator to be added.
prev Operator, after which we should place the added one

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

void gui::QSPdfOperator::remove (  )  [slot]

Remove itself from the stream. After this operation, the operator must not be used

  • any attempt to use it will probably end up with an exception

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

void gui::QSPdfOperator::setNext ( QObject *  op  )  [slot]

QSA bug workaround Set next operator

See also:
PdfOperator::setNext
Parameters:
op operator to set as next

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

void gui::QSPdfOperator::setNext ( QSPdfOperator op  )  [slot]

Set next operator

See also:
PdfOperator::setNext
Parameters:
op operator to set as next

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

void gui::QSPdfOperator::setPrev ( QObject *  op  )  [slot]

QSA bug workaround Set previous operator

See also:
PdfOperator::setPrev
Parameters:
op operator to set as previous

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

void gui::QSPdfOperator::setPrev ( QSPdfOperator op  )  [slot]

Set previous operator

See also:
PdfOperator::setPrev
Parameters:
op operator to set as previous

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

QSContentStream * gui::QSPdfOperator::stream (  )  [slot]

Return content stream in which this operator is contained. May return NULL (if operator is not contained in any content stream or if content stream is not known at time of creation)

Returns:
QObject wrapper around this operator's content stream

References gui::QSCObject::base, csCheck(), and csRef.

QSPdfOperatorIterator * gui::QSPdfOperator::strokingIterator ( bool  forwardDir = true  )  [slot]

Create new stroking operator iterator from this PDF operator. The iterator will be initialized from this item.

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new stroking iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.

QSPdfOperatorIterator * gui::QSPdfOperator::textIterator ( bool  forwardDir = true  )  [slot]

Create new text operator iterator from this PDF operator. The iterator will be initialized from this item

Parameters:
forwardDir Direction of traversing the operators for first valid item.
Returns:
new text iterator

References gui::QSCObject::base, csCheck(), csRef, and obj.


Member Data Documentation

boost::shared_ptr<CContentStream> gui::QSPdfOperator::csRef [private]

Reference to content stream that is holding this operator. It may be NULL (empty shared_ptr) if unknown

Referenced by changeableIterator(), csCheck(), fontIterator(), graphicalIterator(), inlineImageIterator(), iterator(), nonStrokingIterator(), QSPdfOperator(), stream(), strokingIterator(), and textIterator().

boost::shared_ptr<PdfOperator> gui::QSPdfOperator::obj [private]

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