KTipDatabase
#include <ktipdialog.h>
Public Member Functions | |
KTipDatabase (const QString &tipFile=QString()) | |
KTipDatabase (const QStringList &tipFiles) | |
void | nextTip () |
void | prevTip () |
QString | tip () const |
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.

- Deprecated:
- Since 5.83, write the information to the handbook instead
Definition at line 41 of file ktipdialog.h.
Constructor & Destructor Documentation
◆ KTipDatabase() [1/2]
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.
- Deprecated:
- Since 5.83, write the information to the handbook instead
Definition at line 104 of file ktipdialog.cpp.
◆ KTipDatabase() [2/2]
|
explicit |
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
- Deprecated:
- Since 5.83, write the information to the handbook instead
Definition at line 120 of file ktipdialog.cpp.
Member Function Documentation
◆ nextTip()
void KTipDatabase::nextTip | ( | ) |
The next tip will become the current one.
Definition at line 138 of file ktipdialog.cpp.
◆ prevTip()
void KTipDatabase::prevTip | ( | ) |
The previous tip will become the current one.
Definition at line 151 of file ktipdialog.cpp.
◆ tip()
QString KTipDatabase::tip | ( | ) | const |
Returns the current tip.
Definition at line 164 of file ktipdialog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:49:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.