\section{KTip\-Dialog Class Reference}
\label{classKTipDialog}\index{KTipDialog@{KTipDialog}}
A Tip-of-the-Day dialog.  


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

Inheritance diagram for KTip\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=50pt]{classKTipDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTip\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=237pt]{classKTipDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTip\-Dialog} ({\bf KTip\-Database} $\ast$db, {\bf QWidget} $\ast$parent=0, const char $\ast$name=0)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf show\-Tip} ({\bf QWidget} $\ast$parent, const {\bf QString} \&tip\-File=QString::null, bool force=false)
\item 
static void {\bf show\-Multi\-Tip} ({\bf QWidget} $\ast$parent, const {\bf QString\-List} \&tip\-Files, bool force=false)
\item 
static void {\bf show\-Tip} (const {\bf QString} \&tip\-File=QString::null, bool force=false)
\item 
static void {\bf set\-Show\-On\-Start} (bool {\bf show})
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
bool {\bf event\-Filter} ({\bf QObject} $\ast$, {\bf QEvent} $\ast$)\label{classKTipDialog_b0}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKTipDialog_b1}

\end{CompactItemize}


\subsection{Detailed Description}
A Tip-of-the-Day dialog. 

This dialog class presents a tip-of-the-day.

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




Definition at line 108 of file ktip.h.

\subsection{Constructor \& Destructor Documentation}
\index{KTipDialog@{KTip\-Dialog}!KTipDialog@{KTipDialog}}
\index{KTipDialog@{KTipDialog}!KTipDialog@{KTip\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTip\-Dialog::KTip\-Dialog ({\bf KTip\-Database} $\ast$ {\em db}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKTipDialog_a0}


Construct a tip dialog. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em db}]Tip\-Database that should be used by the Tip\-Dialog. \item[{\em parent}]Parent widget of Tip\-Dialog. \item[{\em name}]The object name. \end{description}
\end{Desc}


Definition at line 168 of file ktip.cpp.

References QDialog::accept(), KGlobal\-Settings::active\-Title\-Color(), KGlobal\-Settings::alternate\-Background\-Color(), KIcon\-Effect::colorize(), KGlobal::dirs(), QSize::height(), QRect::height(), QStyle\-Sheet::item(), locate(), KDialog::margin\-Hint(), QImage::pixel(), KStandard\-Dirs::resource\-Dirs(), QLabel::set\-Alignment(), KDialog::set\-Caption(), QCheck\-Box::set\-Checked(), QPalette::set\-Color(), QPush\-Button::set\-Default(), QLabel::set\-Font(), QStyle\-Sheet\-Item::set\-Font\-Weight(), QColor::set\-Hsv(), QLabel::set\-Pixmap(), QHBox::set\-Spacing(), KPush\-Button::set\-Text(), QLabel::set\-Text(), KDialog::spacing\-Hint(), KGlobal\-Settings::splash\-Screen\-Desktop\-Geometry(), KGlobal\-Settings::text\-Color(), QSize::width(), QRect::width(), QRect::x(), and QRect::y().

Referenced by show\-Multi\-Tip().

\subsection{Member Function Documentation}
\index{KTipDialog@{KTip\-Dialog}!showTip@{showTip}}
\index{showTip@{showTip}!KTipDialog@{KTip\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Dialog::show\-Tip ({\bf QWidget} $\ast$ {\em parent}, const {\bf QString} \& {\em tip\-File} = {\tt QString::null}, bool {\em force} = {\tt false})\hspace{0.3cm}{\tt  [static]}}\label{classKTipDialog_e0}


Shows a tip. 

This static method is all that is needed to add a tip-of-the-day dialog to an application. It will pop up the dialog, unless the user has asked that the dialog does not pop up on startup.

Note that you probably want an item in the help menu calling this method with force=true.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent widget of Tip\-Dialog. \item[{\em tip\-File}]The name of the tip file. It has be relative to the \char`\"{}data\char`\"{} resource of {\bf KStandard\-Dirs} \item[{\em force}]If true, the dialog is show, even when the users disabled it. \end{description}
\end{Desc}


Definition at line 324 of file ktip.cpp.

References show\-Multi\-Tip().

Referenced by show\-Tip().\index{KTipDialog@{KTip\-Dialog}!showMultiTip@{showMultiTip}}
\index{showMultiTip@{showMultiTip}!KTipDialog@{KTip\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Dialog::show\-Multi\-Tip ({\bf QWidget} $\ast$ {\em parent}, const {\bf QString\-List} \& {\em tip\-Files}, bool {\em force} = {\tt false})\hspace{0.3cm}{\tt  [static]}}\label{classKTipDialog_e1}


Shows a tip. 

This method behaves essentially as the one above, but expects a list of tips

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent widget of Tip\-Dialog. \item[{\em tip\-Files}]A List of tip files. Each has be relative to the \char`\"{}data\char`\"{} resource of {\bf KStandard\-Dirs} \item[{\em force}]If true, the dialog is show, even when the users disabled it. \end{description}
\end{Desc}


Definition at line 329 of file ktip.cpp.

References KTip\-Dialog(), m\-Tip\-On\-Start, QDate\-Time::secs\-To(), QCheck\-Box::set\-Checked(), and QDialog::show().

Referenced by show\-Tip().\index{KTipDialog@{KTip\-Dialog}!showTip@{showTip}}
\index{showTip@{showTip}!KTipDialog@{KTip\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Dialog::show\-Tip (const {\bf QString} \& {\em tip\-File} = {\tt QString::null}, bool {\em force} = {\tt false})\hspace{0.3cm}{\tt  [static]}}\label{classKTipDialog_e2}


Shows a tip. 

This methods calls {\bf show\-Tip()}{\rm (p.\,\pageref{classKTipDialog_e0})} with the applications main window as parent. 

Definition at line 319 of file ktip.cpp.

References show\-Tip().\index{KTipDialog@{KTip\-Dialog}!setShowOnStart@{setShowOnStart}}
\index{setShowOnStart@{setShowOnStart}!KTipDialog@{KTip\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTip\-Dialog::set\-Show\-On\-Start (bool {\em show})\hspace{0.3cm}{\tt  [static]}}\label{classKTipDialog_e3}


Toggles the start behavior. 

Normally, the user can disable the display of the tip in the dialog. This is just a way to change this setting from outside. 

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