[go: up one dir, main page]

Menu

[80c337]: / generic / widgettools.h  Maximize  Restore  History

Download this file

23 lines (15 with data), 811 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#ifndef WIDGETTOOLS_H
#define WIDGETTOOLS_H
/** \brief Move a window to the screen of another window
*
* When restoring a window's geometry, it may be the case that the window appears off
* screen. This may happen if an external monitor was plugged in when the application was
* last used, and now the monitor is not plugged in, or the other way around.
*
* This routine provides a convenient way to (after restoring a window's geometry) ensure
* that it is on the same screen as the application's main window. The window \a window
* will be moved onto the same screen (desktop) as the window \a screenOfThis, without
* changing its width or height, and doing as short a move as possible.
*/
QRect moveWindowToScreen ( QWidget* window, QWidget* screenOfThis );
#endif // WIDGETTOOLS_H