# class HistoryProvider

###

Module | kparts
Namespace | KParts
Class | HistoryProvider
Inherits | QObject

Basic class to manage a history of "items". This class is only meant for fast lookup, if an item is in the history or not.

May be subclassed to implement a persistent history for example. For usage with khtml, just create your provider and call the HistoryProvider constructor _before_ you do any khtml stuff. That way, khtml, using the self()-method, will use your subclassed provider.

Author Carsten Pfeiffer <pfeiffer@kde.org>

### methods

- HistoryProvider (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Creates a KHistoryProvider with an optional parent and name

- HistoryProvider ( )

  returns dtor

  Destroys the provider.

- clear ( )

  returns Nothing

  Clears the history. The cleared() signal is emitted after clearing.

- cleared ( )

  returns Nothing
  SIGNAL ("cleared ()")

  Emitted after the history has been cleared.

- contains (item)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  item | QString |

  Returns true if item is present in the history.

- insert (item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  item | QString |

  Inserts item into the history.

- inserted (item)

  returns Nothing
  SIGNAL ("inserted (const QString&)")

  Argument | Type | Default
  --- | --- | ---
  item | QString |

  Emitted after the item has been inserted

- remove (item)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  item | QString |

  Removes item from the history.

- self ( )

  returns KParts.HistoryProvider
  static

- updated (items)

  returns Nothing
  SIGNAL ("updated (const QStringList&)")

  Argument | Type | Default
  --- | --- | ---
  items | QStringList |

  This signal is never emitted from this class, it is only meant as an interface for subclasses. Emit this signal to notify others that the history has changed. Put those items that were added or removed from the history into items.