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 TQt, and distribute the resulting executable,
00022     without including the source code for TQt in the source distribution.
00023 */
00024 
00025 #ifndef PRINTINGWIZARD_H
00026 #define PRINTINGWIZARD_H
00027 
00028 #include <tqptrlist.h>
00029 #include <tqstringlist.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 TQVBoxLayout;
00043 
00044 namespace KABPrinting {
00045 
00050 class PrintingWizard : public KWizard
00051 {
00052   Q_OBJECT
00053   TQ_OBJECT
00054 
00055   public:
00059     PrintingWizard( KPrinter *printer,
00060                     KABC::AddressBook* ab,
00061                     const TQStringList& selection,
00062                     TQWidget *parent = 0, const char *name = 0 );
00063     ~PrintingWizard();
00064 
00068     void registerStyles();
00069 
00073     void print();
00074 
00078     KABC::AddressBook *addressBook();
00079 
00083     KPrinter* printer();
00084 
00085   protected slots:
00090     void slotStyleSelected(int);
00091 
00092   protected:
00093     TQPtrList<PrintStyleFactory> mStyleFactories;
00094     TQPtrList<PrintStyle> mStyleList;
00095     Filter::List mFilters;
00096     KPrinter *mPrinter;
00097     KABC::AddressBook *mAddressBook;
00098     TQStringList mSelection;
00099     PrintStyle *mStyle;
00100 
00101     StylePage *mStylePage;
00102     SelectionPage *mSelectionPage;
00103 
00111     void accept();
00112 };
00113 
00114 }
00115 
00116 #endif