1
0
Fork 0
mirror of synced 2024-07-17 12:25:45 +12:00
Rare/rare/components/tabs/games/game_widgets/base_uninstalled_widget.py

34 lines
1.1 KiB
Python
Raw Normal View History

from logging import getLogger
from PyQt5.QtCore import pyqtSignal
2021-04-23 00:34:06 +12:00
from PyQt5.QtWidgets import QGroupBox
2021-04-08 08:39:23 +12:00
from rare.components.dialogs.install_dialog import InstallDialog
from rare.utils.models import InstallOptions
logger = getLogger("Uninstalled")
2021-03-27 01:29:26 +13:00
class BaseUninstalledWidget(QGroupBox):
2021-05-12 03:29:35 +12:00
show_uninstalled_info = pyqtSignal(str)
def __init__(self, game, core, pixmap):
super(BaseUninstalledWidget, self).__init__()
self.game = game
self.core = core
self.pixmap = pixmap
self.installing = False
2021-03-27 01:29:26 +13:00
self.setContentsMargins(0, 0, 0, 0)
def install(self):
2021-05-12 03:29:35 +12:00
self.show_uninstalled_info.emit(self.game.app_name)
def installl(self):
infos = InstallDialog(self.game.app_name, self.core).get_information()
if infos != 0:
path, max_workers, force, ignore_free_space = infos
2021-05-12 03:29:35 +12:00
self.show_uninstalled_info.emit(
2021-04-23 00:34:06 +12:00
InstallOptions(app_name=self.game.app_name, max_workers=max_workers, path=path, force=force,
ignore_free_space=ignore_free_space))