By using a QToolBox, we can better utilize the available space for long lists of DLCs. `GameDlcWidget` is now responsible for handling installing and uninstalling the DLC based on RareGame's functionality. Since `GameUtils` is not used for uninstalling any more, remove it the arguments of `GameInfoTabs` completely.
74 lines
4 KiB
Python
74 lines
4 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/game_info/game_dlc.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_GameDlc(object):
|
|
def setupUi(self, GameDlc):
|
|
GameDlc.setObjectName("GameDlc")
|
|
GameDlc.resize(271, 139)
|
|
GameDlc.setWindowTitle("GameDlc")
|
|
GameDlc.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
|
GameDlc.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
GameDlc.setLineWidth(0)
|
|
self.installed_dlc_page = QtWidgets.QWidget()
|
|
self.installed_dlc_page.setGeometry(QtCore.QRect(0, 0, 267, 79))
|
|
self.installed_dlc_page.setObjectName("installed_dlc_page")
|
|
self.installed_dlc_page_layout = QtWidgets.QVBoxLayout(self.installed_dlc_page)
|
|
self.installed_dlc_page_layout.setContentsMargins(0, 0, 0, 0)
|
|
self.installed_dlc_page_layout.setObjectName("installed_dlc_page_layout")
|
|
self.installed_dlc_label = QtWidgets.QLabel(self.installed_dlc_page)
|
|
self.installed_dlc_label.setObjectName("installed_dlc_label")
|
|
self.installed_dlc_page_layout.addWidget(self.installed_dlc_label, 0, QtCore.Qt.AlignTop)
|
|
self.installed_dlc_container = QtWidgets.QWidget(self.installed_dlc_page)
|
|
self.installed_dlc_container.setObjectName("installed_dlc_container")
|
|
self.installed_dlc_container_layout = QtWidgets.QVBoxLayout(self.installed_dlc_container)
|
|
self.installed_dlc_container_layout.setContentsMargins(0, 0, 3, 0)
|
|
self.installed_dlc_container_layout.setObjectName("installed_dlc_container_layout")
|
|
self.installed_dlc_page_layout.addWidget(self.installed_dlc_container, 0, QtCore.Qt.AlignTop)
|
|
self.installed_dlc_page_layout.setStretch(1, 1)
|
|
GameDlc.addItem(self.installed_dlc_page, "")
|
|
self.available_dlc_page = QtWidgets.QWidget()
|
|
self.available_dlc_page.setGeometry(QtCore.QRect(0, 0, 267, 79))
|
|
self.available_dlc_page.setObjectName("available_dlc_page")
|
|
self.available_dlc_page_layou = QtWidgets.QVBoxLayout(self.available_dlc_page)
|
|
self.available_dlc_page_layou.setContentsMargins(0, 0, 0, 0)
|
|
self.available_dlc_page_layou.setObjectName("available_dlc_page_layou")
|
|
self.available_dlc_label = QtWidgets.QLabel(self.available_dlc_page)
|
|
self.available_dlc_label.setObjectName("available_dlc_label")
|
|
self.available_dlc_page_layou.addWidget(self.available_dlc_label, 0, QtCore.Qt.AlignTop)
|
|
self.available_dlc_container = QtWidgets.QWidget(self.available_dlc_page)
|
|
self.available_dlc_container.setObjectName("available_dlc_container")
|
|
self.available_dlc_container_layout = QtWidgets.QVBoxLayout(self.available_dlc_container)
|
|
self.available_dlc_container_layout.setContentsMargins(0, 0, 3, 0)
|
|
self.available_dlc_container_layout.setObjectName("available_dlc_container_layout")
|
|
self.available_dlc_page_layou.addWidget(self.available_dlc_container, 0, QtCore.Qt.AlignTop)
|
|
self.available_dlc_page_layou.setStretch(1, 1)
|
|
GameDlc.addItem(self.available_dlc_page, "")
|
|
|
|
self.retranslateUi(GameDlc)
|
|
|
|
def retranslateUi(self, GameDlc):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
self.installed_dlc_label.setText(_translate("GameDlc", "No Downloadable Content has been installed."))
|
|
GameDlc.setItemText(GameDlc.indexOf(self.installed_dlc_page), _translate("GameDlc", "Installed DLCs"))
|
|
self.available_dlc_label.setText(_translate("GameDlc", "No Downloadable Content is available"))
|
|
GameDlc.setItemText(GameDlc.indexOf(self.available_dlc_page), _translate("GameDlc", "Available DLCs"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
app = QtWidgets.QApplication(sys.argv)
|
|
GameDlc = QtWidgets.QToolBox()
|
|
ui = Ui_GameDlc()
|
|
ui.setupUi(GameDlc)
|
|
GameDlc.show()
|
|
sys.exit(app.exec_())
|