• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | List of all members
KTipDatabase Class Reference

#include <ktip.h>

Public Member Functions

 KTipDatabase (const QString &tipFile=QString())
 
 KTipDatabase (const QStringList &tipFiles)
 
 ~KTipDatabase ()
 
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.

ktip.png
KDE Tip-of-the-Day Dialog
Author
Matthias Hoelzer-Kluepfel mhk@k.nosp@m.de.o.nosp@m.rg

Definition at line 53 of file ktip.h.

Constructor & Destructor Documentation

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.

Definition at line 115 of file ktip.cpp.

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

Definition at line 129 of file ktip.cpp.

KTipDatabase::~KTipDatabase ( )

Definition at line 143 of file ktip.cpp.

Member Function Documentation

void KTipDatabase::nextTip ( )

The next tip will become the current one.

Definition at line 148 of file ktip.cpp.

void KTipDatabase::prevTip ( )

The previous tip will become the current one.

Definition at line 159 of file ktip.cpp.

QString KTipDatabase::tip ( ) const

Returns the current tip.

Definition at line 170 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 KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal