\section{KTip\-Database Class Reference}
\label{classKTipDatabase}\index{KTipDatabase@{KTipDatabase}}
A database for tips-of-the-day.  


{\tt \#include $<$ktip.h$>$}

Collaboration diagram for KTip\-Database:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKTipDatabase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTip\-Database} (const  {\bf QString} \&tip\-File=QString::null)
\begin{CompactList}\small\item\em The constructor. \item\end{CompactList}\item 
{\bf QString} {\bf tip} () const 
\begin{CompactList}\small\item\em Returns the current tip. \item\end{CompactList}\item 
void {\bf next\-Tip} ()
\begin{CompactList}\small\item\em The next tip will become the current one. \item\end{CompactList}\item 
void {\bf prev\-Tip} ()
\begin{CompactList}\small\item\em The previous tip will become the current one. \item\end{CompactList}\end{CompactItemize}


\subsection{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 KTip\-Database 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 \char`\"{}Tip\-Of\-Day\char`\"{} with a bool entry \char`\"{}Run\-On\-Start\char`\"{}. Check this value if you want to allow the user to enable/disable the tipdialog in the application's configuration dialog.

\begin{Desc}
\item[Author:]Matthias Hoelzer-Kluepfel $<${\tt mhk@caldera.de}$>$ \end{Desc}




Definition at line 54 of file ktip.h.

\subsection{Constructor \& Destructor Documentation}
\index{KTipDatabase@{KTip\-Database}!KTipDatabase@{KTipDatabase}}
\index{KTipDatabase@{KTipDatabase}!KTipDatabase@{KTip\-Database}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTip\-Database::KTip\-Database (const {\bf QString} \& {\em tip\-File} = QString::null)}\label{classKTipDatabase_a0}


The constructor. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em tip\-File}]The name of the tips file. \end{description}
\end{Desc}


Definition at line 53 of file ktip.cpp.

References QString::from\-Latin1(), KGlobal::instance(), and QString::is\-Empty().

\subsection{Member Function Documentation}
\index{KTipDatabase@{KTip\-Database}!tip@{tip}}
\index{tip@{tip}!KTipDatabase@{KTip\-Database}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KTip\-Database::tip () const}\label{classKTipDatabase_a1}


Returns the current tip. 



Definition at line 122 of file ktip.cpp.\index{KTipDatabase@{KTip\-Database}!nextTip@{nextTip}}
\index{nextTip@{nextTip}!KTipDatabase@{KTip\-Database}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Database::next\-Tip ()}\label{classKTipDatabase_a2}


The next tip will become the current one. 



Definition at line 102 of file ktip.cpp.\index{KTipDatabase@{KTip\-Database}!prevTip@{prevTip}}
\index{prevTip@{prevTip}!KTipDatabase@{KTip\-Database}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Database::prev\-Tip ()}\label{classKTipDatabase_a3}


The previous tip will become the current one. 



Definition at line 112 of file ktip.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
ktip.h\item 
ktip.cpp\end{CompactItemize}
