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

KDE3Support

  • sources
  • kde-4.14
  • kdelibs
  • kde3support
  • kdeui
k3listviewsearchline.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (c) 2003 Scott Wheeler <wheeler@kde.org>
3  Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KLISTVIEWSEARCHLINE_H
21 #define KLISTVIEWSEARCHLINE_H
22 
23 #include <kde3support_export.h>
24 #include <klineedit.h>
25 #include <khbox.h>
26 
27 class K3ListView;
28 class Q3ListViewItem;
29 
38 class KDE3SUPPORT_EXPORT K3ListViewSearchLine : public KLineEdit
39 {
40  Q_OBJECT
41 
42 public:
43 
51  K3ListViewSearchLine(QWidget *parent = 0, K3ListView *listView = 0);
52 
60  K3ListViewSearchLine(QWidget *parent,
61  const QList<K3ListView *> &listViews);
62 
63 
67  virtual ~K3ListViewSearchLine();
68 
74  bool caseSensitive() const;
75 
82  QList<int> searchColumns() const;
83 
90  bool keepParentsVisible() const;
91 
98  K3ListView *listView() const;
99 
106  const QList<K3ListView *> &listViews() const;
107 
108 public Q_SLOTS:
115  void addListView(K3ListView *lv);
116 
124  void removeListView(K3ListView *lv);
125 
130  virtual void updateSearch(const QString &s = QString());
131 
137  void setCaseSensitive(bool cs);
138 
149  void setKeepParentsVisible(bool v);
150 
160  void setSearchColumns(const QList<int> &columns);
161 
169  void setListView(K3ListView *lv);
170 
178  void setListViews(const QList<K3ListView *> &lv);
179 
180 
181  protected:
182 
188  virtual bool itemMatches(const Q3ListViewItem *item, const QString &s) const;
189 
193  virtual void contextMenuEvent( QContextMenuEvent*e );
194 
199  virtual void updateSearch(K3ListView *listView);
200 
205  virtual void connectListView(K3ListView *);
209  virtual void disconnectListView(K3ListView *);
210 
225  virtual bool canChooseColumnsCheck();
226 
227 protected Q_SLOTS:
241  void queueSearch(const QString &search);
242 
251  void activateSearch();
252 
253 private:
254 
261  void checkColumns();
262 
267  void checkItemParentsNotVisible(K3ListView *listView);
268 
274  bool checkItemParentsVisible(Q3ListViewItem *item, Q3ListViewItem *highestHiddenParent = 0);
275 
276 private Q_SLOTS:
277  void itemAdded(Q3ListViewItem *item) const;
278  void listViewDeleted( QObject *listView );
279  void searchColumnsMenuActivated(QAction*);
280 
281 private:
282  class K3ListViewSearchLinePrivate;
283  K3ListViewSearchLinePrivate *d;
284 };
285 
290 class KDE3SUPPORT_EXPORT K3ListViewSearchLineWidget : public KHBox
291 {
292  Q_OBJECT
293 
294 public:
299  K3ListViewSearchLineWidget(K3ListView *listView = 0, QWidget *parent = 0);
300 
304  ~K3ListViewSearchLineWidget();
305 
310  virtual K3ListViewSearchLine *createSearchLine(K3ListView *listView);
311 
315  K3ListViewSearchLine *searchLine() const;
316 
317 protected Q_SLOTS:
324  virtual void createWidgets();
325 
326 private:
327  class K3ListViewSearchLineWidgetPrivate;
328  K3ListViewSearchLineWidgetPrivate *d;
329 };
330 
331 #endif
QWidget
KLineEdit::contextMenuEvent
virtual void contextMenuEvent(QContextMenuEvent *)
Q3ListViewItem
K3ListViewSearchLineWidget
Creates a widget featuring a K3ListViewSearchLine, a label with the text "Search" and a button to cle...
Definition: k3listviewsearchline.h:290
kde3support_export.h
QContextMenuEvent
QObject
QString
QList< K3ListView * >
K3ListView
This Widget extends the functionality of Q3ListView to honor the system wide settings for Single Clic...
Definition: k3listview.h:57
K3ListViewSearchLine
This class makes it easy to add a search line for filtering the items in listviews based on a simple ...
Definition: k3listviewsearchline.h:38
KLineEdit
QAction
khbox.h
klineedit.h
KHBox
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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