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

KDEUI

  • 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
26class QListWidget;
27class QListWidgetItem;
28class QModelIndex;
29
37class KDEUI_EXPORT KListWidgetSearchLine : public KLineEdit
38{
39 Q_OBJECT
40
41public:
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
73public 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
101protected:
107 virtual bool itemMatches( const QListWidgetItem *item,
108 const QString &s ) const;
112 virtual bool event(QEvent *event);
113
114private:
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 */
KLineEdit
An enhanced QLineEdit widget for inputting text.
Definition: klineedit.h:150
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:38
QListWidget
QWidget
klineedit.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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