OSB_GUI::PopupMover Class Reference

Collaboration diagram for OSB_GUI::PopupMover:

Collaboration graph
[legend]
List of all members.

Detailed Description

Utility class to move a widget into the top-level window.

Todo:
Provide functionality to keep the widget inside the screen.

Definition at line 143 of file guiutils.h.

Public Member Functions

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

OSB_GUI::PopupMover::PopupMover ( QWidget popup,
const QWidget visParent = 0 
) [explicit]

Constructor with the widget to move.

Parameters:
popup Widget to move (it needn't be a popup :-).
visParent Optional visual parent of popup.
If 0 its real parent is used.


Member Function Documentation

bool OSB_GUI::PopupMover::insideTop (  )  const

Check if popup_ is inside topLevel_.

bool OSB_GUI::PopupMover::intoTop ( bool  coverParent  ) 

Move popup_ into topLevel_, near the parent.

Parameters:
coverParent Flag to cover the parent widget.
Returns:
true if the widget is inside the top-level window after the function returns, else false.
The function has no effect if popup_ is already inside topLevel_.

Calls intoTop() if popup_ can not be aligned with the corners or edges of parent_ such that it is inside topLevel_.

bool OSB_GUI::PopupMover::intoTop (  ) 

Move popup_ into topLevel_.

Returns:
true if the widget is inside the top-level window after the function returns, else false.
The function has no effect if popup_ is already inside topLevel_.

QRect OSB_GUI::PopupMover::rect ( const QWidget widget,
bool  relTop 
) const [private]

Get a widget's rect relative to the screen or top-level widget.


Member Data Documentation

const QWidget* OSB_GUI::PopupMover::parent_ [private]

The real or visual parent of popup_.

Definition at line 193 of file guiutils.h.

QWidget* OSB_GUI::PopupMover::popup_ [private]

The widget to move.

Definition at line 191 of file guiutils.h.

const QWidget* OSB_GUI::PopupMover::topLevel_ [private]

The top-level widget of parent_.

Definition at line 195 of file guiutils.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:18:42 2006 for OSB Library by  doxygen 1.4.7