KDEUI
khistorycombobox.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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