When updates are queued, they are removed from the update's list. An exceptions is made when the queued item comes from repairing (without updating), in which case the update is disabled for the runtime. A queued item can be either removed (if it is an update it will be added back to the updates groups) or forced to be updated now. If a queued item is forced, the currently running item will be added to the front of the queue. Downloads will be queued if there is no active download but there is a queue already. The download thread is now responsible for emitting the progress to `RareGame` InstallDialog: Pass `RareGame` and `InstallOptionsModel` only as arguments. The `update`, `repair` and `silent` arguments are already part of `InstallOptionsModel` `RareGame` is used to query information about the game. InstallInfoWorker: Pass only `InstallOptionsModel` as argument Emit `InstallQueueItemModel` as result, to re-use the worker when queuing stopped games RareGame: Query and store metadata property about entitlement grant date RareGame: Add `RareEosOverlay` class that imitates `RareGame` to handle the overlay LibraryWidgetController: Remove dead signal routing code, these signals are handled by `RareGame` Directly parent library widgets instead of reparenting them GameWidgets: Remove unused signals EOSGroup: Set install location based on preferences and use EOSOverlayApp from legendary GamesTab: Connect the `progress` signals of dlcs to the base game's signals GamesTab: Remove dead code GlobalSignals: Remove `ProgresSignals` RareCore: Mangle internal signleton's names Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
95 lines
5.1 KiB
Python
95 lines
5.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file 'rare/ui/components/tabs/downloads/download_widget.ui'
|
|
#
|
|
# Created by: PyQt5 UI code generator 5.15.7
|
|
#
|
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
|
# run again. Do not edit this file unless you know what you are doing.
|
|
|
|
|
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
|
|
|
|
class Ui_DownloadWidget(object):
|
|
def setupUi(self, DownloadWidget):
|
|
DownloadWidget.setObjectName("DownloadWidget")
|
|
DownloadWidget.resize(332, 70)
|
|
DownloadWidget.setWindowTitle("DownloadWidget")
|
|
DownloadWidget.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
|
self.download_widget_layout = QtWidgets.QHBoxLayout(DownloadWidget)
|
|
self.download_widget_layout.setContentsMargins(0, 0, 0, 0)
|
|
self.download_widget_layout.setObjectName("download_widget_layout")
|
|
self.move_buttons = QtWidgets.QWidget(DownloadWidget)
|
|
self.move_buttons.setObjectName("move_buttons")
|
|
self.move_buttons_layout = QtWidgets.QVBoxLayout(self.move_buttons)
|
|
self.move_buttons_layout.setContentsMargins(0, 0, 0, 0)
|
|
self.move_buttons_layout.setObjectName("move_buttons_layout")
|
|
self.move_up_button = QtWidgets.QPushButton(self.move_buttons)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.move_up_button.sizePolicy().hasHeightForWidth())
|
|
self.move_up_button.setSizePolicy(sizePolicy)
|
|
self.move_up_button.setText("")
|
|
self.move_up_button.setProperty("isSquare", 1)
|
|
self.move_up_button.setObjectName("move_up_button")
|
|
self.move_buttons_layout.addWidget(self.move_up_button, 0, QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
|
self.move_down_button = QtWidgets.QPushButton(self.move_buttons)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.move_down_button.sizePolicy().hasHeightForWidth())
|
|
self.move_down_button.setSizePolicy(sizePolicy)
|
|
self.move_down_button.setText("")
|
|
self.move_down_button.setProperty("isSquare", 1)
|
|
self.move_down_button.setObjectName("move_down_button")
|
|
self.move_buttons_layout.addWidget(self.move_down_button, 0, QtCore.Qt.AlignLeft|QtCore.Qt.AlignBottom)
|
|
self.download_widget_layout.addWidget(self.move_buttons)
|
|
self.info_layout = QtWidgets.QHBoxLayout()
|
|
self.info_layout.setObjectName("info_layout")
|
|
self.download_widget_layout.addLayout(self.info_layout)
|
|
self.queue_buttons = QtWidgets.QWidget(DownloadWidget)
|
|
self.queue_buttons.setObjectName("queue_buttons")
|
|
self.queue_buttons_layout = QtWidgets.QVBoxLayout(self.queue_buttons)
|
|
self.queue_buttons_layout.setContentsMargins(0, 0, 0, 0)
|
|
self.queue_buttons_layout.setObjectName("queue_buttons_layout")
|
|
self.force_button = QtWidgets.QPushButton(self.queue_buttons)
|
|
self.force_button.setObjectName("force_button")
|
|
self.queue_buttons_layout.addWidget(self.force_button)
|
|
self.remove_button = QtWidgets.QPushButton(self.queue_buttons)
|
|
self.remove_button.setObjectName("remove_button")
|
|
self.queue_buttons_layout.addWidget(self.remove_button, 0, QtCore.Qt.AlignTop)
|
|
self.download_widget_layout.addWidget(self.queue_buttons)
|
|
self.update_buttons = QtWidgets.QWidget(DownloadWidget)
|
|
self.update_buttons.setObjectName("update_buttons")
|
|
self.update_buttons_layout = QtWidgets.QVBoxLayout(self.update_buttons)
|
|
self.update_buttons_layout.setContentsMargins(0, 0, 0, 0)
|
|
self.update_buttons_layout.setObjectName("update_buttons_layout")
|
|
self.update_button = QtWidgets.QPushButton(self.update_buttons)
|
|
self.update_button.setObjectName("update_button")
|
|
self.update_buttons_layout.addWidget(self.update_button, 0, QtCore.Qt.AlignTop)
|
|
self.settings_button = QtWidgets.QPushButton(self.update_buttons)
|
|
self.settings_button.setObjectName("settings_button")
|
|
self.update_buttons_layout.addWidget(self.settings_button, 0, QtCore.Qt.AlignTop)
|
|
self.download_widget_layout.addWidget(self.update_buttons)
|
|
self.download_widget_layout.setStretch(1, 1)
|
|
|
|
self.retranslateUi(DownloadWidget)
|
|
|
|
def retranslateUi(self, DownloadWidget):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
self.force_button.setText(_translate("DownloadWidget", "Update now"))
|
|
self.remove_button.setText(_translate("DownloadWidget", "Remove from queue"))
|
|
self.update_button.setText(_translate("DownloadWidget", "Update game"))
|
|
self.settings_button.setText(_translate("DownloadWidget", "Update with settings"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
app = QtWidgets.QApplication(sys.argv)
|
|
DownloadWidget = QtWidgets.QFrame()
|
|
ui = Ui_DownloadWidget()
|
|
ui.setupUi(DownloadWidget)
|
|
DownloadWidget.show()
|
|
sys.exit(app.exec_())
|