Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ImageComposer_Operator Class Referenceabstract

Implementation of the base abstract operation for image composing.

#include <ImageComposer_Operator.h>

Inheritance diagram for ImageComposer_Operator:
Inheritance graph

Public Member Functions

 ImageComposer_Operator ()
 Constructor. More...
 
virtual ~ImageComposer_Operator ()
 Destructor. More...
 
void getArgs (QColor &theBackground) const
 Get operator arguments. More...
 
void setArgs (const QColor &theBackground)
 Set operator arguments. More...
 
QByteArray getBinArgs () const
 Get the operator's arguments in the form of a binary array. More...
 
void setBinArgs (const QByteArray &)
 Set the operator's arguments in the form of a binary array. More...
 
QStringList dumpArgsToPython (QString &theArrayName) const
 Dumps arguments of operator to python script representation. More...
 
virtual QString name () const =0
 Return name of the operator. More...
 
virtual ImageComposer_Image process (const QVariant &theObj1, const QVariant &theObj2) const
 Perform the composing of images. More...
 

Protected Member Functions

virtual QRectF calcResultBoundingRect (const QVariant &theObj1, const QVariant &theObj2) const =0
 Calculate bounding rectangle for the result image. More...
 
virtual void drawResult (QPainter &thePainter, const QVariant &theObj1, const QVariant &theObj2) const =0
 Draw result image using the given painter. More...
 
virtual void storeArgs (QDataStream &theStream) const
 Store the operator's arguments to the stream. More...
 
virtual void restoreArgs (QDataStream &theStream)
 Restore the operator's arguments from the stream. More...
 

Private Attributes

QColor myBackground
 the background color for result image More...
 

Friends

class ImageComposerTests_TestOperators
 

Constructor & Destructor Documentation

ImageComposer_Operator::ImageComposer_Operator ( )
ImageComposer_Operator::~ImageComposer_Operator ( )
virtual

Member Function Documentation

virtual QRectF ImageComposer_Operator::calcResultBoundingRect ( const QVariant &  theObj1,
const QVariant &  theObj2 
) const
protectedpure virtual
Parameters
theObj1first object to calculate
theObj2second object to calculate
Returns
calculated bounding rectangle

Implemented in ImageComposer_ColorMaskOperator, ImageComposer_CropOperator, ImageComposer_CutOperator, and ImageComposer_FuseOperator.

virtual void ImageComposer_Operator::drawResult ( QPainter &  thePainter,
const QVariant &  theObj1,
const QVariant &  theObj2 
) const
protectedpure virtual
Parameters
thePainterthe painter on the result image
theObj1the first object to compose
theObj2the second object to compose

Implemented in ImageComposer_ColorMaskOperator, ImageComposer_CropOperator, ImageComposer_CutOperator, and ImageComposer_FuseOperator.

QStringList ImageComposer_Operator::dumpArgsToPython ( QString &  theArrayName) const
Parameters
theArrayNamename of result QByteArray array variable
Returns
list of strings with python representation

References myBackground.

void ImageComposer_Operator::getArgs ( QColor &  theBackground) const
Parameters
theBackgroundthe background color for result image

References myBackground.

QByteArray ImageComposer_Operator::getBinArgs ( ) const
Returns
the binary array with arguments

References storeArgs().

virtual QString ImageComposer_Operator::name ( ) const
pure virtual
ImageComposer_Image ImageComposer_Operator::process ( const QVariant &  theObj1,
const QVariant &  theObj2 
) const
virtual
Parameters
theObj1the first object to compose
theObj2the second object to compose
Returns
the result image

Reimplemented in ImageComposer_CropOperator.

References calcResultBoundingRect(), drawResult(), myBackground, ImageComposer_Image::setTransform(), and ImageComposer_Image::transform().

void ImageComposer_Operator::restoreArgs ( QDataStream &  theStream)
protectedvirtual
Parameters
theStreamthe stream for restoring

Reimplemented in ImageComposer_ColorMaskOperator.

References myBackground.

void ImageComposer_Operator::setArgs ( const QColor &  theBackground)
Parameters
theBackgroundthe background color for result image

References myBackground.

void ImageComposer_Operator::setBinArgs ( const QByteArray &  theData)
Parameters
theDatathe binary array with arguments

References restoreArgs().

void ImageComposer_Operator::storeArgs ( QDataStream &  theStream) const
protectedvirtual
Parameters
theStreamthe stream for storing

Reimplemented in ImageComposer_ColorMaskOperator.

References myBackground.

Friends And Related Function Documentation

friend class ImageComposerTests_TestOperators
friend

Member Data Documentation

QColor ImageComposer_Operator::myBackground
private

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