• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • itemviews
klistwidgetsearchline.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE libraries
3  Copyright (c) 2003 Scott Wheeler <wheeler@kde.org>
4  Copyright (c) 2004 Gustavo Sverzut Barbieri <gsbarbieri@users.sourceforge.net>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KLISTWIDGETSEARCHLINE_H
22 #define KLISTWIDGETSEARCHLINE_H
23 
24 #include <klineedit.h>
25 
26 class QListWidget;
27 class QListWidgetItem;
28 class QModelIndex;
29 
37 class KDEUI_EXPORT KListWidgetSearchLine : public KLineEdit
38 {
39  Q_OBJECT
40 
41 public:
42 
50  explicit KListWidgetSearchLine( QWidget *parent = 0,
51  QListWidget *listWidget = 0 );
52 
56  virtual ~KListWidgetSearchLine();
57 
63  Qt::CaseSensitivity caseSensitive() const;
64 
70  QListWidget *listWidget() const;
71 
72 
73 public Q_SLOTS:
78  virtual void updateSearch( const QString &s = QString() );
79 
85  void setCaseSensitivity( Qt::CaseSensitivity cs );
86 
93  void setListWidget( QListWidget *lv );
94 
95 
99  void clear();
100 
101 protected:
107  virtual bool itemMatches( const QListWidgetItem *item,
108  const QString &s ) const;
112  virtual bool event(QEvent *event);
113 
114 private:
115  class KListWidgetSearchLinePrivate;
116  KListWidgetSearchLinePrivate * const d;
117 
118  Q_PRIVATE_SLOT(d, void _k_listWidgetDeleted())
119  Q_PRIVATE_SLOT(d, void _k_queueSearch(const QString&))
120  Q_PRIVATE_SLOT(d, void _k_activateSearch())
121  Q_PRIVATE_SLOT(d, void _k_rowsInserted(const QModelIndex&, int, int))
122  Q_PRIVATE_SLOT(d, void _k_dataChanged(const QModelIndex&, const QModelIndex&))
123 };
124 
125 
126 #endif /* KLISTWIDGETSEARCHLINE_H */
QModelIndex
QEvent
QWidget
QListWidgetItem
QListWidget
KLineEdit::clear
virtual void clear()
Reimplemented to workaround a buggy QLineEdit::clear() (changing the clipboard to the text we just ha...
Definition: klineedit.cpp:1698
QString
KLineEdit
An enhanced QLineEdit widget for inputting text.
Definition: klineedit.h:149
KLineEdit::event
virtual bool event(QEvent *)
Re-implemented for internal reasons.
Definition: klineedit.cpp:1358
klineedit.h
KListWidgetSearchLine
This class makes it easy to add a search line for filtering the items in a listwidget based on a simp...
Definition: klistwidgetsearchline.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal