# class KTipDatabase

###

Module | kdeui
Namespace |
Class | KTipDatabase
Inherits |

A database for tips-of-the-day.

This class provides convenient access to a database containing tips of the day. The database is stored in a XML file and parsed when a KTipDatabase object is created.

Once the file is read in, you can access the tips to display them in the tip of the day dialog.

The state of the tipdialog is saved to the applications's config file in the group "TipOfDay" with a bool entry "RunOnStart". Check this value if you want to allow the user to enable/disable the tipdialog in the application's configuration dialog.

Author Matthias Hoelzer-Kluepfel <mhk@kde.org>

### methods

- KTipDatabase (tipFile)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  tipFile | QString | QString()

  This constructor reads in the tips from a file with the given name. If no name is given, a file called 'application-name/tips' will be loaded.

  tipFile - The absolute path to the tips file.

- KTipDatabase (tipFiles)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  tipFiles | QStringList |

  This constructor takes a list of files that will be merged. This constructor essentially behaves like the one above. It returns when tipFiles is empty.

  tipFiles - A list of absolute paths to the tips file

- KTipDatabase (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KTipDatabase |

- KTipDatabase (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString | QString()

- KTipDatabase (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QStringList |

- nextTip ( )

  returns Nothing

  The next tip will become the current one.

- prevTip ( )

  returns Nothing

  The previous tip will become the current one.

- tip ( )

  returns QString

  Returns the current tip.