#include <qlayout.h>
#include <qpushbutton.h>
+#include <qtoolbutton.h>
#include <qcursor.h>
#include <qlabel.h>
#include <qwidgetstack.h>
QPushButton * cancelButton;
QPushButton * helpButton;
QFrame * hbar1, * hbar2;
+ QToolButton * aboutButton;
#ifndef QT_NO_ACCEL
QAccel * accel;
d->ws = new QWidgetStack( this, "qt_widgetstack" );
d->pages.setAutoDelete( TRUE );
d->titleBox = new QHBox( this, "title box" );
+ d->aboutButton = new QToolButton( d->titleBox, "about button");
+ d->aboutButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ d->aboutButton->setAutoRaise( true );
d->title = new QLabel( d->titleBox, "title label" );
d->logoBox = new QHBox( d->titleBox, "logo box" );
d->logoBox->setSpacing( 2 );
d->titleBox->setStretchFactor( d->title, 10 );
-
// create in nice tab order
d->nextButton = new QPushButton( this, "next" );
d->finishButton = new QPushButton( this, "finish" );
d->nextButton->setDefault( TRUE );
connect( d->backButton, SIGNAL(clicked()),
+ this, SIGNAL(backClicked()) );
+ connect( this, SIGNAL(backClicked()),
this, SLOT(back()) );
connect( d->nextButton, SIGNAL(clicked()),
+ this, SIGNAL(nextClicked()) );
+ connect( this, SIGNAL(nextClicked()),
this, SLOT(next()) );
connect( d->finishButton, SIGNAL(clicked()),
this, SLOT(accept()) );
this, SLOT(reject()) );
connect( d->helpButton, SIGNAL(clicked()),
this, SLOT(help()) );
+ connect( d->aboutButton, SIGNAL(clicked()),
+ this, SIGNAL(aboutClicked()) );
#ifndef QT_NO_ACCEL
d->accel = new QAccel( this, "arrow-key accel" );
d->backAccel = d->accel->insertItem( Qt::ALT + Qt::Key_Left );
- d->accel->connectItem( d->backAccel, this, SLOT(back()) );
+ d->accel->connectItem( d->backAccel, this, SIGNAL(backClicked()) );
d->nextAccel = d->accel->insertItem( Qt::ALT + Qt::Key_Right );
- d->accel->connectItem( d->nextAccel, this, SLOT(next()) );
+ d->accel->connectItem( d->nextAccel, this, SIGNAL(nextClicked()) );
#endif
+
+ showAboutBtn( false );
}
emit helpClicked();
}
-
+/*!
+ Enables/disables <Back> button
+ */
void InstallWizard::setBackEnabled( bool enable )
{
d->backButton->setEnabled( enable );
#endif
}
-
+/*!
+ Enables/disables <Next> button
+ */
void InstallWizard::setNextEnabled( bool enable )
{
d->nextButton->setEnabled( enable );
#endif
}
-
+/*!
+ Enables/disables <Help> button
+ */
void InstallWizard::setHelpEnabled( bool enable )
{
d->helpButton->setEnabled( enable );
}
-
/*!
\fn void InstallWizard::setFinish( QWidget *, bool )
\obsolete
delete children;
}
+/*!
+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
}
/*!