KABPrinting::PrintStyle Class Reference
The class PrintStyle implements the abstract interface to the PrintingWizards style objects. More...
#include <printstyle.h>
Inherits QObject.
Inherited by KABPrinting::DetailledPrintStyle, KABPrinting::MikesStyle, and KABPrinting::RingBinderPrintStyle.
Public Member Functions
- PrintStyle (PrintingWizard *parent, const char *name=0)
- virtual void print (const KABC::Addressee::List &contacts, PrintProgress *)=0
- const QPixmap & preview ()
- void hidePages ()
- void showPages ()
- KABC::Field * preferredSortField ()
- bool preferredSortType ()
Protected Member Functions
- bool setPreview (const QString &fileName)
- void setPreview (const QPixmap &image)
- void setPreferredSortOptions (KABC::Field *field, bool ascending=true)
- PrintingWizard * wizard ()
- void addPage (QWidget *page, const QString &title)
Detailed Description
The class PrintStyle implements the abstract interface to the PrintingWizards style objects.To implement a print style, derive from this class and read the information in printingwizard.h to see how this two pieces work together. Basically, the print style gets the contacts it is supposed to print from the PrintingWizard is will not change this set - neither its content nor its order. To register your new style in the printing wizard, you need to define a PrintStyleFactory that handles how your objects are created and deleted. See the existing print styles for examples. A print style should have a preview image that gives the user a basic impression on how it will look. Add this image to the printing folder (right here :-), and edit Makefile.am to have it installed along with kaddressbook. Load it using setPreview(QString). Your print style is supposed to add its options as pages to the printing wizard. The method wizard() gives you a pointer to the wizard object.
Member Function Documentation
|
Reimplement this method to actually print.
|
|
Reimplement this method to provide a preview of what will be printed. It returns an invalid QPixmap by default, resulting in a message that no preview is available. |
|
Hide all style specific pages in the wizard.
|
|
Show all style specific pages in the wizard.
|
|
Returns the preferred sort criterion field.
|
|
Returns the preferred sort type. true = ascending false = descending |
|
Load the preview image from the kaddressbook data directory. The image should be located in the subdirectory "printing". Give only the file name without any prefix as the parameter. |
|
Set the preview image.
|
|
Set preferred sort options for this printing style.
|
|
Return the wizard object.
|
|
Add additional page to the wizard e.g. a configuration page for the style. |
The documentation for this class was generated from the following files:
- printstyle.h
- printstyle.cpp