KoPrintJob Class Reference

A print job is an interface that the KoView uses to create an application-specific class that can take care of printing. More...

#include <KoPrintJob.h>

Inheritance diagram for KoPrintJob:

KoPrintingDialog List of all members.

Public Types

 DeleteWhenDone
 Delete the job when its done with printing.
 DoNotDelete
 Keep the job around so it can be started again.
enum  RemovePolicy { DeleteWhenDone, DoNotDelete }
 A policy to allow the printjob to delete itself after its done printing. More...

Public Slots

virtual void startPrinting (RemovePolicy removePolicy=DoNotDelete)
 This is called every time the job should be executed.

Public Member Functions

 KoPrintJob (QObject *parent=0)
 Constructor.
virtual QPrinter & printer ()=0
 Returns the printer that is used for this print job so others can alter the details of the print-job.
virtual QList< QWidget * > createOptionWidgets () const =0
 If this print job is used in combination with a printdialog the option widgets this method retuns will be shown in the print dialog.
virtual int documentFirstPage () const
virtual int documentLastPage () const
virtual QAbstractPrintDialog::PrintDialogOptions printDialogOptions () const

Detailed Description

A print job is an interface that the KoView uses to create an application-specific class that can take care of printing.

The printjob should be able to print again after a print job has been completed, using the same QPrinter to allow the user to alter settings on the QPrinter and call print again. The printjob can thus see startPrinting() called more then once, and the implementation of that signal should honor the removePolicy passed to it.


Member Enumeration Documentation

enum KoPrintJob::RemovePolicy

A policy to allow the printjob to delete itself after its done printing.

Enumerator:
DeleteWhenDone  Delete the job when its done with printing.
DoNotDelete  Keep the job around so it can be started again.


Constructor & Destructor Documentation

KoPrintJob::KoPrintJob ( QObject *  parent = 0  ) 

Constructor.

Parameters:
parent the parent qobject that is passed for memory management purposes.


Member Function Documentation

void KoPrintJob::startPrinting ( RemovePolicy  removePolicy = DoNotDelete  )  [virtual, slot]

This is called every time the job should be executed.

When called the document should be printed a new painter using the printer of this printJob in order to honor the settings the user made on the printer.

Parameters:
removePolicy a policy that should be honored so the caller can make sure this job doesn't leak memory after being used.


The documentation for this class was generated from the following files:
Generated on Sun Jul 20 22:37:42 2008 for libs by  doxygen 1.4.7