<b><i>gcc, python</i></b>,<b><i> qt</i></b> and <b><i>sip</i></b> installed.
Therefore all these products will be marked when you check on <b><i>pyqt</i></b>.
This feature can be switched off by clicking <i>"Auto set prerequisites products"</i>
- checkbox. <br>
+ checkbox. Turn on this checkbox if you want all pre-requisite
+ products to be automatically checked when you select some product to
+ be installed. Turn off this checkbox if you want to disable this feature.<br><br>
Special button in the right part of the page - <i>"Unselect All" </i>-
-allows to reset quickly all products to the <i>"not install"</i> state. <br>
+allows to reset quickly all products to the <i>"not install"</i> state. <br><br>
If you want to use native products (for example, for Linux Red Hat 8.0 these are gcc, tcl,
Python, Qt, Sip and PyQt), select <i>"use native" </i>option. </p>
int totBin = 0, selBin = 0;
MapProducts::Iterator itProd;
for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
- if ( itProd.data().getContext() == "salome sources" ) {
- totSrc++;
- if ( productsView->isSources( itProd.key() ) )
- selSrc++;
- }
- if ( itProd.data().getContext() == "salome binaries" ) {
- totBin++;
- if ( productsView->isBinaries( itProd.key() ) )
- selBin++;
+ bool srcctx = itProd.data().hasContext( "salome sources" );
+ bool binctx = itProd.data().hasContext( "salome binaries" );
+ if ( srcctx ) totSrc++;
+ if ( binctx ) totBin++;
+ if ( srcctx && !binctx && productsView->isSources( itProd.key() ) )
+ selSrc++;
+ if ( !srcctx && binctx && productsView->isBinaries( itProd.key() ) )
+ selBin++;
+ if ( srcctx && binctx &&
+ ( productsView->isSources( itProd.key() ) ||
+ productsView->isBinaries( itProd.key() ) ) ) {
+ selSrc++;
+ selBin++;
}
}
selectSrcBtn->blockSignals( true );
checkBox->setState( QButton::On );
MapProducts::Iterator itProd;
for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
- if ( itProd.data().getContext() == "salome sources" ) {
+ if ( itProd.data().hasContext( "salome sources" ) ) {
if ( checkBox->state() == QButton::Off )
productsView->setNone( itProd.key() );
- else
+ else {
productsView->setSources( itProd.key() );
+ if ( prerequisites->isChecked() )
+ setPrerequisites( itProd.key() );
+ }
}
}
}
checkBox->setState( QButton::On );
MapProducts::Iterator itProd;
for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
- if ( itProd.data().getContext() == "salome binaries" ) {
+ if ( itProd.data().hasContext( "salome binaries" ) ) {
if ( checkBox->state() == QButton::Off )
productsView->setNone( itProd.key() );
- else
+ else {
productsView->setBinaries( itProd.key() );
+ if ( prerequisites->isChecked() )
+ setPrerequisites( itProd.key() );
+ }
}
}
}
// gets dependancies
QStringList getDependancies() const { return dependsOn; }
// gets disk space required
- long getSize(bool sources = false) const { return ( sources ? sizeSourcesTotal : sizeBinaryTotal ); }
+ long getSize(bool sources = false) const
+ {
+ return ( sources ? sizeSourcesTotal : sizeBinaryTotal );
+ }
// gets temporary disk space required
long getTempSize() const { return sizeTemp; }
// gets product's description
QString getDescription() const { return description; }
// gets product's context
QString getContext() const { return context; }
+ // returns true if product supports given context
+ bool hasContext( const QString& ctx ) const
+ {
+ QStringList cl = QStringList::split(",",context);
+ return cl.find( ctx ) != cl.end();
+ }
// gets default mode
QString getDefault() const { return defaultMode; }
// returns true if this product needs to pick-up environment