kdeui Library API Documentation

KPopupFrame Class Reference

Frame with popup menu behavior. More...

#include <kdatetbl.h>

Inheritance diagram for KPopupFrame:

QFrame List of all members.

Public Slots

void close (int r)

Public Member Functions

 KPopupFrame (QWidget *parent=0, const char *name=0)
void setMainWidget (QWidget *m)
virtual void resizeEvent (QResizeEvent *)
void popup (const QPoint &pos)
int exec (QPoint p)
int exec (int x, int y)

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *e)
virtual void virtual_hook (int id, void *data)

Protected Attributes

int result
QWidgetmain

Detailed Description

Frame with popup menu behavior.

Author:
Tim Gilman, Mirko Boehm
Version:
Id
kdatetbl.h,v 1.43 2003/10/17 22:25:17 danimo Exp

Definition at line 162 of file kdatetbl.h.


Constructor & Destructor Documentation

KPopupFrame::KPopupFrame QWidget parent = 0,
const char *  name = 0
 

The contructor.

Creates a dialog without buttons.

Definition at line 835 of file kdatetbl.cpp.

References KPopupFrame().

Referenced by KPopupFrame().


Member Function Documentation

void KPopupFrame::keyPressEvent QKeyEvent e  )  [protected, virtual]
 

Catch key press events.

Definition at line 845 of file kdatetbl.cpp.

References QKeyEvent::key(), keyPressEvent(), and result.

Referenced by keyPressEvent().

void KPopupFrame::close int  r  )  [slot]
 

Close the popup window.

This is called from the main widget, usually. r is the result returned from exec().

Definition at line 855 of file kdatetbl.cpp.

References close(), and result.

Referenced by close().

void KPopupFrame::setMainWidget QWidget m  ) 
 

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 862 of file kdatetbl.cpp.

References QFrame::frameWidth(), QWidget::height(), main, setMainWidget(), and QWidget::width().

Referenced by KDatePicker::selectYearClicked(), and setMainWidget().

void KPopupFrame::resizeEvent QResizeEvent  )  [virtual]
 

The resize event.

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

Reimplemented from QFrame.

Definition at line 872 of file kdatetbl.cpp.

References QFrame::frameWidth(), main, resizeEvent(), and QWidget::setGeometry().

Referenced by resizeEvent().

void KPopupFrame::popup const QPoint pos  ) 
 

Open the popup window at position pos.

Definition at line 882 of file kdatetbl.cpp.

References QRect::height(), popup(), QRect::width(), QRect::x(), QPoint::x(), QRect::y(), and QPoint::y().

Referenced by exec(), and popup().

int KPopupFrame::exec QPoint  p  ) 
 

Execute the popup window.

Definition at line 906 of file kdatetbl.cpp.

References exec(), popup(), and result.

Referenced by exec(), and KDatePicker::selectYearClicked().

int KPopupFrame::exec int  x,
int  y
 

Dito.

Definition at line 916 of file kdatetbl.cpp.

References exec().


Member Data Documentation

int KPopupFrame::result [protected]
 

The result.

It is returned from exec() when the popup window closes.

Definition at line 169 of file kdatetbl.h.

Referenced by close(), exec(), and keyPressEvent().

QWidget* KPopupFrame::main [protected]
 

The only subwidget that uses the whole dialog window.

Definition at line 177 of file kdatetbl.h.

Referenced by resizeEvent(), and setMainWidget().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:48:51 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003