kdeui Library API Documentation

klistviewsearchline.h

00001 /* This file is part of the KDE libraries
00002    Copyright (c) 2003 Scott Wheeler <wheeler@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00016    Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifndef KLISTVIEWSEARCHLINE_H
00020 #define KLISTVIEWSEARCHLINE_H
00021 
00022 #include <klineedit.h>
00023 
00024 class KListView;
00025 class QListViewItem;
00026 
00037 class KListViewSearchLine : public KLineEdit
00038 {
00039     Q_OBJECT
00040 
00041 public:
00042 
00050     KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0);
00051 
00056     KListViewSearchLine(QWidget *parent, const char *name);
00057 
00061     virtual ~KListViewSearchLine();
00062 
00068     bool caseSensitive() const;
00069 
00076     QValueList<int> searchColumns() const;
00077 
00084     bool keepParentsVisible() const;
00085 
00091     KListView *listView() const;
00092 
00093 public slots:
00098     virtual void updateSearch(const QString &s = QString::null);
00099 
00105     void setCaseSensitive(bool cs);
00106 
00117     void setKeepParentsVisible(bool v);
00118 
00125     void setSearchColumns(const QValueList<int> &columns);
00126 
00133     void setListView(KListView *lv);
00134 
00135 protected:
00136 
00142     virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
00143 
00149     virtual QPopupMenu *createPopupMenu();
00150 
00151 protected slots:
00165     void queueSearch(const QString &search);
00166 
00175     void activateSearch();
00176 
00177 private:
00178 
00183     void checkItemParentsNotVisible();
00184 
00190     bool checkItemParentsVisible(QListViewItem *item);
00191 
00192 private slots:
00193     void itemAdded(QListViewItem *item) const;
00194     void listViewDeleted();
00195     void searchColumnsMenuActivated(int);
00196 
00197 private:
00198     class KListViewSearchLinePrivate;
00199     KListViewSearchLinePrivate *d;
00200 };
00201 
00202 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jan 22 16:45:13 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003