# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# 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 #include <qhbox.h>
    00024
    00025 class KListView;
    00026 class QListViewItem;
    00027 class QToolButton;
    00028
    00039 class KDEUI_EXPORT KListViewSearchLine : public KLineEdit
    00040 {
    00041     Q_OBJECT
    00042
    00043 public:
    00044
    00052     KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0);
    00053
    00058     KListViewSearchLine(QWidget *parent, const char *name);
    00059
    00063     virtual ~KListViewSearchLine();
    00064
    00070     bool caseSensitive() const;
    00071
    00078     QValueList<int> searchColumns() const;
    00079
    00086     bool keepParentsVisible() const;
    00087
    00093     KListView *listView() const;
    00094
    00095 public slots:
    00100     virtual void updateSearch(const QString &s = QString::null);
    00101
    00107     void setCaseSensitive(bool cs);
    00108
    00119     void setKeepParentsVisible(bool v);
    00120
    00128     void setSearchColumns(const QValueList<int> &columns);
    00129
    00136     void setListView(KListView *lv);
    00137
    00138 protected:
    00139
    00145     virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
    00146
    00152     virtual QPopupMenu *createPopupMenu();
    00153
    00154 protected slots:
    00168     void queueSearch(const QString &search);
    00169
    00178     void activateSearch();
    00179
    00180 private:
    00181
    00186     void checkItemParentsNotVisible();
    00187
    00193     bool checkItemParentsVisible(QListViewItem *item);
    00194
    00195 private slots:
    00196     void itemAdded(QListViewItem *item) const;
    00197     void listViewDeleted();
    00198     void searchColumnsMenuActivated(int);
    00199
    00200 private:
    00201     class KListViewSearchLinePrivate;
    00202     KListViewSearchLinePrivate *d;
    00203 };
    00204
    00211 class KDEUI_EXPORT KListViewSearchLineWidget : public QHBox
    00212 {
    00213     Q_OBJECT
    00214
    00215 public:
    00220     KListViewSearchLineWidget(KListView *listView = 0, QWidget *parent = 0,
    00221                               const char *name = 0);
    00222
    00226     ~KListViewSearchLineWidget();
    00227
    00232     virtual KListViewSearchLine *createSearchLine(KListView *listView);
    00233
    00237     KListViewSearchLine *searchLine() const;
    00238
    00239 protected slots:
    00246     virtual void createWidgets();
    00247
    00248 private slots:
    00249     void positionInToolBar();
    00250
    00251 private:
    00252     class KListViewSearchLineWidgetPrivate;
    00253     KListViewSearchLineWidgetPrivate *d;
    00254 };
    00255
    00256 #endif

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:18 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003