\section{KPopup\-Frame Class Reference}
\label{classKPopupFrame}\index{KPopupFrame@{KPopupFrame}}
Frame with popup menu behaviour.  


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

Inheritance diagram for KPopup\-Frame:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKPopupFrame__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KPopup\-Frame:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=83pt]{classKPopupFrame__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf close} (int r)
\begin{CompactList}\small\item\em Close the popup window. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KPopup\-Frame} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em The contructor. \item\end{CompactList}\item 
void {\bf set\-Main\-Widget} ({\bf QWidget} $\ast$m)
\begin{CompactList}\small\item\em Set the main widget. \item\end{CompactList}\item 
virtual void {\bf resize\-Event} ({\bf QResize\-Event} $\ast$)
\begin{CompactList}\small\item\em The resize event. \item\end{CompactList}\item 
void {\bf popup} (const  {\bf QPoint} \&pos)
\begin{CompactList}\small\item\em Open the popup window at position pos. \item\end{CompactList}\item 
int {\bf exec} ({\bf QPoint} p)
\begin{CompactList}\small\item\em Execute the popup window. \item\end{CompactList}\item 
int {\bf exec} (int x, int y)
\begin{CompactList}\small\item\em Dito. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf key\-Press\-Event} ({\bf QKey\-Event} $\ast$e)
\begin{CompactList}\small\item\em Catch key press events. \item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKPopupFrame_b1}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
int {\bf result}
\begin{CompactList}\small\item\em The result. \item\end{CompactList}\item 
{\bf QWidget} $\ast$ {\bf main}
\begin{CompactList}\small\item\em The only subwidget that uses the whole dialog window. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Frame with popup menu behaviour. 

\begin{Desc}
\item[Author:]Tim Gilman, Mirko Boehm \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kdatetbl.h}{\rm (p.\,\pageref{kdatetbl_8h})},v 1.31 2002/07/25 13:26:37 lukas Exp \end{Desc}
\end{Desc}




Definition at line 157 of file kdatetbl.h.

\subsection{Constructor \& Destructor Documentation}
\index{KPopupFrame@{KPopup\-Frame}!KPopupFrame@{KPopupFrame}}
\index{KPopupFrame@{KPopupFrame}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPopup\-Frame::KPopup\-Frame ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKPopupFrame_a0}


The contructor. 

Creates a dialog without buttons. 

Definition at line 688 of file kdatetbl.cpp.

References KStd\-Accel::name(), QFrame::set\-Frame\-Style(), and QFrame::set\-Mid\-Line\-Width().

\subsection{Member Function Documentation}
\index{KPopupFrame@{KPopup\-Frame}!keyPressEvent@{keyPressEvent}}
\index{keyPressEvent@{keyPressEvent}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPopup\-Frame::key\-Press\-Event ({\bf QKey\-Event} $\ast$ {\em e})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPopupFrame_b0}


Catch key press events. 



Definition at line 698 of file kdatetbl.cpp.

References QKey\-Event::key(), and result.\index{KPopupFrame@{KPopup\-Frame}!close@{close}}
\index{close@{close}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPopup\-Frame::close (int {\em r})\hspace{0.3cm}{\tt  [slot]}}\label{classKPopupFrame_i0}


Close the popup window. 

This is called from the main widget, usually. {\tt r} is the result returned from {\bf exec()}{\rm (p.\,\pageref{classKPopupFrame_a4})}. 

Definition at line 708 of file kdatetbl.cpp.

References result.\index{KPopupFrame@{KPopup\-Frame}!setMainWidget@{setMainWidget}}
\index{setMainWidget@{setMainWidget}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPopup\-Frame::set\-Main\-Widget ({\bf QWidget} $\ast$ {\em m})}\label{classKPopupFrame_a1}


Set the main widget. 

You cannot set the main widget from the constructor, since it must be a child of the frame itselfes. Be careful: the size is set to the main widgets size. It is up to you to set the main widgets correct size before setting it as the main widget. 

Definition at line 715 of file kdatetbl.cpp.

References QFrame::frame\-Width(), QWidget::height(), main, and QWidget::width().

Referenced by KDate\-Picker::select\-Week\-Clicked().\index{KPopupFrame@{KPopup\-Frame}!resizeEvent@{resizeEvent}}
\index{resizeEvent@{resizeEvent}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPopup\-Frame::resize\-Event ({\bf QResize\-Event} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKPopupFrame_a2}


The resize event. 

Simply resizes the main widget to the whole widgets client size. 

Reimplemented from {\bf QFrame}.

Definition at line 725 of file kdatetbl.cpp.

References QFrame::frame\-Width(), main, and QWidget::set\-Geometry().\index{KPopupFrame@{KPopup\-Frame}!popup@{popup}}
\index{popup@{popup}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPopup\-Frame::popup (const {\bf QPoint} \& {\em pos})}\label{classKPopupFrame_a3}


Open the popup window at position pos. 



Definition at line 735 of file kdatetbl.cpp.

References QApplication::desktop(), QRect::height(), KIO::move(), QRect::width(), QRect::x(), QPoint::x(), QRect::y(), and QPoint::y().

Referenced by exec().\index{KPopupFrame@{KPopup\-Frame}!exec@{exec}}
\index{exec@{exec}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KPopup\-Frame::exec ({\bf QPoint} {\em p})}\label{classKPopupFrame_a4}


Execute the popup window. 



Definition at line 758 of file kdatetbl.cpp.

References popup(), and result.

Referenced by exec(), and KDate\-Picker::select\-Week\-Clicked().\index{KPopupFrame@{KPopup\-Frame}!exec@{exec}}
\index{exec@{exec}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KPopup\-Frame::exec (int {\em x}, int {\em y})}\label{classKPopupFrame_a5}


Dito. 



Definition at line 768 of file kdatetbl.cpp.

References exec().

\subsection{Member Data Documentation}
\index{KPopupFrame@{KPopup\-Frame}!result@{result}}
\index{result@{result}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf KPopup\-Frame::result}\hspace{0.3cm}{\tt  [protected]}}\label{classKPopupFrame_p0}


The result. 

It is returned from {\bf exec()}{\rm (p.\,\pageref{classKPopupFrame_a4})} when the popup window closes. 

Definition at line 164 of file kdatetbl.h.

Referenced by close(), exec(), and key\-Press\-Event().\index{KPopupFrame@{KPopup\-Frame}!main@{main}}
\index{main@{main}!KPopupFrame@{KPopup\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget}$\ast$ {\bf KPopup\-Frame::main}\hspace{0.3cm}{\tt  [protected]}}\label{classKPopupFrame_p1}


The only subwidget that uses the whole dialog window. 



Definition at line 172 of file kdatetbl.h.

Referenced by resize\-Event(), and set\-Main\-Widget().

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