~ubuntu-branches/ubuntu/utopic/kde4libs/utopic

« back to all changes in this revision

Viewing changes to kdeui/itemviews/ktreewidgetsearchline.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Kolberg
  • Date: 2012-03-03 00:25:28 UTC
  • mfrom: (1.14.15)
  • Revision ID: package-import@ubuntu.com-20120303002528-chhwyfluldkicy5k
Tags: 4:4.8.1-0ubuntu1
* New upstream release
  - Update symbol files

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
KTreeWidgetSearchLine::KTreeWidgetSearchLine( QWidget *q, QTreeWidget *treeWidget )
219
219
  : KLineEdit( q ), d( new Private( this ) )
220
220
{
221
 
  connect( this, SIGNAL( textChanged( const QString& ) ),
222
 
           this, SLOT( _k_queueSearch( const QString& ) ) );
 
221
  connect( this, SIGNAL(textChanged(QString)),
 
222
           this, SLOT(_k_queueSearch(QString)) );
223
223
 
224
224
  setClearButtonShown( true );
225
225
  setTreeWidget( treeWidget );
233
233
                                              const QList<QTreeWidget *> &treeWidgets )
234
234
  : KLineEdit( q ), d( new Private( this ) )
235
235
{
236
 
  connect( this, SIGNAL( textChanged( const QString& ) ),
237
 
           this, SLOT( _k_queueSearch( const QString& ) ) );
 
236
  connect( this, SIGNAL(textChanged(QString)),
 
237
           this, SLOT(_k_queueSearch(QString)) );
238
238
 
239
239
  setClearButtonShown( true );
240
240
  setTreeWidgets( treeWidgets );
420
420
    QMenu *subMenu = popup->addMenu( i18n("Search Columns") );
421
421
 
422
422
    QAction* allVisibleColumnsAction = subMenu->addAction( i18n("All Visible Columns"),
423
 
                                                           this, SLOT( _k_slotAllVisibleColumns() ) );
 
423
                                                           this, SLOT(_k_slotAllVisibleColumns()) );
424
424
    allVisibleColumnsAction->setCheckable( true );
425
425
    allVisibleColumnsAction->setChecked( !d->searchColumns.count() );
426
426
    subMenu->addSeparator();
429
429
 
430
430
    QActionGroup* group = new QActionGroup( popup );
431
431
    group->setExclusive( false );
432
 
    connect( group, SIGNAL( triggered( QAction* ) ), SLOT( _k_slotColumnActivated( QAction* ) ) );
 
432
    connect( group, SIGNAL(triggered(QAction*)), SLOT(_k_slotColumnActivated(QAction*)) );
433
433
 
434
434
    QHeaderView* const header = d->treeWidgets.first()->header();
435
435
    for ( int j = 0; j < header->count(); j++ ) {
464
464
 
465
465
void KTreeWidgetSearchLine::connectTreeWidget( QTreeWidget *treeWidget )
466
466
{
467
 
  connect( treeWidget, SIGNAL( destroyed( QObject* ) ),
468
 
           this, SLOT( _k_treeWidgetDeleted( QObject* ) ) );
 
467
  connect( treeWidget, SIGNAL(destroyed(QObject*)),
 
468
           this, SLOT(_k_treeWidgetDeleted(QObject*)) );
469
469
 
470
 
  connect( treeWidget->model(), SIGNAL( rowsInserted( const QModelIndex&, int, int) ),
471
 
           this, SLOT( _k_rowsInserted( const QModelIndex&, int, int ) ) );
 
470
  connect( treeWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
 
471
           this, SLOT(_k_rowsInserted(QModelIndex,int,int)) );
472
472
}
473
473
 
474
474
void KTreeWidgetSearchLine::disconnectTreeWidget( QTreeWidget *treeWidget )
475
475
{
476
 
  disconnect( treeWidget, SIGNAL( destroyed( QObject* ) ),
477
 
              this, SLOT( _k_treeWidgetDeleted( QObject* ) ) );
 
476
  disconnect( treeWidget, SIGNAL(destroyed(QObject*)),
 
477
              this, SLOT(_k_treeWidgetDeleted(QObject*)) );
478
478
 
479
 
  disconnect( treeWidget->model(), SIGNAL( rowsInserted( const QModelIndex&, int, int) ),
480
 
              this, SLOT( _k_rowsInserted( const QModelIndex&, int, int ) ) );
 
479
  disconnect( treeWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
 
480
              this, SLOT(_k_rowsInserted(QModelIndex,int,int)) );
481
481
}
482
482
 
483
483
bool KTreeWidgetSearchLine::canChooseColumnsCheck()
548
548
  queuedSearches++;
549
549
  search = _search;
550
550
 
551
 
  QTimer::singleShot( 200, q, SLOT( _k_activateSearch() ) );
 
551
  QTimer::singleShot( 200, q, SLOT(_k_activateSearch()) );
552
552
}
553
553
 
554
554
void KTreeWidgetSearchLine::Private::_k_activateSearch()