2
This file is part of KAddressBook.
4
Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
6
This library is free software; you can redistribute it and/or modify it
7
under the terms of the GNU Library General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This library is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
2
This file is part of KAddressBook.
4
Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
6
This library is free software; you can redistribute it and/or modify it
7
under the terms of the GNU Library General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This library is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
22
#include "quicksearchwidget.h"
24
27
#include <QtCore/QTimer>
25
28
#include <QtGui/QKeyEvent>
26
29
#include <QtGui/QVBoxLayout>
28
#include <klineedit.h>
31
31
QuickSearchWidget::QuickSearchWidget( QWidget *parent )
32
32
: QWidget( parent )
35
35
layout->setMargin( 0 );
37
37
mEdit = new KLineEdit;
38
mEdit->setClickMessage( i18nc( "Search contacts in list", "Search" ) );
38
mEdit->setClickMessage( i18nc( "@label Search contacts in list", "Search" ) );
39
39
mEdit->setClearButtonShown( true );
41
i18nc( "@info:tooltip", "Search contacts in list" ) );
43
i18nc( "@info:whatsthis",
44
"Start typing a search string in this box and the list of contacts "
45
"matching that string will be displayed. This is a quick way of searching "
46
"for contacts of interest." ) );
41
47
mEdit->installEventFilter( this );
43
49
layout->addWidget( mEdit );