KPlato::PopupFrame Class Reference

#include <kptdatetable.h>

List of all members.

Public Slots

void close (int r)

Public Member Functions

 PopupFrame (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
QWidget * main

Private Member Functions

virtual bool close (bool alsoDelete)

Private Attributes

PopupFramePrivate * d


Detailed Description

Frame with popup menu behaviour.
Author:
Tim Gilman, Mirko Boehm
Version:
Id
kptdatetable.h 586960 2006-09-21 06:24:30Z danders

Definition at line 182 of file kptdatetable.h.


Constructor & Destructor Documentation

KPlato::PopupFrame::PopupFrame ( QWidget *  parent = 0,
const char *  name = 0 
)

The contructor. Creates a dialog without buttons.

Definition at line 985 of file kptdatetable.cc.


Member Function Documentation

void KPlato::PopupFrame::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

Catch key press events.

Definition at line 995 of file kptdatetable.cc.

References result.

void KPlato::PopupFrame::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 1005 of file kptdatetable.cc.

References result.

void KPlato::PopupFrame::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 1012 of file kptdatetable.cc.

References main.

Referenced by KPlato::CalendarPanel::selectMonthClicked(), KPlato::CalendarPanel::selectWeekClicked(), and KPlato::CalendarPanel::selectYearClicked().

void KPlato::PopupFrame::resizeEvent ( QResizeEvent *   )  [virtual]

The resize event. Simply resizes the main widget to the whole widgets client size.

Definition at line 1022 of file kptdatetable.cc.

References main.

void KPlato::PopupFrame::popup ( const QPoint &  pos  ) 

Open the popup window at position pos.

Definition at line 1032 of file kptdatetable.cc.

References d.

Referenced by exec().

int KPlato::PopupFrame::exec ( QPoint  p  ) 

Execute the popup window.

Definition at line 1055 of file kptdatetable.cc.

References popup(), and result.

Referenced by exec(), KPlato::CalendarPanel::selectMonthClicked(), KPlato::CalendarPanel::selectWeekClicked(), and KPlato::CalendarPanel::selectYearClicked().

int KPlato::PopupFrame::exec ( int  x,
int  y 
)

Dito.

Definition at line 1065 of file kptdatetable.cc.

References exec().

virtual bool KPlato::PopupFrame::close ( bool  alsoDelete  )  [inline, private, virtual]

Definition at line 237 of file kptdatetable.h.

void KPlato::PopupFrame::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Definition at line 1070 of file kptdatetable.cc.


Member Data Documentation

int KPlato::PopupFrame::result [protected]

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

Definition at line 189 of file kptdatetable.h.

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

QWidget* KPlato::PopupFrame::main [protected]

The only subwidget that uses the whole dialog window.

Definition at line 197 of file kptdatetable.h.

Referenced by resizeEvent(), and setMainWidget().

PopupFramePrivate* KPlato::PopupFrame::d [private]

Definition at line 241 of file kptdatetable.h.

Referenced by popup().


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 23:21:48 2006 for KPlato by  doxygen 1.5.1-p1