| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kcompletionbox.h

    00001 /* This file is part of the KDE libraries
    00002
    00003    Copyright (c) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
    00004                  2000 Stefan Schimanski <1Stein@gmx.de>
    00005                  2000,2001,2002,2003,2004 Dawit Alemayehu <adawit@kde.org>
    00006
    00007    This library is free software; you can redistribute it and/or
    00008    modify it under the terms of the GNU Library General Public
    00009    License (LGPL) as published by the Free Software Foundation; either
    00010    version 2 of the License, or (at your option) any later version.
    00011
    00012    This library is distributed in the hope that it will be useful,
    00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015    Library General Public License for more details.
    00016
    00017    You should have received a copy of the GNU Library General Public License
    00018    along with this library; see the file COPYING.LIB.  If not, write to
    00019    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020    Boston, MA 02111-1307, USA.
    00021 */
    00022
    00023 #ifndef KCOMPLETIONBOX_H
    00024 #define KCOMPLETIONBOX_H
    00025
    00026 class QEvent;
    00027 #include <qstringlist.h>
    00028 #include <klistbox.h>
    00029
    00043 class KDEUI_EXPORT KCompletionBox : public KListBox
    00044 {
    00045     Q_OBJECT
    00046     Q_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
    00047     Q_PROPERTY(QString cancelledText READ cancelledText WRITE setCancelledText)
    00048     Q_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect )
    00049
    00050 public:
    00057     KCompletionBox( QWidget *parent, const char *name = 0 );
    00058
    00062     ~KCompletionBox();
    00063
    00064     virtual QSize sizeHint() const;
    00065
    00071     bool activateOnSelect() const;
    00072
    00073 public slots:
    00077     QStringList items() const;
    00078
    00084     void insertItems( const QStringList& items, int index = -1 );
    00085
    00089     void setItems( const QStringList& items );
    00090
    00102     virtual void popup();
    00103
    00113     void setTabHandling( bool enable );
    00114
    00123     bool isTabHandling() const;
    00124
    00135     void setCancelledText( const QString& txt);
    00136
    00140     QString cancelledText() const;
    00141
    00149     void setActivateOnSelect(bool state);
    00150
    00151
    00155     void down();
    00156
    00160     void up();
    00161
    00165     void pageDown();
    00166
    00170     void pageUp();
    00171
    00175     void home();
    00176
    00180     void end();
    00181
    00185     virtual void show();
    00186
    00190     virtual void hide();
    00191
    00192 signals:
    00197     void activated( const QString& );
    00198
    00203     void userCancelled( const QString& );
    00204
    00205 protected:
    00211     QRect calculateGeometry() const;
    00212
    00216     void sizeAndPosition();
    00217
    00222     virtual bool eventFilter( QObject *, QEvent * );
    00223
    00224 protected slots:
    00229     virtual void slotActivated( QListBoxItem * );
    00230
    00231 private slots:
    00232     void slotSetCurrentItem( QListBoxItem *i ) { setCurrentItem( i ); } // grrr
    00233     void slotCurrentChanged();
    00234     void canceled();
    00235     void slotItemClicked( QListBoxItem * );
    00236
    00237 protected:
    00238     virtual void virtual_hook( int id, void* data );
    00239
    00240 private:
    00241     class KCompletionBoxPrivate;
    00242     KCompletionBoxPrivate* const d;
    00243 };
    00244
    00245
    00246 #endif // KCOMPLETIONBOX_H

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:14 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003