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& title ) const;
82 int pageCount() const;
83 int indexOf( QWidget* ) const;
85 void addLogo( const QPixmap& pm );
88 virtual bool appropriate( QWidget * ) const;
89 virtual void setAppropriate( QWidget *, bool );
91 QPushButton * backButton() const;
92 QPushButton * nextButton() const;
93 QPushButton * finishButton() const;
94 QPushButton * cancelButton() const;
95 QPushButton * helpButton() const;
97 bool eventFilter( QObject *, QEvent * );
100 virtual void setBackEnabled( QWidget *, bool );
101 virtual void setNextEnabled( QWidget *, bool );
102 virtual void setFinishEnabled( QWidget *, bool );
104 virtual void setHelpEnabled( QWidget *, bool );
107 virtual void setFinish( QWidget *, bool ) {}
118 void selected( const QString& );
121 virtual void layOutButtonRow( QHBoxLayout * );
122 virtual void layOutTitleRow( QHBoxLayout *, const QString & );
123 virtual bool acceptData( const QString& );
125 void setBackEnabled( bool );
126 void setNextEnabled( bool );
129 void setHelpEnabled( bool );
131 void setNextPage( QWidget * );
133 void updateButtons();
135 InstallWizardPrivate *d;
137 private: // Disabled copy constructor and operator=
138 #if defined(Q_DISABLE_COPY)
139 InstallWizard( const InstallWizard & );
140 InstallWizard& operator=( const InstallWizard & );
144 #endif // InstallWizard_h