X-Git-Url: https://git.ralfj.de/lilass.git/blobdiff_plain/faee2c63ce17801d9d8151d5a51e9a5aee79154c..06344a9d0c2cbd40023d1db4ab966c0577234049:/gui.py?ds=inline diff --git a/gui.py b/gui.py index 62decc6..4847668 100644 --- a/gui.py +++ b/gui.py @@ -28,34 +28,12 @@ def setup(internalResolutions, externalResolutions): The user should be asked about his display setup preferences. The function returns None if the user cancelled, and an instance of dsl.ScreenSetup otherwise. ''' -import sys import collections +from qt_frontend import QtFrontend from cli_frontend import CLIFrontend from zenity_frontend import ZenityFrontend -# Qt frontend -class QtFrontend: - def __init__(self): - from PyQt4 import QtGui - self.app = QtGui.QApplication(sys.argv) - print("Qt loaded") - - def error(self, message): - from PyQt4 import QtGui - QtGui.QMessageBox.critical(None, 'Fatal error', message) - - def setup(self, situation): - from qt_dialogue import PositionSelection - return PositionSelection(situation).run() - - @staticmethod - def isAvailable(): - try: - import PyQt4 - return True - except ImportError: - return False # list of available frontends frontends = collections.OrderedDict()