def show_settings(self):
"""Shows a dialog containing settings for DSW"""
self.dialog = QDialog(self)
self.dialog.ui = uic.loadUi(SETTINGS_UI_FILE, self.dialog)
self.dialog.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.dialog.findChild(QtCore.QObject, BUTTONBOX) \
.accepted.connect(self.generate_conf)
if cfg[CONFIG_BUFFER_STREAM]:
self.dialog.findChild(QtCore.QObject, RECORD_SETTINGS).setChecked(True)
if cfg[CONFIG_MUTE]:
self.dialog.findChild(QtCore.QObject, MUTE_SETTINGS).setChecked(True)
self.dialog.findChild(QtCore.QObject, QUALITY_SETTINGS) \
.setText(CONFIG_QUALITY_DELIMITER_JOIN.join(cfg[CONFIG_QUALITY]))
self.dialog.findChild(QtCore.QObject, BUFFER_SIZE).setValue(cfg[CONFIG_BUFFER_SIZE])
self.dialog.show()
评论列表
文章目录