class KHistoryCombo

A combobox for offering a history and completion. More...

Definition#include <kcombobox.h>
InheritsKComboBox
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Slots

Signals

Protected Methods


Detailed Description

A combobox which implements a history like a unix shell. You can navigate through all the items by using the Up or Down arrows (configurable of course). Additionally, weighted completion is available. So you should load and save the completion list to preserve the weighting between sessions.

void  addToHistory ( const QString& item )

[slot]

Adds an item to the end of the history list and to the completion list. If maxCount() is reached, the first item of the list will be removed.

If the last inserted item is the same as item, it will not be inserted again.

If duplicatesEnabled() is false, any equal existing item will be removed before item is added.

Note: By using this method and not the Q and KComboBox insertItem() methods, you make sure that the combobox stays in sync with the completion. It would be annoying if completion would give an item not in the combobox, and vice versa.

See also: removeFromHistory, QComboBox::setDuplicatesEnabled

void  clearHistory ()

[slot]

Clears the history and the completion list.

void  cleared ()

[signal]

Emitted when the history was cleared by the entry in the popup menu.

void  keyPressEvent ( QKeyEvent * )

[protected virtual]

Handling key-events, the shortcuts to rotate the items.

Reimplemented from KComboBox

void  insertItems ( const QStringList& items )

[protected]

Inserts items into the combo, honouring pixmapProvider() Does not update the completionObject.

Note: duplicatesEnabled() is not honored here.

Called from setHistoryItems() and setPixmapProvider()

bool  useCompletion ()

[protected]

Returns: if we can modify the completion object or not.