prjemian / assign_gup

Assist in assigning APS GUPs to PRP members
http://assign_gup.readthedocs.io
0 stars 1 forks source link

window placement #35

Closed prjemian closed 8 years ago

prjemian commented 8 years ago

current screen geometry should be checked to ensure that no windows are placed off screen

This can happen on a laptop that uses a docking station that provides multiple monitors. The position of subwindows moved by the user to other screens will be remembered by the application. When the laptop is undocked, the windows should be moved back to the viewable display.

prjemian commented 8 years ago

settings.restoreWindowGeometry()

        # TODO: what if (x,y) is off-screen?  Check here if point is off-screen.  How?
        point = QtCore.QPoint(int(x), int(y))
        # TODO: only do this if point is on-screen
        # see: http://doc.qt.io/qt-4.8/qdesktopwidget.html#screen-geometry
        # see: http://doc.qt.io/qt-4.8/application-windows.html#window-geometry
        # window.move(point)
prjemian commented 8 years ago

The support for different screen geometries comes from QtGui.QDesktopWidget()