1 /****************************************************************************
4 ** Definition of the QWizard class.
8 ** Copyright (C) 1999 by Trolltech AS. All rights reserved.
10 ** This file is part of the dialogs module of the Qt GUI Toolkit.
12 ** This file may be distributed under the terms of the Q Public License
13 ** as defined by Trolltech AS of Norway and appearing in the file
14 ** LICENSE.QPL included in the packaging of this file.
16 ** This file may be distributed and/or modified under the terms of the
17 ** GNU General Public License version 2 as published by the Free Software
18 ** Foundation and appearing in the file LICENSE.GPL included in the
19 ** packaging of this file.
21 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22 ** licenses may use this file in accordance with the Qt Commercial License
23 ** Agreement provided with the Software.
25 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
28 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29 ** information about Qt Commercial License Agreements.
30 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
31 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
33 ** Contact info@trolltech.com if any conditions of this licensing are
36 **********************************************************************/
38 #ifndef InstallWizard_h
39 #define InstallWizard_h
44 This is the patched Qt 3.0.5 QWizard class
47 class InstallWizardPrivate;
49 class InstallWizard : public QDialog
54 InstallWizard( QWidget* parent=0, const char* name=0, bool modal=FALSE, WFlags f=0 );
57 static void postValidateEvent( InstallWizard* iw, const int val = 0, void* data = 0 );
59 virtual void processValidateEvent( const int val, void* data );
61 bool event ( QEvent * e );
65 void setFont( const QFont & font );
67 virtual void addPage( QWidget *, const QString & );
68 virtual void insertPage( QWidget*, const QString&, int );
69 virtual void removePage( QWidget * );
71 QString title( QWidget * ) const;
72 void setTitle( QWidget *, const QString & );
73 QFont titleFont() const;
74 void setTitleFont( const QFont & );
76 virtual void showPage( QWidget * );
78 QWidget * currentPage() const;
80 QWidget* page( int ) const;
81 QWidget* page( const QString& ) const;
82 int pageCount() const;
83 int indexOf( QWidget* ) const;
85 void addLogo( const QPixmap& );
88 void showAboutBtn( bool );
89 void setAboutIcon( const QPixmap& );
91 virtual bool appropriate( QWidget * ) const;
92 virtual void setAppropriate( QWidget *, bool );
94 QPushButton * backButton() const;
95 QPushButton * nextButton() const;
96 QPushButton * finishButton() const;
97 QPushButton * cancelButton() const;
98 QPushButton * helpButton() const;
100 bool eventFilter( QObject *, QEvent * );
103 virtual void setBackEnabled( QWidget *, bool );
104 virtual void setNextEnabled( QWidget *, bool );
105 virtual void setFinishEnabled( QWidget *, bool );
107 virtual void setHelpEnabled( QWidget *, bool );
110 virtual void setFinish( QWidget *, bool ) {}
122 void selected( const QString& );
125 virtual void layOutButtonRow( QHBoxLayout * );
126 virtual void layOutTitleRow( QHBoxLayout *, const QString & );
127 virtual bool acceptData( const QString& );
129 void setBackEnabled( bool );
130 void setNextEnabled( bool );
133 void setHelpEnabled( bool );
135 void setNextPage( QWidget * );
137 void updateButtons();
139 InstallWizardPrivate *d;
141 private: // Disabled copy constructor and operator=
142 #if defined(Q_DISABLE_COPY)
143 InstallWizard( const InstallWizard & );
144 InstallWizard& operator=( const InstallWizard & );
148 #endif // InstallWizard_h