00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef RINGBINDERSTYLE_H
00025
#define RINGBINDERSTYLE_H
00026
00027
#include <kabc/addressee.h>
00028
#include "printstyle.h"
00029
00030
class KPrinter;
00031
class RingBinderStyleAppearanceForm;
00032
00033
namespace KABPrinting
00034 {
00035
00036
class RingBinderPrintStyle :
public PrintStyle
00037 {
00038 Q_OBJECT
00039
00040
public:
00041 RingBinderPrintStyle(
PrintingWizard* parent,
const char* name = 0 );
00042 ~RingBinderPrintStyle();
00043
void print( KABC::Addressee::List &contacts,
PrintProgress* );
00044
00045
protected:
00046
bool printEntries( KABC::Addressee::List &contacts, KPrinter *printer,
00047 QPainter *painter,
const QRect& window );
00048
void fillEmpty(
const QRect& window, KPrinter *printer, QPainter* painter,
00049
int top,
int grpnum );
00050
bool printEntry(
const KABC::Addressee& contact,
const QRect& window,
00051 QPainter *painter,
int top,
bool fake =
false,
00052 QRect* brect = 0 );
00053 QRect entryMetrics(
const KABC::Addressee& contact,
const QRect& window,
00054 QPainter* painter,
int top );
00055
bool printEmptyEntry(
const QRect& window, QPainter* painter,
int top );
00056 QRect emptyEntryMetrics(
const QRect& window, QPainter* painter,
int top );
00057
bool printPageHeader(
const QString section,
const QRect& window,
00058 QPainter* painter );
00059 QRect pageHeaderMetrics(
const QRect& window, QPainter* painter );
00060
00061
private:
00062 RingBinderStyleAppearanceForm *mPageAppearance;
00063
PrintProgress *mPrintProgress;
00064 };
00065
00066
class RingBinderPrintStyleFactory :
public PrintStyleFactory
00067 {
00068
public:
00069 RingBinderPrintStyleFactory(
PrintingWizard* parent_,
00070
const char* name_ = 0 );
00071
PrintStyle *create();
00072 QString description();
00073 };
00074
00075 }
00076
00077
#endif
00078