+
+/*!
+Show/hide "About" button
+*/
+void InstallWizard::showAboutBtn( bool show )
+{
+ show ? d->aboutButton->show() : d->aboutButton->hide();
+}
+
+/*!
+Set icon for "About" button
+*/
+void InstallWizard::setAboutIcon( const QPixmap& px )
+{
+ d->aboutButton->setIconSet( px );
+}
+
+/*!
+Posts validation event
+*/
+void InstallWizard::postValidateEvent( InstallWizard* iw, const int val, void* data )
+{
+#if QT_VERSION > 0x030005
+ QApplication::postEvent( iw, new ProcessEvent( val, data ) );
+#else
+ QThread::postEvent( iw, new ProcessEvent( val, data ) );
+#endif
+}
+
+/*!
+Processes validation event: default implementation just to show next page
+*/
+void InstallWizard::processValidateEvent( const int /* val */, void* /* data */ )
+{
+ int i = 0;
+ while( i < (int)d->pages.count() && d->pages.at( i ) &&
+ d->current && d->pages.at( i )->w != d->current->w )
+ i++;
+ i++;
+ while( i <= (int)d->pages.count()-1 &&
+ ( !d->pages.at( i ) || !appropriate( d->pages.at( i )->w ) ) )
+ i++;
+ // if we fell of the end of the world, step back
+ while ( i > 0 && (i >= (int)d->pages.count() || !d->pages.at( i ) ) )
+ i--;
+ if ( d->pages.at( i ) ) {
+ showPage( d->pages.at( i )->w );
+ }
+ setNextEnabled( true );
+ setBackEnabled( true );
+}
+
+/*!
+Process events received
+*/
+bool InstallWizard::event ( QEvent* e )
+{
+ if ( e->type() == PROCESS_EVENT ) {
+ ProcessEvent* pe = (ProcessEvent*)e;
+ processValidateEvent( pe->returnValue(), pe->data() );
+ }
+ return QDialog::event( e );
+}