summaryrefslogtreecommitdiffstats
path: root/kdeui/kcombobox.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui/kcombobox.h')
-rw-r--r--kdeui/kcombobox.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/kdeui/kcombobox.h b/kdeui/kcombobox.h
index 4a9c30b14..d7d07e4b6 100644
--- a/kdeui/kcombobox.h
+++ b/kdeui/kcombobox.h
@@ -24,8 +24,15 @@
#include <tqlineedit.h>
#include <tqcombobox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqheader.h>
#include <kcompletion.h>
+#include <kdialogbase.h>
+#include <klistview.h>
class TQListBoxItem;
class TQPopupMenu;
@@ -669,6 +676,12 @@ public:
*/
void reset() { slotReset(); }
+ /**
+ * When enabling it you have to connect to "removed" signal and save changes
+ */
+ void setHistoryEditorEnabled( bool enable );
+ bool isHistoryEditorEnabled() const;
+
public slots:
/**
* Adds an item to the end of the history list and to the completion list.
@@ -702,6 +715,8 @@ signals:
*/
void cleared();
+ void removed( const TQString& item );
+
protected:
/**
* Handling key-events, the shortcuts to rotate the items.
@@ -741,10 +756,17 @@ private slots:
void slotClear();
/**
+ * Called from the popupmenu,
+ */
+ void slotEdit();
+
+ /**
* Appends our own context menu entry.
*/
void addContextMenuItems( TQPopupMenu* );
+ void slotRemoveFromHistory( const TQString & );
+
private:
void init( bool useCompletion );
void rotateUp();
@@ -774,6 +796,30 @@ private:
KHistoryComboPrivate* const d;
};
+class KDEUI_EXPORT KHistoryComboEditor : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KHistoryComboEditor( const TQStringList& entries, TQWidget *parent = 0L );
+ ~KHistoryComboEditor();
+
+signals:
+ void removeFromHistory( const TQString& );
+
+protected slots:
+ virtual void slotUser1(); // User1 is "Delete Entry" button
+ void slotSelectionChanged( TQListViewItem * item );
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+
+private:
+ KListView *m_pListView;
+
+ class KHistoryComboEditorPrivate;
+ KHistoryComboEditorPrivate* const d;
+};
#endif