KTipDatabase

Search for usage in LXR

KTipDatabase Class Reference

#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.

KDE Tip-of-the-Day Dialog
Author
Matthias Hoelzer-Kluepfel mhk@k.nosp@m.de.o.nosp@m.rg
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]

KTipDatabase::KTipDatabase ( const QString tipFile = QString())
explicit

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
tipFileThe 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]

KTipDatabase::KTipDatabase ( const QStringList tipFiles)
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
tipFilesA 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:
This file is part of the KDE documentation.
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.