- // target directory
- QLabel* targetLab = new QLabel( tr( "Type the target directory:" ), productsPage );
- targetFolder = new QLineEdit( productsPage );
- QWhatsThis::add( targetFolder, tr( "Enter target root directory where products will be installed" ) );
- QToolTip::add ( targetFolder, tr( "Enter target root directory where products will be installed" ) );
- targetBtn = new QPushButton( tr( "Browse..." ), productsPage );
- QWhatsThis::add( targetBtn, tr( "Click this to browse target directory" ) );
- QToolTip::add ( targetBtn, tr( "Click this to browse target directory" ) );
- // create advanced mode widgets container
- moreBox = new QWidget( productsPage );
- QGridLayout* moreBoxLayout = new QGridLayout( moreBox );
- moreBoxLayout->setMargin( 0 ); moreBoxLayout->setSpacing( 6 );
- // temp directory
- QLabel* tempLab = new QLabel( tr( "Type the directory for the temporary files:" ), moreBox );
- tempFolder = new QLineEdit( moreBox );
- // tempFolder->setText( "/tmp" ); // default is /tmp directory
- QWhatsThis::add( tempFolder, tr( "Enter directory where to put temporary files" ) );
- QToolTip::add ( tempFolder, tr( "Enter directory where to put temporary files" ) );
- tempBtn = new QPushButton( tr( "Browse..." ), moreBox );
- tempBtn->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- QWhatsThis::add( tempBtn, tr( "Click this to browse temporary directory" ) );
- QToolTip::add ( tempBtn, tr( "Click this to browse temporary directory" ) );
- // create products list
- productsView = new MyListView( moreBox );
- productsView->setMinimumSize( 200, 180 );
- QWhatsThis::add( productsView, tr( "This view lists the products you wish to be installed" ) );
- QToolTip::add ( productsView, tr( "This view lists the products you wish to be installed" ) );
- // products info box
- productsInfo = new QTextBrowser( moreBox );
- productsInfo->setMinimumSize( 270, 135 );
- QWhatsThis::add( productsInfo, tr( "Shows info about the product: required disk space and prerequisites" ) );
- QToolTip::add ( productsInfo, tr( "Shows info about the product: required disk space and prerequisites" ) );
- // disk space labels
- QLabel* reqLab1 = new QLabel( tr( "Total disk space required:" ), moreBox );
- QWhatsThis::add( reqLab1, tr( "Shows total disk space required for installing selected products" ) );
- QToolTip::add ( reqLab1, tr( "Shows total disk space required for installing selected products" ) );
- requiredSize = new QLabel( moreBox );
- requiredSize->setMinimumWidth( 100 );
- QWhatsThis::add( requiredSize, tr( "Shows total disk space required for installing selected products" ) );
- QToolTip::add ( requiredSize, tr( "Shows total disk space required for installing selected products" ) );
- QLabel* reqLab2 = new QLabel( tr( "Space for temporary files:" ), moreBox );
- QWhatsThis::add( reqLab2, tr( "Shows additional disk space which is required for temporary files" ) );
- QToolTip::add ( reqLab2, tr( "Shows additional disk space which is required for temporary files" ) );
- requiredTemp = new QLabel( moreBox );
- requiredTemp->setMinimumWidth( 100 );
- QWhatsThis::add( requiredTemp, tr( "Shows additional disk space which is required for temporary files" ) );
- QToolTip::add ( requiredTemp, tr( "Shows additional disk space which is required for temporary files" ) );
- QFont fnt = reqLab1->font();
+ // 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();