KTipDatabase class Reference (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KTipDatabase Class Reference

A database for tips-of-the-day. More...

`#include <ktip.h>`

Collaboration diagram for KTipDatabase:

[legend]
List of all members.

## Public Member Functions
| KTipDatabase (const QString &tipFile=QString::null)
| The constructor.
QString | tip () const
| Returns the current tip.
void | nextTip ()
| The next tip will become the current one.
void | prevTip ()
| The previous tip will become the current one.

## Detailed Description

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@caldera.de>

Definition at line 54 of file ktip.h.

## Constructor & Destructor Documentation

KTipDatabase::KTipDatabase | ( | const QString & | tipFile = QString::null | ) |

  | The constructor. This 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. Parameters:
  tipFile | The name of the tips file.
Definition at line 53 of file ktip.cpp. References QString::fromLatin1(), KGlobal::instance(), and QString::isEmpty().

## Member Function Documentation

QString KTipDatabase::tip | ( |  | ) | const

| Returns the current tip. Definition at line 122 of file ktip.cpp.

void KTipDatabase::nextTip | ( |  | ) |

| The next tip will become the current one. Definition at line 102 of file ktip.cpp.

void KTipDatabase::prevTip | ( |  | ) |

| The previous tip will become the current one. Definition at line 112 of file ktip.cpp.

The documentation for this class was generated from the following files:

- ktip.h
- ktip.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:04:55 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001