X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FInstallWizard.cpp;h=d4bd4da508824be8ebbccc78a47bdf427883564a;hb=3fc3493387b534f9e0c536de985ac0af3413ae7a;hp=f2628e384605fcca61dca97f12b07a28c234ec33;hpb=0a5bfb9be4f4c36b4016c9fb032ea738a0b84dbb;p=tools%2Finstall.git diff --git a/src/InstallWizard.cpp b/src/InstallWizard.cpp index f2628e3..d4bd4da 100644 --- a/src/InstallWizard.cpp +++ b/src/InstallWizard.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -95,6 +96,7 @@ public: QPushButton * cancelButton; QPushButton * helpButton; QFrame * hbar1, * hbar2; + QToolButton * aboutButton; #ifndef QT_NO_ACCEL QAccel * accel; @@ -128,11 +130,13 @@ InstallWizard::InstallWizard( QWidget *parent, const char *name, bool modal, 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" ); @@ -168,6 +172,8 @@ InstallWizard::InstallWizard( QWidget *parent, const char *name, bool modal, 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" ); @@ -176,6 +182,8 @@ InstallWizard::InstallWizard( QWidget *parent, const char *name, bool modal, d->nextAccel = d->accel->insertItem( Qt::ALT + Qt::Key_Right ); d->accel->connectItem( d->nextAccel, this, SIGNAL(nextClicked()) ); #endif + + showAboutBtn( false ); } @@ -416,7 +424,9 @@ void InstallWizard::help() emit helpClicked(); } - +/*! + Enables/disables button + */ void InstallWizard::setBackEnabled( bool enable ) { d->backButton->setEnabled( enable ); @@ -425,7 +435,9 @@ void InstallWizard::setBackEnabled( bool enable ) #endif } - +/*! + Enables/disables button + */ void InstallWizard::setNextEnabled( bool enable ) { d->nextButton->setEnabled( enable ); @@ -434,13 +446,14 @@ void InstallWizard::setNextEnabled( bool enable ) #endif } - +/*! + Enables/disables button + */ void InstallWizard::setHelpEnabled( bool enable ) { d->helpButton->setEnabled( enable ); } - /*! \fn void InstallWizard::setFinish( QWidget *, bool ) \obsolete @@ -914,6 +927,22 @@ void InstallWizard::removeLogos() 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 */