Esempio n. 1
0
KTreeViewSearchLine::KTreeViewSearchLine( QWidget *parent, QTreeView *treeView )
  : KLineEdit( parent ), d( new Private( this ) )
{
  connect( this, SIGNAL(textChanged(QString)),
           this, SLOT(queueSearch(QString)) );

  setClearButtonShown( true );
  setTreeView( treeView );

  if ( !treeView ) {
      setEnabled( false );
  }
}
void K3IconViewSearchLine::init( Q3IconView *iconView )
{
  delete d;
  d = new K3IconViewSearchLinePrivate;

  d->iconView = iconView;

  connect( this, SIGNAL(textChanged(QString)),
	   this, SLOT(queueSearch(QString)) );

  if ( iconView != NULL )
  {
      connect( iconView, SIGNAL(destroyed()),
              this,     SLOT(iconViewDeleted()) );
      setEnabled( true );
  } else {
      setEnabled( false );
  }

  setClearButtonShown(true);
}