kcompletionbox.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KCOMPLETIONBOX_H
00023 #define KCOMPLETIONBOX_H
00024
00025 class QEvent;
00026 #include <qstringlist.h>
00027 #include <klistbox.h>
00028
00042 class KDEUI_EXPORT KCompletionBox : public KListBox
00043 {
00044 Q_OBJECT
00045 Q_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
00046 Q_PROPERTY(QString cancelledText READ cancelledText WRITE setCancelledText)
00047
00048 public:
00055 KCompletionBox( QWidget *parent, const char *name = 0 );
00056
00060 ~KCompletionBox();
00061
00062 virtual QSize sizeHint() const;
00063
00064 public slots:
00068 QStringList items() const;
00069
00075 void insertItems( const QStringList& items, int index = -1 );
00076
00080 void setItems( const QStringList& items );
00081
00093 virtual void popup();
00094
00104 void setTabHandling( bool enable );
00105
00114 bool isTabHandling() const;
00115
00126 void setCancelledText( const QString& txt);
00127
00131 QString cancelledText() const;
00132
00136 void down();
00137
00141 void up();
00142
00146 void pageDown();
00147
00151 void pageUp();
00152
00156 void home();
00157
00161 void end();
00162
00166 virtual void show();
00167
00171 virtual void hide();
00172
00173 signals:
00178 void activated( const QString& );
00179
00184 void userCancelled( const QString& );
00185
00186 protected:
00192 QRect calculateGeometry() const;
00193
00197 void sizeAndPosition();
00198
00203 virtual bool eventFilter( QObject *, QEvent * );
00204
00205 protected slots:
00210 virtual void slotActivated( QListBoxItem * );
00211
00212 private slots:
00213 void slotSetCurrentItem( QListBoxItem *i ) { setCurrentItem( i ); }
00214 void slotCurrentChanged();
00215 void canceled();
00216 void slotItemClicked( QListBoxItem * );
00217
00218 protected:
00219 virtual void virtual_hook( int id, void* data );
00220
00221 private:
00222 class KCompletionBoxPrivate;
00223 KCompletionBoxPrivate* d;
00224 };
00225
00226
00227 #endif // KCOMPLETIONBOX_H
This file is part of the documentation for kdeui Library Version 3.3.90.