2""" @brief Physical display (Screen and monitors).
"""
4#============================================================================#
5# EVOLIFE http://evolife.telecom-paris.fr Jean-Louis Dessalles
16try:
from PyQt5
import QtWidgets
18 from PyQt4
import QtGui
as QtWidgets
21 """ Stores characteristics of physical display
25 """ Stores available physical screens
30 screen_rect = MainApp.desktop().screenGeometry()
32 self.
width, self.
height = screen_rect.width(), screen_rect.height()
34 for Disp
in range(0,8):
35 D = QtWidgets.QDesktopWidget().screenGeometry(Disp)
42 """ applies screen's display ratio to coordinates
44 return list(map(
lambda x: int(x * self.
ratio), Coord))
47 """ calls 'resize' (for high definition screen and optional screen change)
52 """ Chave the value of 'currentScreen'
57 """ translates coordinates to display on current screen
66__author__ =
'Dessalles'
Stores characteristics of physical display.
def switchScreen(self)
Chave the value of 'currentScreen'.
def changeScreen(self, Coord)
translates coordinates to display on current screen
def resize(self, *Coord)
applies screen's display ratio to coordinates
def __init__(self, MainApp)
Stores available physical screens.
def locate(self, *Coord)
calls 'resize' (for high definition screen and optional screen change)