KDEUI
#include <klistwidgetsearchline.h>
Public Slots | |
void | clear () |
void | setCaseSensitivity (Qt::CaseSensitivity cs) |
void | setListWidget (QListWidget *lv) |
virtual void | updateSearch (const QString &s=QString()) |
Public Slots inherited from KLineEdit | |
virtual void | clear () |
bool | passwordMode () const |
void | rotateText (KCompletionBase::KeyBindingType type) |
void | setCompletedItems (const QStringList &items, bool autoSuggest=true) |
virtual void | setCompletedText (const QString &) |
void | setPasswordMode (bool b=true) |
virtual void | setReadOnly (bool) |
void | setSqueezedText (const QString &text) |
virtual void | setText (const QString &) |
Protected Member Functions | |
virtual bool | event (QEvent *event) |
virtual bool | itemMatches (const QListWidgetItem *item, const QString &s) const |
Protected Member Functions inherited from KLineEdit | |
bool | autoSuggest () const |
virtual void | contextMenuEvent (QContextMenuEvent *) |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
QMenu * | createStandardContextMenu () |
virtual void | dropEvent (QDropEvent *) |
virtual void | focusInEvent (QFocusEvent *ev) |
virtual void | focusOutEvent (QFocusEvent *ev) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | paintEvent (QPaintEvent *ev) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | setCompletedText (const QString &, bool) |
void | setUserSelection (bool userSelection) |
Protected Member Functions inherited from KCompletionBase | |
KCompletionBase * | delegate () const |
KeyBindingMap | getKeyBindings () const |
void | setDelegate (KCompletionBase *delegate) |
virtual void | virtual_hook (int id, void *data) |
Additional Inherited Members | |
Public Types inherited from KCompletionBase | |
typedef QMap< KeyBindingType, KShortcut > | KeyBindingMap |
enum | KeyBindingType { TextCompletion, PrevCompletionMatch, NextCompletionMatch, SubstringCompletion } |
Signals inherited from KLineEdit | |
void | aboutToShowContextMenu (QMenu *menu) |
void | clearButtonClicked () |
void | completion (const QString &) |
void | completionBoxActivated (const QString &) |
void | completionModeChanged (KGlobalSettings::Completion) |
void | returnPressed (const QString &) |
void | substringCompletion (const QString &) |
void | textRotation (KCompletionBase::KeyBindingType) |
QT_MOC_COMPAT void | userTextChanged (const QString &) |
Protected Slots inherited from KLineEdit | |
virtual void | makeCompletion (const QString &) |
void | userCancelled (const QString &cancelText) |
Properties inherited from KLineEdit | |
QString | clickMessage |
bool | contextMenuEnabled |
bool | passwordMode |
bool | showClearButton |
bool | squeezedTextEnabled |
bool | trapEnterKeyEvent |
bool | urlDropsEnabled |
Detailed Description
This class makes it easy to add a search line for filtering the items in a listwidget based on a simple text search.
No changes to the application other than instantiating this class with an appropriate QListWidget should be needed.
Definition at line 37 of file klistwidgetsearchline.h.
Constructor & Destructor Documentation
|
explicit |
Constructs a KListWidgetSearchLine with listWidget being the QListWidget to be filtered.
If listWidget is null then the widget will be disabled until a listWidget is set with setListWidget().
Definition at line 63 of file klistwidgetsearchline.cpp.
|
virtual |
Destroys the KListWidgetSearchLine.
Definition at line 71 of file klistwidgetsearchline.cpp.
Member Function Documentation
Qt::CaseSensitivity KListWidgetSearchLine::caseSensitive | ( | ) | const |
Returns if the search is case sensitive.
This defaults to Qt::CaseInsensitive.
- See also
- setCaseSensitive()
Definition at line 77 of file klistwidgetsearchline.cpp.
|
slot |
Clear line edit and empty hiddenItems, returning elements to listWidget.
Definition at line 98 of file klistwidgetsearchline.cpp.
|
protectedvirtual |
Re-implemented for internal reasons.
API not affected.
Reimplemented from KLineEdit.
Definition at line 207 of file klistwidgetsearchline.cpp.
|
protectedvirtual |
Returns true if item matches the search s.
This will be evaluated based on the value of caseSensitive(). This can be overridden in subclasses to implement more complicated matching schemes.
Definition at line 142 of file klistwidgetsearchline.cpp.
QListWidget * KListWidgetSearchLine::listWidget | ( | ) | const |
Returns the listWidget that is currently filtered by the search.
- See also
- setListWidget()
Definition at line 82 of file klistwidgetsearchline.cpp.
|
slot |
Make the search case sensitive or case insensitive.
- See also
- caseSenstive()
Definition at line 112 of file klistwidgetsearchline.cpp.
|
slot |
Sets the QListWidget that is filtered by this search line.
If lv is null then the widget will be disabled.
- See also
- listWidget()
Definition at line 117 of file klistwidgetsearchline.cpp.
Updates search to only make visible the items that match s.
If s is null then the line edit's text will be used.
Definition at line 90 of file klistwidgetsearchline.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.