|
|
@ -50,6 +50,9 @@ from PyQt5.QtWebEngineWidgets import ( |
|
|
|
) |
|
|
|
) |
|
|
|
from PyQt5.QtGui import QColor, QIcon |
|
|
|
from PyQt5.QtGui import QColor, QIcon |
|
|
|
from PyQt5.QtWebChannel import QWebChannel |
|
|
|
from PyQt5.QtWebChannel import QWebChannel |
|
|
|
|
|
|
|
from bridge.Config import Config |
|
|
|
|
|
|
|
from bridge.Greeter import Greeter |
|
|
|
|
|
|
|
from bridge.ThemeUtils import ThemeUtils |
|
|
|
|
|
|
|
|
|
|
|
from browser.error_prompt import WebPage |
|
|
|
from browser.error_prompt import WebPage |
|
|
|
from browser.url_scheme import QtUrlSchemeHandler |
|
|
|
from browser.url_scheme import QtUrlSchemeHandler |
|
|
@ -58,9 +61,6 @@ from browser.window import MainWindow |
|
|
|
|
|
|
|
|
|
|
|
from logger import logger |
|
|
|
from logger import logger |
|
|
|
from config import web_greeter_config |
|
|
|
from config import web_greeter_config |
|
|
|
from bridge.Greeter import greeter |
|
|
|
|
|
|
|
from bridge.Config import config |
|
|
|
|
|
|
|
from bridge.ThemeUtils import theme_utils |
|
|
|
|
|
|
|
from utils.screensaver import screensaver |
|
|
|
from utils.screensaver import screensaver |
|
|
|
|
|
|
|
|
|
|
|
# pylint: disable-next=unused-import |
|
|
|
# pylint: disable-next=unused-import |
|
|
@ -118,6 +118,10 @@ class Application: |
|
|
|
desktop: QDesktopWidget |
|
|
|
desktop: QDesktopWidget |
|
|
|
window: QMainWindow |
|
|
|
window: QMainWindow |
|
|
|
states = WINDOW_STATES |
|
|
|
states = WINDOW_STATES |
|
|
|
|
|
|
|
greeter: Greeter |
|
|
|
|
|
|
|
greeter_config: Config |
|
|
|
|
|
|
|
theme_utils: ThemeUtils |
|
|
|
|
|
|
|
bridge_objects: Tuple[Greeter, Config, ThemeUtils] |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) |
|
|
|
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) |
|
|
@ -130,7 +134,6 @@ class Application: |
|
|
|
self.window.setAttribute(Qt.WA_DeleteOnClose) |
|
|
|
self.window.setAttribute(Qt.WA_DeleteOnClose) |
|
|
|
self.window.setWindowTitle("Web Greeter") |
|
|
|
self.window.setWindowTitle("Web Greeter") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.window.setWindowFlags( |
|
|
|
self.window.setWindowFlags( |
|
|
|
self.window.windowFlags() | Qt.MaximizeUsingFullscreenGeometryHint |
|
|
|
self.window.windowFlags() | Qt.MaximizeUsingFullscreenGeometryHint |
|
|
|
) |
|
|
|
) |
|
|
@ -236,7 +239,7 @@ class Browser(Application): |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super().__init__() |
|
|
|
super().__init__() |
|
|
|
self.init() |
|
|
|
self.init() |
|
|
|
self.load() |
|
|
|
# self.load() |
|
|
|
|
|
|
|
|
|
|
|
def init(self): |
|
|
|
def init(self): |
|
|
|
"""Initialize browser""" |
|
|
|
"""Initialize browser""" |
|
|
@ -291,9 +294,6 @@ class Browser(Application): |
|
|
|
def load(self): |
|
|
|
def load(self): |
|
|
|
"""Load theme and initialize bridge""" |
|
|
|
"""Load theme and initialize bridge""" |
|
|
|
self.load_theme() |
|
|
|
self.load_theme() |
|
|
|
self.greeter = greeter |
|
|
|
|
|
|
|
self.greeter_config = config |
|
|
|
|
|
|
|
self.theme_utils = theme_utils |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.bridge_objects = (self.greeter, self.greeter_config, self.theme_utils) |
|
|
|
self.bridge_objects = (self.greeter, self.greeter_config, self.theme_utils) |
|
|
|
self.initialize_bridge_objects() |
|
|
|
self.initialize_bridge_objects() |
|
|
|