~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to kaddressbook/quicksearchwidget.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    This file is part of KAddressBook.
3
 
 
4
 
    Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
5
 
 
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.
10
 
 
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.
15
 
 
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
19
 
    02110-1301, USA.
 
2
  This file is part of KAddressBook.
 
3
 
 
4
  Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
 
5
 
 
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.
 
10
 
 
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.
 
15
 
 
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
 
19
  02110-1301, USA.
20
20
*/
21
21
 
22
22
#include "quicksearchwidget.h"
23
23
 
 
24
#include <KLineEdit>
 
25
#include <KLocale>
 
26
 
24
27
#include <QtCore/QTimer>
25
28
#include <QtGui/QKeyEvent>
26
29
#include <QtGui/QVBoxLayout>
27
30
 
28
 
#include <klineedit.h>
29
 
#include <klocale.h>
30
 
 
31
31
QuickSearchWidget::QuickSearchWidget( QWidget *parent )
32
32
  : QWidget( parent )
33
33
{
35
35
  layout->setMargin( 0 );
36
36
 
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 );
40
 
 
 
40
  mEdit->setToolTip(
 
41
    i18nc( "@info:tooltip", "Search contacts in list" ) );
 
42
  mEdit->setWhatsThis(
 
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 );
42
48
 
43
49
  layout->addWidget( mEdit );
48
54
  connect( mTimer, SIGNAL(timeout()), SLOT(delayedTextChanged()) );
49
55
}
50
56
 
51
 
 
52
57
QuickSearchWidget::~QuickSearchWidget()
53
58
{
54
59
}