kaddressbook Library API Documentation

mikesstyle.h

00001 /* -*- C++ -*-
00002    This file declares Mike Pilone's printing style.
00003 
00004    the KDE addressbook
00005 
00006    $ Author: Mirko Boehm $
00007    (C) 2002, Mike Pilone
00008    $ Copyright: (C) 1996-2002, Mirko Boehm $
00009    $ Contact: mirko@kde.org
00010          http://www.kde.org $
00011    $ License: LGPL with the following explicit clarification:
00012          This code may be linked against any version of the Qt toolkit
00013          from Troll Tech, Norway. $
00014 
00015    $Revision: 1.3 $
00016 */
00017 
00018 #ifndef MIKESSTYLE_H
00019 #define MIKESSTYLE_H
00020 
00021 #include <qfont.h>
00022 
00023 #include "printstyle.h"
00024 
00025 namespace KABPrinting {
00026 
00027     class PrintProgress;
00028 
00029     class MikesStyle : public PrintStyle
00030     {
00031         Q_OBJECT
00032     public:
00033         MikesStyle(PrintingWizard* parent, const char* name);
00034         ~MikesStyle();
00035         void print(QStringList, PrintProgress*);
00036     protected:
00037         void doPaint(QPainter &painter, const KABC::Addressee &a,
00038                      int maxHeight,
00039                      const QFont& font, const QFont& bFont);
00040         int calcHeight(const KABC::Addressee &a,
00041                        const QFont& font, const QFont& bFont);
00042         void paintTagLine(QPainter &p, const QFont& font);
00043         QString trimString(const QString &text, int width,
00044                            QFontMetrics &fm);
00045     };
00046 
00047     class MikesStyleFactory : public PrintStyleFactory
00048     {
00049     public:
00050         MikesStyleFactory(PrintingWizard* parent_,
00051                                    const char* name_=0);
00052         PrintStyle *create();
00053         QString description();
00054     };
00055 
00056 }
00057 
00058 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:10 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001