MagicSmoke  $VERSION$
MOdtSignalRenderer Class Reference

generic class that implements MOdtRenderer by calling signals; the signals must be connected using a direct or blocking connection; if any of them is not used it will behave as if the variable/loop did not exist More...

#include <odtrender.h>

Inheritance diagram for MOdtSignalRenderer:
MOdtRenderer

Signals

void getLoopIterations (QString loopname, int &iterations)
 connect this to return the amount of iterations for a defined loop; should return 0 if the loop does not exist More...
 
void getVariable (QString varname, QVariant &value)
 connect this to return the value of a variable during rendering; should return empty string if the variable does not exist More...
 
void setLoopIteration (QString loopname, int interation)
 

Public Member Functions

 MOdtSignalRenderer (MTemplate file)
 instantiates a renderer loaded from template file More...
 
 ~MOdtSignalRenderer ()
 deletes the renderer More...
 
- Public Member Functions inherited from MOdtRenderer
 MOdtRenderer (MTemplate file)
 instantiates a renderer loaded from template file More...
 
virtual ~MOdtRenderer ()
 deletes the renderer More...
 
FileFormat fileFormat () const
 returns the format of the file More...
 
virtual void renderToFile (QString file)
 starts the internal rendering routine and outputs to file More...
 
virtual void renderToFile (QFile &file, bool preventOpen=false)
 starts the internal rendering routine and outputs to file More...
 
virtual QString renderToPdf ()
 like renderToPrinter, but renders to PDF, returns the PDF file name More...
 
virtual void renderToPrinter ()
 starts the internal rendering routine and outputs to printer (calls OpenOffice to print) More...
 

Protected Member Functions

int getLoopIterations (QString loopname)
 implement this to return the amount of iterations for a defined loop; should return 0 if the loop does not exist More...
 
QVariant getVariable (QString varname)
 implement this to return the value of a variable during rendering; should return empty string if the variable does not exist More...
 
- Protected Member Functions inherited from MOdtRenderer
virtual void setLoopIteration (QString loopname, int interation)=0
 implement this to populate the variables used in a specific iteration of the loop More...
 

Additional Inherited Members

- Public Types inherited from MOdtRenderer
enum  FileFormat { FileFormat::None, FileFormat::Version2, FileFormat::ConvertedV1 }
 format of the file represented by this renderer More...
 
- Static Public Member Functions inherited from MOdtRenderer
static QByteArray convertV1toV2 (const QByteArray &)
 helper routine: converts a V1 template to V2 you have to make sure to not do a double conversion on an already converted document More...
 

Detailed Description

generic class that implements MOdtRenderer by calling signals; the signals must be connected using a direct or blocking connection; if any of them is not used it will behave as if the variable/loop did not exist

Constructor & Destructor Documentation

MOdtSignalRenderer::MOdtSignalRenderer ( MTemplate  file)

instantiates a renderer loaded from template file

MOdtSignalRenderer::~MOdtSignalRenderer ( )

deletes the renderer

Member Function Documentation

void MOdtSignalRenderer::getLoopIterations ( QString  loopname,
int &  iterations 
)
signal

connect this to return the amount of iterations for a defined loop; should return 0 if the loop does not exist

Referenced by getLoopIterations().

int MOdtSignalRenderer::getLoopIterations ( QString  loopname)
protectedvirtual

implement this to return the amount of iterations for a defined loop; should return 0 if the loop does not exist

Implements MOdtRenderer.

References getLoopIterations().

void MOdtSignalRenderer::getVariable ( QString  varname,
QVariant &  value 
)
signal

connect this to return the value of a variable during rendering; should return empty string if the variable does not exist

Referenced by getVariable().

QVariant MOdtSignalRenderer::getVariable ( QString  varname)
protectedvirtual

implement this to return the value of a variable during rendering; should return empty string if the variable does not exist

Implements MOdtRenderer.

References getVariable().

void MOdtSignalRenderer::setLoopIteration ( QString  loopname,
int  interation 
)
signal

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