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

KDEUI

  • 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
27class KPixmapProvider;
28
48class KDEUI_EXPORT KHistoryComboBox : public KComboBox
49{
50 Q_OBJECT
51 Q_PROPERTY( QStringList historyItems READ historyItems WRITE setHistoryItems )
52
53public:
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
186public Q_SLOTS:
206 void addToHistory( const QString& item );
207
211 void clearHistory();
212
213Q_SIGNALS:
217 void cleared();
218
219protected:
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
245private Q_SLOTS:
249 void slotReset();
250
255 void slotClear();
256
260 void addContextMenuItems( QMenu* );
261
265 void slotSimulateActivated( const QString& );
266
267private:
268 void init( bool useCompletion );
269 void rotateUp();
270 void rotateDown();
271
272private:
273 class Private;
274 friend class Private;
275 Private* const d;
276
277 Q_DISABLE_COPY(KHistoryComboBox)
278};
279
280
281#endif
282
KComboBox
An enhanced combo box.
Definition: kcombobox.h:149
KHistoryComboBox
A combobox for offering a history and completion.
Definition: khistorycombobox.h:49
KHistoryComboBox::cleared
void cleared()
Emitted when the history was cleared by the entry in the popup menu.
KPixmapProvider
A tiny abstract class with just one method: pixmapFor()
Definition: kpixmapprovider.h:39
QMenu
QWidget
kcombobox.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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