kaddressbook

printingwizard.h
1 /*
2  This file is part of KAddressBook.
3  Copyright (c) 1996-2002 Mirko Boehm <mirko@kde.org>
4  Tobias Koenig <tokoe@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 #ifndef PRINTINGWIZARD_H
26 #define PRINTINGWIZARD_H
27 
28 #include <tqptrlist.h>
29 #include <tqstringlist.h>
30 
31 #include <kwizard.h>
32 
33 #include "common/filter.h"
34 #include "tdeabc/addressbook.h"
35 #include "printstyle.h"
36 
37 #include "selectionpage.h"
38 #include "stylepage.h"
39 
40 
41 class KPrinter;
42 class TQVBoxLayout;
43 
44 namespace KABPrinting {
45 
50 class PrintingWizard : public KWizard
51 {
52  TQ_OBJECT
53 
54 
55  public:
59  PrintingWizard( KPrinter *printer,
60  TDEABC::AddressBook* ab,
61  const TQStringList& selection,
62  TQWidget *parent = 0, const char *name = 0 );
63  ~PrintingWizard();
64 
68  void registerStyles();
69 
73  void print();
74 
78  TDEABC::AddressBook *addressBook();
79 
83  KPrinter* printer();
84 
85  protected slots:
90  void slotStyleSelected(int);
91 
92  protected:
93  TQPtrList<PrintStyleFactory> mStyleFactories;
94  TQPtrList<PrintStyle> mStyleList;
95  Filter::List mFilters;
96  KPrinter *mPrinter;
97  TDEABC::AddressBook *mAddressBook;
98  TQStringList mSelection;
99  PrintStyle *mStyle;
100 
101  StylePage *mStylePage;
102  SelectionPage *mSelectionPage;
103 
111  void accept();
112 };
113 
114 }
115 
116 #endif
The class PrintStyle implements the abstract interface to the PrintingWizards style objects.
Definition: printstyle.h:61
The PrintingWizard combines pages common for all print styles and those provided by the respective st...
TDEABC::AddressBook * addressBook()
Retrieve the document object.
void print()
Perform the actual printing.
void accept()
Overloaded accept slot.
void registerStyles()
Modify this method to add a new PrintStyle.
KPrinter * printer()
Retrieve the printer to be used.
PrintingWizard(KPrinter *printer, TDEABC::AddressBook *ab, const TQStringList &selection, TQWidget *parent=0, const char *name=0)
Construct a printing wizard.
void slotStyleSelected(int)
A print style has been selected.