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

KDEUI

kcompletionbox.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00020    Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef KCOMPLETIONBOX_H
00024 #define KCOMPLETIONBOX_H
00025 
00026 #include <klistwidget.h>
00027 
00028 class QEvent;
00029 
00043 class KDEUI_EXPORT KCompletionBox : public KListWidget
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     explicit KCompletionBox( QWidget *parent = 0 );
00058 
00062     ~KCompletionBox();
00063 
00064     virtual QSize sizeHint() const;
00065 
00069     bool activateOnSelect() const;
00070 
00071 public Q_SLOTS:
00075     QStringList items() const;
00076 
00082     void insertItems( const QStringList& items, int index = -1 );
00083 
00087     void setItems( const QStringList& items );
00088 
00100     virtual void popup();
00101 
00112     void setTabHandling( bool enable );
00113 
00122     bool isTabHandling() const;
00123 
00134     void setCancelledText( const QString& txt);
00135 
00139     QString cancelledText() const;
00140 
00147     void setActivateOnSelect(bool state);
00148 
00149 
00153     void down();
00154 
00158     void up();
00159 
00163     void pageDown();
00164 
00168     void pageUp();
00169 
00173     void home();
00174 
00178     void end();
00179 
00183     virtual void setVisible( bool visible );
00184 
00185 Q_SIGNALS:
00190     void activated( const QString& );
00191 
00196     void userCancelled( const QString& );
00197 
00198 protected:
00204     QRect calculateGeometry() const;
00205 
00209     void sizeAndPosition();
00210 
00215     virtual bool eventFilter( QObject *, QEvent * );
00216 
00221     virtual QPoint globalPositionHint() const;
00222 
00223 protected Q_SLOTS:
00228     virtual void slotActivated( QListWidgetItem * );
00229 
00230 private Q_SLOTS:
00231     void slotSetCurrentItem( QListWidgetItem *i ); // grrr
00232     void slotCurrentChanged();
00233     void canceled();
00234     void slotItemClicked( QListWidgetItem * );
00235 
00236 private:
00237     class KCompletionBoxPrivate;
00238     KCompletionBoxPrivate* const d;
00239 };
00240 
00241 
00242 #endif // KCOMPLETIONBOX_H

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal