Commit 098f1aec authored by Thomas Dowrick's avatar Thomas Dowrick

Merge branch 'move-screen_utils' into 'master'

Move screen_utls from ardavin

See merge request WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryutils!1
parents 19efe96d 46966d8c
Pipeline #1347 passed with stages
in 20 minutes and 42 seconds
# coding=utf-8
""" Any useful utilities relating to displays/screens. """
from PySide2.QtGui import QGuiApplication
#pylint: disable=useless-object-inheritance
class ScreenController(object):
""" This class detects the connected screens/monitors, and
returns the primary screen and a list of any secondary screens.
def __init__(self):
self.screens = QGuiApplication.screens()
self.primary = QGuiApplication.primaryScreen()
if self.primary in self.screens:
def list_of_screens(self): # pylint: disable=no-self-use
"""Return the primary screen and list of other available screens"""
return self.primary, self.screens
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment