org.kde.koala

Class KTipDatabase

public class KTipDatabase extends Object implements QtSupport

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 boolean 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

UNKNOWN: A database for tips-of-the-day.

Constructor Summary
protected KTipDatabase(Class dummy)
KTipDatabase(String tipFile)
This constructor reads in the tips from a file with the given name.
KTipDatabase()
KTipDatabase(String[] tipFiles)
This constructor takes a list of files that will be merged.
Method Summary
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
voidnextTip()
The next tip will become the current one.
voidprevTip()
The previous tip will become the current one.
Stringtip()
Returns the current tip.

Constructor Detail

KTipDatabase

protected KTipDatabase(Class dummy)

KTipDatabase

public KTipDatabase(String tipFile)
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.

Parameters: tipFile The absolute path to the tips file.

UNKNOWN: This constructor reads in the tips from a file with the given name.

KTipDatabase

public KTipDatabase()

KTipDatabase

public KTipDatabase(String[] tipFiles)
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.

Parameters: tipFiles A list of absolute paths to the tips file

UNKNOWN: This constructor takes a list of files that will be merged.

Method Detail

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

nextTip

public void nextTip()
The next tip will become the current one.

UNKNOWN: The next tip will become the current one.

prevTip

public void prevTip()
The previous tip will become the current one.

UNKNOWN: The previous tip will become the current one.

tip

public String tip()
Returns the current tip.

UNKNOWN: Returns the current tip.