kplato

KPlato::PopupFrame Class Reference

#include <kptdatetable.h>

List of all members.


Detailed Description

Frame with popup menu behaviour.

Author:
Tim Gilman, Mirko Boehm
Version:
Id
kptdatetable.h 502212 2006-01-25 09:02:53Z danders

Definition at line 175 of file kptdatetable.h.


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

Constructor & Destructor Documentation

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

The contructor.

Creates a dialog without buttons.

Definition at line 963 of file kptdatetable.cc.


Member Function Documentation

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 983 of file kptdatetable.cc.

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

Dito.

Definition at line 1043 of file kptdatetable.cc.

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

Execute the popup window.

Definition at line 1033 of file kptdatetable.cc.

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

Catch key press events.

Definition at line 973 of file kptdatetable.cc.

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

Open the popup window at position pos.

Definition at line 1010 of file kptdatetable.cc.

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

The resize event.

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

Definition at line 1000 of file kptdatetable.cc.

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 990 of file kptdatetable.cc.


Member Data Documentation

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

The only subwidget that uses the whole dialog window.

Definition at line 190 of file kptdatetable.h.

int KPlato::PopupFrame::result [protected]

The result.

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

Definition at line 182 of file kptdatetable.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys