* Returns true if "install binaries" is on for the item
*/
// ================================================================
-bool ProductsView::isBinaries( QCheckListItem* item )
+bool ProductsView::isBinaries( QCheckListItem* item ) const
{
if ( item->childCount() > 0 ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
* Returns true if "install sources" is on for the item
*/
// ================================================================
-bool ProductsView::isSources( QCheckListItem* item )
+bool ProductsView::isSources( QCheckListItem* item ) const
{
if ( item->childCount() > 0 ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
* Returns true if "use native" is on for the item
*/
// ================================================================
-bool ProductsView::isNative( QCheckListItem* item )
+bool ProductsView::isNative( QCheckListItem* item ) const
{
if ( item->childCount() > 0 ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
* Returns true if "not install" is on for the item
*/
// ================================================================
-bool ProductsView::isNone( QCheckListItem* item )
+bool ProductsView::isNone( QCheckListItem* item ) const
{
return !isBinaries( item ) && !isSources( item ) && !isNative( item );
}
item->setOn( false );
}
}
+
+// ================================================================
+/*!
+ * ProductsView::hasBinaries
+ * Returns true if product supports "binaries" installation mode
+ */
+// ================================================================
+bool ProductsView::hasBinaries( QCheckListItem* item ) const
+{
+ if ( item->childCount() > 0 ) {
+ QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
+ while( subItem ) {
+ if ( subItem->text() == tr( "install binaries" ) )
+ return true;
+ subItem = (QCheckListItem*)( subItem->nextSibling() );
+ }
+ }
+ return false;
+}
+
+// ================================================================
+/*!
+ * ProductsView::hasSources
+ * Returns true if product supports "sources" installation mode
+ */
+// ================================================================
+bool ProductsView::hasSources( QCheckListItem* item ) const
+{
+ if ( item->childCount() > 0 ) {
+ QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
+ while( subItem ) {
+ if ( subItem->text() == tr( "install sources" ) )
+ return true;
+ subItem = (QCheckListItem*)( subItem->nextSibling() );
+ }
+ }
+ return false;
+}
+
+// ================================================================
+/*!
+ * ProductsView::hasNative
+ * Returns true if product supports "native" installation mode
+ */
+// ================================================================
+bool ProductsView::hasNative( QCheckListItem* item ) const
+{
+ if ( item->childCount() > 0 ) {
+ QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
+ while( subItem ) {
+ if ( subItem->text() == tr( "use native" ) )
+ return true;
+ subItem = (QCheckListItem*)( subItem->nextSibling() );
+ }
+ }
+ return false;
+}