\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=57pt]{classKTipDatabase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTip\-Database} (const {\bf QString} \&tip\-File=QString::null)
\item 
{\bf KTip\-Database} (const {\bf QString\-List} \&tip\-Files)
\item 
{\bf QString} {\bf tip} () const 
\item 
void {\bf next\-Tip} ()
\item 
void {\bf prev\-Tip} ()
\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@kde.org}$>$ \end{Desc}




Definition at line 55 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} = {\tt QString::null})}\label{classKTipDatabase_a0}


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.

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


Definition at line 55 of file ktip.cpp.

References QString::from\-Latin1(), and QString::is\-Empty().\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\-List} \& {\em tip\-Files})}\label{classKTipDatabase_a1}


This constructor takes a list of files that will be merged. 

This constructor essentially behaves like the one above. It returns when tip\-Files is empty.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em tip\-Files}]A list of absolute paths to the tips file \end{description}
\end{Desc}


Definition at line 68 of file ktip.cpp.

\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_a2}


Returns the current tip. 



Definition at line 158 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_a3}


The next tip will become the current one. 



Definition at line 138 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_a4}


The previous tip will become the current one. 



Definition at line 148 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}
