// ================================================================
bool ProductsView::isBinaries( QCheckListItem* item ) const
{
- if ( item->childCount() > 0 ) {
+ if ( item->childCount() > 0 && item->isEnabled() ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
while( subItem ) {
if ( subItem->isOn() )
// ================================================================
bool ProductsView::isSources( QCheckListItem* item ) const
{
- if ( item->childCount() > 0 ) {
+ if ( item->childCount() > 0 && item->isEnabled() ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
while( subItem ) {
if ( subItem->isOn() )
// ================================================================
bool ProductsView::isNative( QCheckListItem* item ) const
{
- if ( item->childCount() > 0 ) {
+ if ( item->childCount() > 0 && item->isEnabled() ) {
QCheckListItem* subItem = (QCheckListItem*)( item->firstChild() );
while( subItem ) {
if ( subItem->isOn() )
}
return false;
}
+
+// ================================================================
+/*!
+ * ProductsView::setItemEnabled
+ * Enable/disable item
+ */
+// ================================================================
+void ProductsView::setItemEnabled( QCheckListItem* item, const bool enable )
+{
+ item->setEnabled( enable );
+ QListViewItem* subItem = item->firstChild();
+ while( subItem ) {
+ subItem->setEnabled( enable );
+ subItem = subItem->nextSibling();
+ }
+}
+
+// ================================================================
+/*!
+ * ProductsView::findBinItem
+ * Find bin item which corresponds to the src item
+ */
+// ================================================================
+QCheckListItem* ProductsView::findBinItem( const QString& srcName )
+{
+ QString binName = srcName.lower().replace( "src", "bin" );
+ QCheckListItem* subItem = (QCheckListItem*)( firstChild() );
+ while( subItem ) {
+ if ( subItem->text().lower() == binName )
+ return subItem;
+ subItem = (QCheckListItem*)( subItem->nextSibling() );
+ }
+ return 0;
+}
+