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

KDEUI

khistorycombobox.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002 
00003    Copyright (c) 2000,2001 Dawit Alemayehu <adawit@kde.org>
00004    Copyright (c) 2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License (LGPL) as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KHistoryComboBoxBOX_H
00023 #define KHistoryComboBoxBOX_H
00024 
00025 #include <kcombobox.h>
00026 
00027 class KPixmapProvider;
00028 
00046 class KDEUI_EXPORT KHistoryComboBox : public KComboBox
00047 {
00048     Q_OBJECT
00049     Q_PROPERTY( QStringList historyItems READ historyItems WRITE setHistoryItems )
00050 
00051 public:
00070     explicit KHistoryComboBox( QWidget *parent = 0 );
00071 
00078     explicit KHistoryComboBox( bool useCompletion, QWidget *parent = 0 );
00079 
00083     ~KHistoryComboBox();
00084 
00091     void setHistoryItems( const QStringList &items );
00092 
00136     void setHistoryItems( const QStringList &items, bool setCompletionList );
00137 
00144     QStringList historyItems() const;
00145 
00153     bool removeFromHistory( const QString& item );
00154 
00167     void setPixmapProvider( KPixmapProvider *prov );
00168 
00174     KPixmapProvider * pixmapProvider() const;
00175 
00180     void reset();
00181 
00182     using QComboBox::insertItems;
00183 
00184 public Q_SLOTS:
00204     void addToHistory( const QString& item );
00205 
00209     void clearHistory();
00210 
00211 Q_SIGNALS:
00215     void cleared();
00216 
00217 protected:
00221     virtual void keyPressEvent( QKeyEvent * );
00222 
00226     virtual void wheelEvent( QWheelEvent *ev );
00227 
00236     void insertItems( const QStringList& items );
00237 
00241     bool useCompletion() const;
00242 
00243 private Q_SLOTS:
00247     void slotReset();
00248 
00253     void slotClear();
00254 
00258     void addContextMenuItems( QMenu* );
00259 
00263     void slotSimulateActivated( const QString& );
00264 
00265 private:
00266     void init( bool useCompletion );
00267     void rotateUp();
00268     void rotateDown();
00269 
00270 private:
00271     class Private;
00272     friend class Private;
00273     Private* const d;
00274 
00275     Q_DISABLE_COPY(KHistoryComboBox)
00276 };
00277 
00278 
00279 #endif
00280 

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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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