KDE3Support
#include <k3iconviewsearchline.h>
Public Slots | |
void | clear () |
void | setCaseSensitive (bool cs) |
void | setIconView (Q3IconView *iv) |
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 Slots | |
void | activateSearch () |
void | queueSearch (const QString &s) |
Protected Slots inherited from KLineEdit | |
virtual void | makeCompletion (const QString &) |
void | userCancelled (const QString &cancelText) |
Protected Member Functions | |
void | hideItem (Q3IconViewItem *item) |
void | init (Q3IconView *iconView=0) |
virtual bool | itemMatches (const Q3IconViewItem *item, const QString &s) const |
void | showItem (Q3IconViewItem *item) |
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 bool | event (QEvent *) |
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) |
Additional Inherited Members | |
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 &) |
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 iconview based on a simple text search.
No changes to the application other than instantiating this class with an appropriate QIconView should be needed.
Definition at line 36 of file k3iconviewsearchline.h.
Constructor & Destructor Documentation
K3IconViewSearchLine::K3IconViewSearchLine | ( | QWidget * | parent = 0 , |
Q3IconView * | iconView = 0 |
||
) |
Constructs a K3IconViewSearchLine with iconView being the QIconView to be filtered.
If iconView is null then the widget will be disabled until a iconview is set with setIconView().
Definition at line 57 of file k3iconviewsearchline.cpp.
|
virtual |
Destroys the K3IconViewSearchLine.
Definition at line 65 of file k3iconviewsearchline.cpp.
Member Function Documentation
|
protectedslot |
When the timer started with queueSearch() expires this slot is called.
If there has been another timer started then this slot does nothing. However if there are no other pending searches this starts the icon view search.
- See also
- queueSearch()
Definition at line 249 of file k3iconviewsearchline.cpp.
bool K3IconViewSearchLine::caseSensitive | ( | ) | const |
Returns true if the search is case sensitive.
This defaults to false.
- See also
- setCaseSensitive()
Definition at line 71 of file k3iconviewsearchline.cpp.
|
slot |
Clear line edit and empty hiddenItems, returning elements to iconView.
Definition at line 129 of file k3iconviewsearchline.cpp.
|
protected |
Hide item.
Definition at line 217 of file k3iconviewsearchline.cpp.
Q3IconView * K3IconViewSearchLine::iconView | ( | ) | const |
Returns the iconview that is currently filtered by the search.
- See also
- setIconView()
Definition at line 76 of file k3iconviewsearchline.cpp.
|
protected |
Do initialization common to both constructors.
Definition at line 195 of file k3iconviewsearchline.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 182 of file k3iconviewsearchline.cpp.
|
protectedslot |
When keys are pressed a new search string is created and a timer is activated.
The most recent search is activated when this timer runs out if another key has not yet been pressed.
This method makes
- Parameters
-
s the most recent search and starts the timer.
Together with activateSearch() this makes it such that searches are not started until there is a short break in the users typing.
- See also
- activateSearch()
Definition at line 242 of file k3iconviewsearchline.cpp.
|
slot |
Make the search case sensitive or case insensitive.
- See also
- caseSenstive()
Definition at line 156 of file k3iconviewsearchline.cpp.
|
slot |
Sets the QIconView that is filtered by this search line.
If lv is null then the widget will be disabled.
- See also
- iconView()
Definition at line 161 of file k3iconviewsearchline.cpp.
|
protected |
Show item.
Just unhide it, doesn't necessary show it on screen, for that use iconView->ensureItemVisible()
Definition at line 226 of file k3iconviewsearchline.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 84 of file k3iconviewsearchline.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:51:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.