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 public Q_SLOTS:
00202 void addToHistory( const QString& item );
00203
00207 void clearHistory();
00208
00209 Q_SIGNALS:
00213 void cleared();
00214
00215 protected:
00219 virtual void keyPressEvent( QKeyEvent * );
00220
00224 virtual void wheelEvent( QWheelEvent *ev );
00225
00234 void insertItems( const QStringList& items );
00235
00239 bool useCompletion() const;
00240
00241 private Q_SLOTS:
00245 void slotReset();
00246
00251 void slotClear();
00252
00256 void addContextMenuItems( QMenu* );
00257
00261 void slotSimulateActivated( const QString& );
00262
00263 private:
00264 void init( bool useCompletion );
00265 void rotateUp();
00266 void rotateDown();
00267
00268 private:
00269 class Private;
00270 friend class Private;
00271 Private* const d;
00272
00273 Q_DISABLE_COPY(KHistoryComboBox)
00274 };
00275
00276
00277 #endif
00278