#include <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 |
Private Member Functions | |
virtual bool | close (bool alsoDelete) |
Private Attributes | |
PopupFramePrivate * | d |
Definition at line 182 of file kptdatetable.h.
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.
void KPlato::PopupFrame::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
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 | |||
) |
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.
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] |