• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Member Functions | List of all members
KTipDatabase Class Reference

#include <ktip.h>

Public Member Functions

 KTipDatabase (const TQString &tipFile=TQString::null)
 
 KTipDatabase (const TQStringList &tipFiles)
 
TQString tip () const
 
void nextTip ()
 
void prevTip ()
 

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@k.nosp@m.de.o.nosp@m.rg

Definition at line 55 of file ktip.h.

Constructor & Destructor Documentation

◆ KTipDatabase() [1/2]

KTipDatabase::KTipDatabase ( const TQString &  tipFile = TQString::null)

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.

Definition at line 58 of file ktip.cpp.

◆ KTipDatabase() [2/2]

KTipDatabase::KTipDatabase ( const TQStringList &  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
tipFilesA list of absolute paths to the tips file

Definition at line 71 of file ktip.cpp.

Member Function Documentation

◆ nextTip()

void KTipDatabase::nextTip ( )

The next tip will become the current one.

Definition at line 141 of file ktip.cpp.

◆ prevTip()

void KTipDatabase::prevTip ( )

The previous tip will become the current one.

Definition at line 151 of file ktip.cpp.

◆ tip()

TQString KTipDatabase::tip ( ) const

Returns the current tip.

Definition at line 161 of file ktip.cpp.


The documentation for this class was generated from the following files:
  • ktip.h
  • ktip.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.