fc7e45a43a
Similarly to the installation procedure, when an uninstall is requested, an `UninstallOptionsModel` is emitted by the `RareGame`. `DownloadsTab` handles the signal and spawns the `UninstallDialog`. After the `UninstallDialog` is closed, a worker thread handles uninstalling the application to avoid UI lock-ups when a large number of files is deleted. Allows for uninstall actions to be spawned from anything having access to the `RareGame` instance. LaunchDialog: Don't check health on DLCs, they always will require verification if they don't specify an executable. Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
57 lines
No EOL
1.6 KiB
Python
57 lines
No EOL
1.6 KiB
Python
from PyQt5.QtCore import QObject, pyqtSignal
|
|
|
|
from .install import InstallOptionsModel, UninstallOptionsModel
|
|
|
|
|
|
class GlobalSignals:
|
|
|
|
# set_main_tab_index = pyqtSignal(int) # tab index
|
|
# update_gamelist = pyqtSignal(list)
|
|
|
|
class ApplicationSignals(QObject):
|
|
# int: exit code
|
|
quit = pyqtSignal(int)
|
|
# str: app_title
|
|
notify = pyqtSignal(str)
|
|
# none
|
|
prefix_updated = pyqtSignal()
|
|
# none
|
|
overlay_installed = pyqtSignal()
|
|
# none
|
|
update_tray = pyqtSignal()
|
|
|
|
class GameSignals(QObject):
|
|
install = pyqtSignal(InstallOptionsModel)
|
|
uninstall = pyqtSignal(UninstallOptionsModel)
|
|
# str: app_name
|
|
installed = pyqtSignal(str)
|
|
# str: app_name
|
|
uninstalled = pyqtSignal(str)
|
|
|
|
class DownloadSignals(QObject):
|
|
# str: app_name
|
|
enqueue = pyqtSignal(str)
|
|
# str: app_name
|
|
dequeue = pyqtSignal(str)
|
|
|
|
class DiscordRPCSignals(QObject):
|
|
# str: app_title
|
|
set_title = pyqtSignal(str)
|
|
# none
|
|
apply_settings = pyqtSignal()
|
|
|
|
def __init__(self):
|
|
self.application = GlobalSignals.ApplicationSignals()
|
|
self.game = GlobalSignals.GameSignals()
|
|
self.download = GlobalSignals.DownloadSignals()
|
|
self.discord_rpc = GlobalSignals.DiscordRPCSignals()
|
|
|
|
def deleteLater(self):
|
|
self.application.deleteLater()
|
|
del self.application
|
|
self.game.deleteLater()
|
|
del self.game
|
|
self.download.deleteLater()
|
|
del self.download
|
|
self.discord_rpc.deleteLater()
|
|
del self.discord_rpc |