virtual QFont font( const int = NameId ) const;
virtual int alignment( const int = NameId ) const;
+ virtual bool expandable() const;
virtual bool isVisible() const;
virtual bool isDragable() const;
virtual bool isDropAccepted( SUIT_DataObject* obj );
return;
// update all columns corresponding to the given data object
+ emit layoutAboutToBeChanged();
QModelIndex firstIdx = index( obj, 0 );
QModelIndex lastIdx = index( obj, columnCount() - 1 );
emit dataChanged( firstIdx, lastIdx );
obj->setModified(false);
+ emit layoutChanged();
}
/*!
bool SUIT_ProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex& sourceParent ) const
{
SUIT_DataObject* o = treeModel()->object( sourceModel()->index( sourceRow, 0, sourceParent ) );
- return o && o->isVisible();
+ SUIT_DataObject* p = o ? o->parent() : 0;
+ return ( !p || p->expandable() ) && o && o->isVisible();
}
/*!