def _create_layouts_and_widgets(self):
self._logo = QtGui.QLabel()
self._logo.setPixmap(QtGui.QPixmap("images/logo.png"))
self._explanation = QtGui.QTextEdit("This tool is a thank-you to supporters of "
"upload.farm.<br><br>It allows you to automatically backup your Stardew Valley "
"savegames and upload them to upload.farm for safekeeping.<br><br>To begin using "
"the uploader, please authenticate with your upload.farm account by pressing "
"the button below, or by navigating to:<br><br>{}".format(AUTHENTICATION_URL))
self._explanation.setReadOnly(True)
self._profile_button = QtGui.QPushButton("&Authenticate")
self._profile_button.clicked.connect(self.open_api_auth)
self._help_button = QtGui.QPushButton("&Help!")
self._help_button.clicked.connect(self.open_help)
self._vbox = QtGui.QVBoxLayout()
self._vbox.addStretch(1)
logobox = QtGui.QHBoxLayout()
logobox.addStretch(1)
logobox.addWidget(self._logo)
logobox.addStretch(1)
self._vbox.addLayout(logobox)
self._vbox.addStretch(1)
logobox = QtGui.QHBoxLayout()
logobox.addStretch(1)
logobox.addWidget(self._explanation)
logobox.addStretch(1)
self._vbox.addLayout(logobox)
self._vbox.addStretch(1)
logobox = QtGui.QHBoxLayout()
logobox.addStretch(1)
logobox.addWidget(self._profile_button)
logobox.addWidget(self._help_button)
logobox.addStretch(1)
self._vbox.addLayout(logobox)
self._vbox.addStretch(1)
self._main_widget = QtGui.QWidget()
self._main_widget.setLayout(self._vbox)
self._main_widget.setMinimumWidth(500)
self._main_widget.setMinimumHeight(400)
self.setCentralWidget(self._main_widget)
评论列表
文章目录