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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • widgets
kcompletionbox.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2 
3  Copyright (c) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
4  2000 Stefan Schimanski <1Stein@gmx.de>
5  2000,2001,2002,2003,2004 Dawit Alemayehu <adawit@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License (LGPL) as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KCOMPLETIONBOX_H
24 #define KCOMPLETIONBOX_H
25 
26 #include <klistwidget.h>
27 
28 class QEvent;
29 
43 class KDEUI_EXPORT KCompletionBox : public KListWidget
44 {
45  Q_OBJECT
46  Q_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
47  Q_PROPERTY(QString cancelledText READ cancelledText WRITE setCancelledText)
48  Q_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect )
49 
50 public:
57  explicit KCompletionBox( QWidget *parent = 0 );
58 
62  ~KCompletionBox();
63 
64  virtual QSize sizeHint() const;
65 
69  bool activateOnSelect() const;
70 
71 public Q_SLOTS:
75  QStringList items() const;
76 
82  void insertItems( const QStringList& items, int index = -1 );
83 
87  void setItems( const QStringList& items );
88 
100  virtual void popup();
101 
112  void setTabHandling( bool enable );
113 
122  bool isTabHandling() const;
123 
134  void setCancelledText( const QString& txt);
135 
139  QString cancelledText() const;
140 
147  void setActivateOnSelect(bool state);
148 
149 
153  void down();
154 
158  void up();
159 
163  void pageDown();
164 
168  void pageUp();
169 
173  void home();
174 
178  void end();
179 
184  virtual void setVisible( bool visible );
185 
186 Q_SIGNALS:
191  void activated( const QString& );
192 
197  void userCancelled( const QString& );
198 
199 protected:
205  QRect calculateGeometry() const;
206 
210  void sizeAndPosition();
211 
216  virtual bool eventFilter( QObject *, QEvent * );
217 
222  virtual QPoint globalPositionHint() const;
223 
224 protected Q_SLOTS:
229  virtual void slotActivated( QListWidgetItem * );
230 
231 private Q_SLOTS:
232  void canceled();
233  void slotItemClicked( QListWidgetItem * );
234 
235 private:
236  class KCompletionBoxPrivate;
237  KCompletionBoxPrivate* const d;
238 };
239 
240 
241 #endif // KCOMPLETIONBOX_H
QEvent
QWidget
KCompletionBox
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
Definition: kcompletionbox.h:43
QListWidgetItem
QPoint
QRect
QObject
KStandardAction::up
KAction * up(const QObject *recvr, const char *slot, QObject *parent)
Move up (web style menu).
Definition: kstandardaction.cpp:389
KStandardAction::home
KAction * home(const QObject *recvr, const char *slot, QObject *parent)
Go to the "Home" position or document.
Definition: kstandardaction.cpp:404
QString
QStringList
QSize
KListWidget
A variant of QListWidget that honors KDE's system-wide settings.
Definition: klistwidget.h:40
klistwidget.h
KStandardShortcut::end
const KShortcut & end()
Goto end of the document.
Definition: kstandardshortcut.cpp:348
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal