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

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • widgets
khistorycombobox.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2 
3  Copyright (c) 2000,2001 Dawit Alemayehu <adawit@kde.org>
4  Copyright (c) 2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License (LGPL) as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KHistoryComboBoxBOX_H
23 #define KHistoryComboBoxBOX_H
24 
25 #include <kcombobox.h>
26 
27 class KPixmapProvider;
28 
48 class KDEUI_EXPORT KHistoryComboBox : public KComboBox
49 {
50  Q_OBJECT
51  Q_PROPERTY( QStringList historyItems READ historyItems WRITE setHistoryItems )
52 
53 public:
72  explicit KHistoryComboBox( QWidget *parent = 0 );
73 
80  explicit KHistoryComboBox( bool useCompletion, QWidget *parent = 0 );
81 
85  ~KHistoryComboBox();
86 
93  void setHistoryItems( const QStringList &items );
94 
138  void setHistoryItems( const QStringList &items, bool setCompletionList );
139 
146  QStringList historyItems() const;
147 
155  bool removeFromHistory( const QString& item );
156 
169  void setPixmapProvider( KPixmapProvider *prov );
170 
176  KPixmapProvider * pixmapProvider() const;
177 
182  void reset();
183 
184  using QComboBox::insertItems;
185 
186 public Q_SLOTS:
206  void addToHistory( const QString& item );
207 
211  void clearHistory();
212 
213 Q_SIGNALS:
217  void cleared();
218 
219 protected:
223  virtual void keyPressEvent( QKeyEvent * );
224 
228  virtual void wheelEvent( QWheelEvent *ev );
229 
238  void insertItems( const QStringList& items );
239 
243  bool useCompletion() const;
244 
245 private Q_SLOTS:
249  void slotReset();
250 
255  void slotClear();
256 
260  void addContextMenuItems( QMenu* );
261 
265  void slotSimulateActivated( const QString& );
266 
267 private:
268  void init( bool useCompletion );
269  void rotateUp();
270  void rotateDown();
271 
272 private:
273  class Private;
274  friend class Private;
275  Private* const d;
276 
277  Q_DISABLE_COPY(KHistoryComboBox)
278 };
279 
280 
281 #endif
282 
kcombobox.h
QWidget
QString
KHistoryComboBox
A combobox for offering a history and completion.
Definition: khistorycombobox.h:48
QStringList
QMenu
KComboBox
An enhanced combo box.
Definition: kcombobox.h:148
KStandardShortcut::rotateDown
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:367
KStandardGuiItem::reset
KGuiItem reset()
Returns the 'Reset' gui item.
Definition: kstandardguiitem.cpp:258
KStandardShortcut::rotateUp
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:366
KComboBox::wheelEvent
virtual void wheelEvent(QWheelEvent *ev)
Definition: kcombobox.cpp:260
KPixmapProvider
A tiny abstract class with just one method: pixmapFor()
Definition: kpixmapprovider.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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