+/*!
+ * SALOME_InstallWizard::setupTypePage
+ * Creates installation types page
+ */
+// ================================================================
+void SALOME_InstallWizard::setupTypePage()
+{
+ // create page
+ typePage = new QWidget( this, "TypePage" );
+ QGridLayout* pageLayout = new QGridLayout( typePage );
+ pageLayout->setMargin( 0 ); pageLayout->setSpacing( 6 );
+ // create installation type button group
+ buttonGrp = new QButtonGroup( typePage );
+ buttonGrp->setFrameShape(QButtonGroup::NoFrame);
+ QGridLayout* buttonGrpLayout = new QGridLayout( buttonGrp );
+ buttonGrpLayout->setMargin( 0 ); buttonGrpLayout->setSpacing( 6 );
+ QSpacerItem* spacer1 = new QSpacerItem( 16, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ QSpacerItem* spacer2 = new QSpacerItem( 16, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ QLabel* selectLab = new QLabel( tr( "Select a type of the installation:" ), buttonGrp );
+ QSpacerItem* spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ // ... 'install binaries' layout
+ QGridLayout* binLayout = new QGridLayout( 2, 2, 0 );
+ binBtn = new QRadioButton( tr( "Install binaries" ), buttonGrp );
+ QFont rbFont = binBtn->font();
+ rbFont.setBold( true );
+ binBtn->setFont( rbFont );
+ QSpacerItem* spacer4 = new QSpacerItem( 16, 16, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ QLabel* binLab = new QLabel( tr( "- all the binaries and sources of the chosen SALOME modules will be installed.\n"
+ "- all the binaries of the chosen prerequisites will be installed." ),
+ buttonGrp );
+ binLayout->addMultiCellWidget( binBtn, 0, 0, 0, 1 );
+ binLayout->addItem ( spacer4, 1, 0 );
+ binLayout->addWidget ( binLab, 1, 1 );
+ // ... 'install sources' layout
+ QGridLayout* srcLayout = new QGridLayout( 2, 2, 0 );
+ srcBtn = new QRadioButton( tr( "Install sources" ), buttonGrp );
+ srcBtn->setFont( rbFont );
+ QSpacerItem* spacer5 = new QSpacerItem( 16, 16, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ QLabel* srcLab = new QLabel( tr( "- all the sources of the chosen modules and prerequisites will be installed without\ncompilation." ),
+ buttonGrp );
+ srcLayout->addMultiCellWidget( srcBtn, 0, 0, 0, 1 );
+ srcLayout->addItem ( spacer5, 1, 0 );
+ srcLayout->addWidget ( srcLab, 1, 1 );
+ // ... 'install sources and make compilation' layout
+ QGridLayout* srcCompileLayout = new QGridLayout( 3, 3, 0 );
+ srcCompileBtn = new QRadioButton( tr( "Install sources and make a compilation" ), buttonGrp );
+ srcCompileBtn->setFont( rbFont );
+ QSpacerItem* spacer6 = new QSpacerItem( 16, 16, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ QLabel* srcCompileLab1 = new QLabel( tr( "- all the sources of the chosen modules and prerequisites will be installed and\ncompiled." ),
+ buttonGrp );
+ QLabel* srcCompileLab2 = new QLabel( tr( "Note:" ),
+ buttonGrp );
+ QFont noteFont = srcCompileLab2->font();
+ noteFont.setUnderline( true );
+ srcCompileLab2->setFont( noteFont );
+ srcCompileLab2->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ) );
+ srcCompileLab2->setAlignment( Qt::AlignHCenter | Qt::AlignTop );
+ QLabel* srcCompileLab3 = new QLabel( " " +
+ tr( "it is a long time operation and it can take more than 24 hours depending\n on the computer." ),
+ buttonGrp );
+ removeSrcBtn = new QCheckBox( tr( "Remove sources and temporary files after compilation" ), typePage );
+ setAboutInfo( removeSrcBtn, tr( "Check this option if you want to remove sources of the products\nwith all the temporary files after build finishing" ) );
+ removeSrcBtn->setChecked( false );
+ removeSrcBtn->setEnabled( false );
+ rmSrcPrevState = removeSrcBtn->isChecked();
+
+ srcCompileLayout->addMultiCellWidget( srcCompileBtn, 0, 0, 0, 2 );
+ srcCompileLayout->addMultiCell ( spacer6, 1, 2, 0, 0 );
+ srcCompileLayout->addMultiCellWidget( srcCompileLab1, 1, 1, 1, 2 );
+ srcCompileLayout->addWidget ( srcCompileLab2, 2, 1 );
+ srcCompileLayout->addWidget ( srcCompileLab3, 2, 2 );
+ srcCompileLayout->addMultiCellWidget( removeSrcBtn, 3, 3, 1, 2 );
+ // layout widgets in the button group
+ buttonGrpLayout->addItem ( spacer1, 0, 1 );
+ buttonGrpLayout->addMultiCellWidget( selectLab, 1, 1, 0, 1 );
+ buttonGrpLayout->addMultiCell ( spacer3, 2, 4, 0, 0 );
+ buttonGrpLayout->addLayout ( binLayout, 2, 1 );
+ buttonGrpLayout->addLayout ( srcLayout, 3, 1 );
+ buttonGrpLayout->addLayout ( srcCompileLayout, 4, 1 );
+ buttonGrpLayout->addItem ( spacer2, 5, 1 );
+ // layout button group at the page
+ pageLayout->addWidget( buttonGrp, 0, 0 );
+ // connecting signals
+ connect( buttonGrp, SIGNAL( clicked(int) ), this, SLOT ( onButtonGroup(int) ) );
+ // adding page
+ addPage( typePage, tr( "Installation type" ) );
+}
+// ================================================================
+/*!
+ * SALOME_InstallWizard::setupPlatformPage
+ * Creates platforms page, if necessary
+ */
+// ================================================================
+void SALOME_InstallWizard::setupPlatformPage()
+{
+ // create page or not?
+ if ( platformsMap.isEmpty() )
+ return;
+
+ // create page
+ platformsPage = new QWidget( this, "PlatformsPage" );
+ QGridLayout* pageLayout = new QGridLayout( platformsPage );
+ pageLayout->setMargin( 0 ); pageLayout->setSpacing( 6 );
+ // create warning labels
+ QLabel* warnLab2 = new QLabel( tr( "WARNING!" ), platformsPage );
+ warnLab2->setAlignment( Qt::AlignHCenter );
+ QFont fnt = warnLab2->font();
+ fnt.setBold( true );
+ warnLab2->setFont( fnt );
+ if ( installType == Compile && platformsMap.find( curPlatform ) == platformsMap.end() )
+ warnMsg += tr( " and compilation is not tested on this one." );
+ else
+ warnMsg += ".";
+ warnLab = new QLabel( warnMsg, platformsPage );
+ warnLab->setAlignment( Qt::AlignHCenter | Qt::WordBreak );
+ QLabel* warnLab3 = new QLabel( tr( "If you want to proceed anyway, please select platform from the following list:" ),
+ platformsPage );
+ warnLab3->setAlignment( Qt::AlignHCenter | Qt::WordBreak );
+ // create button group
+ platBtnGrp = new QButtonGroup( platformsPage );
+ platBtnGrp->setFrameShape(QButtonGroup::LineEditPanel);
+ platBtnGrp->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ) );
+ QVBoxLayout* platBtnGrpLayout = new QVBoxLayout( platBtnGrp );
+ platBtnGrpLayout->setMargin( 11 ); platBtnGrpLayout->setSpacing( 6 );
+ // create platforms radio-buttons
+ QString plat;
+ MapXmlFiles::Iterator it;
+ for ( it = platformsMap.begin(); it != platformsMap.end(); ++it ) {
+ plat = it.key();
+ QRadioButton* rb = new QRadioButton( plat, platBtnGrp, plat );
+ platBtnGrpLayout->addWidget( rb );
+ }
+ // create spacers
+ QSpacerItem* spacer1 = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ QSpacerItem* spacer2 = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+
+ // layout widgets on page
+ pageLayout->addItem ( spacer1, 0, 0 );
+ pageLayout->addWidget ( warnLab2, 1, 0 );
+ pageLayout->addWidget ( warnLab, 2, 0 );
+ pageLayout->addWidget ( warnLab3, 3, 0 );
+ pageLayout->addItem ( spacer2, 4, 0 );
+ pageLayout->addMultiCellWidget( platBtnGrp, 0, 4, 1, 1 );
+
+ // connecting signals
+ connect( platBtnGrp, SIGNAL( clicked(int) ), this, SLOT ( onButtonGroup(int) ) );
+
+ // adding page
+ addPage( platformsPage, tr( "Installation platform" ) );
+}
+// ================================================================
+/*!
+ * SALOME_InstallWizard::setupDirPage
+ * Creates directories page
+ */
+// ================================================================
+void SALOME_InstallWizard::setupDirPage()
+{
+ // create page
+ dirPage = new QWidget( this, "DirPage" );
+ QGridLayout* pageLayout = new QGridLayout( dirPage );
+ pageLayout->setMargin( 0 ); pageLayout->setSpacing( 6 );
+ QSpacerItem* spacer1 = new QSpacerItem( 16, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ QSpacerItem* spacer2 = new QSpacerItem( 16, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ // target directory
+ QGridLayout* targetLayout = new QGridLayout( 2, 2, 0 );
+ QLabel* targetLab = new QLabel( tr( "Set a target directory to install SALOME platform:" ), dirPage );
+ targetFolder = new QLineEdit( dirPage );
+ targetBtn = new QPushButton( tr( "Browse..." ), dirPage );
+ setAboutInfo( targetBtn, tr( "Click this button to browse\nthe installation directory" ) );
+ targetLayout->addMultiCellWidget( targetLab, 0, 0, 0, 1 );
+ targetLayout->addWidget ( targetFolder, 1, 0 );
+ targetLayout->addWidget ( targetBtn, 1, 1 );
+ // temporary directory
+ QGridLayout* tempLayout = new QGridLayout( 2, 2, 0 );
+ QLabel* tempLab = new QLabel( tr( "Set a directory that should be used for temporary SALOME files:" ), dirPage );
+ tempFolder = new QLineEdit( dirPage );
+ tempBtn = new QPushButton( tr( "Browse..." ), dirPage );
+ setAboutInfo( tempBtn, tr( "Click this button to browse\nthe temporary directory" ) );
+ tempLayout->addMultiCellWidget( tempLab, 0, 0, 0, 1 );
+ tempLayout->addWidget ( tempFolder, 1, 0 );
+ tempLayout->addWidget ( tempBtn, 1, 1 );
+ // AKL: 13/08/07 - disable temporary directory setting in GUI ==>
+ tempLab->hide();
+ tempFolder->hide();
+ tempBtn->hide();
+ // AKL: 13/08/07 - disable temporary directory setting in GUI <==
+ // layout widgets
+ pageLayout->addItem ( spacer1, 0, 0 );
+ pageLayout->addLayout( targetLayout, 1, 0 );
+ pageLayout->addLayout( tempLayout, 2, 0 );
+ pageLayout->addItem ( spacer2, 3, 0 );
+ // connecting signals
+ connect( targetFolder, SIGNAL( textChanged( const QString& ) ),
+ this, SLOT( directoryChanged( const QString& ) ) );
+ connect( targetBtn, SIGNAL( clicked() ),
+ this, SLOT( browseDirectory() ) );
+ connect( tempFolder, SIGNAL( textChanged( const QString& ) ),
+ this, SLOT( directoryChanged( const QString& ) ) );
+ connect( tempBtn, SIGNAL( clicked() ), this, SLOT( browseDirectory() ) );
+
+ // adding page
+ addPage( dirPage, tr( "Installation directory" ) );
+}
+// ================================================================