kaddressbook Library API Documentation

ringbinderstyle.h

00001 /* 00002 This file is part of KAddressBook. 00003 Copyright (c) 2002 Jost Schenck <jost@schenck.de> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 00019 As a special exception, permission is given to link this program 00020 with any edition of Qt, and distribute the resulting executable, 00021 without including the source code for Qt in the source distribution. 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 // vim:tw=78 cin et sw=2 comments=sr\:/*,mb\:\ ,ex\:*/,\://
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:51:16 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003