FaxRenderer Class Reference
#include <faxrenderer.h>
Detailed Description
Well-documented minimal implementation of a documentRenderer for reading FAX files.This class provides a well-documented reference implementation of a documentRenderer, suitable as a starting point for a real-world implementation. This class is responsible for document loading and rendering. Apart from the constructor and the descructor, it implements only the necessary methods setFile() and drawPage().
Definition at line 39 of file faxrenderer.h.
Public Member Functions | |
| FaxRenderer (QWidget *parent) | |
| ~FaxRenderer () | |
| virtual bool | setFile (const QString &fname, const KURL &) |
| void | drawPage (double res, RenderedDocumentPage *page) |
Constructor & Destructor Documentation
| FaxRenderer::FaxRenderer | ( | QWidget * | parent | ) |
Default constructor.
This constructor simply prints a message (if debugging is enabled) and calls the default constructor.
Definition at line 35 of file faxrenderer.cpp.
| FaxRenderer::~FaxRenderer | ( | ) |
Destructor.
The destructor simpley prints a message if debugging is enabled. It uses the mutex to ensure that this class is not destructed while another thread is currently using it.
Definition at line 45 of file faxrenderer.cpp.
Member Function Documentation
| void FaxRenderer::drawPage | ( | double | res, | |
| RenderedDocumentPage * | page | |||
| ) |
Rendering a page.
This implementation first checks if the arguments are in a reasonable range, and error messages are printed if this is not so. Secondly, the page is rendered by the KFaxImage class and the drawn.
- Parameters:
-
res resolution at which drawing should take place page pointer to a page structur on which we should draw
Definition at line 57 of file faxrenderer.cpp.
| bool FaxRenderer::setFile | ( | const QString & | fname, | |
| const KURL & | ||||
| ) | [virtual] |
Opening a file.
This implementation does the necessary consistency checks and complains, e.g. if the file does not exist. It then uses the member 'fax' to load the fax file and initializes the appropriate data structures. The code for loading and rendering is contained in the class "KFaxImage", to keep this reference implementation short.
- Parameters:
-
fname the name of the file that should be opened.
Definition at line 116 of file faxrenderer.cpp.
The documentation for this class was generated from the following files:

