kaddressbook
printingwizard.h
00001 /* 00002 This file is part of KAddressBook. 00003 Copyright (c) 1996-2002 Mirko Boehm <mirko@kde.org> 00004 Tobias Koenig <tokoe@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 00025 #ifndef PRINTINGWIZARD_H 00026 #define PRINTINGWIZARD_H 00027 00028 #include <qptrlist.h> 00029 #include <qstringlist.h> 00030 00031 #include <kwizard.h> 00032 00033 #include "common/filter.h" 00034 #include "kabc/addressbook.h" 00035 #include "printstyle.h" 00036 00037 #include "selectionpage.h" 00038 #include "stylepage.h" 00039 00040 00041 class KPrinter; 00042 class QVBoxLayout; 00043 00044 namespace KABPrinting { 00045 00050 class PrintingWizard : public KWizard 00051 { 00052 Q_OBJECT 00053 00054 public: 00058 PrintingWizard( KPrinter *printer, 00059 KABC::AddressBook* ab, 00060 const QStringList& selection, 00061 QWidget *parent = 0, const char *name = 0 ); 00062 ~PrintingWizard(); 00063 00067 void registerStyles(); 00068 00072 void print(); 00073 00077 KABC::AddressBook *addressBook(); 00078 00082 KPrinter* printer(); 00083 00084 protected slots: 00089 void slotStyleSelected(int); 00090 00091 protected: 00092 QPtrList<PrintStyleFactory> mStyleFactories; 00093 QPtrList<PrintStyle> mStyleList; 00094 Filter::List mFilters; 00095 KPrinter *mPrinter; 00096 KABC::AddressBook *mAddressBook; 00097 QStringList mSelection; 00098 PrintStyle *mStyle; 00099 00100 StylePage *mStylePage; 00101 SelectionPage *mSelectionPage; 00102 00110 void accept(); 00111 }; 00112 00113 } 00114 00115 #endif