Added option to hide info buttons. Removed shortcut window. Added ensemble front-end checkbox.

This commit is contained in:
Dilan Boskan 2021-07-10 16:15:36 +02:00
parent 6bd8fccc1e
commit f5d58c54cc
20 changed files with 819 additions and 472 deletions

View File

@ -52,7 +52,7 @@ for () {
New-Item -ItemType Directory -Force -Path $QM_Dir/$language | Out-Null
New-Item -ItemType Directory -Force -Path $QM_Dir/$language/infos | Out-Null
if ($language -ne "en") {
Copy-Item -Path "$QM_Dir/en/infos/*" -Destination "$QM_Dir/$language/infos" -PassThru
Copy-Item -Path "$QM_Dir/en/infos/*" -Destination "$QM_Dir/$language/infos" -PassThru | Out-Null
}
cmd.exe /c "lrelease -silent -removeidentical $TS_Dir/$language.qt.ts -qm $QM_Dir/$language/$language.qm"
}

View File

@ -72,9 +72,10 @@ class CustomApplication(QtWidgets.QApplication):
'presetsEditor': presetseditorwindow.PresetsEditorWindow(self),
'info': infowindow.InfoWindow(self),
}
self.mainWindow = self.windows['main']
self.settingsWindow = self.windows['settings']
self.presetsEditorWindow = self.windows['presetsEditor']
self.mainWindow: mainwindow.MainWindow = self.windows['main']
self.settingsWindow: settingswindow.SettingsWindow = self.windows['settings']
self.presetsEditorWindow: presetseditorwindow.PresetsEditorWindow = self.windows['presetsEditor']
self.infoWindow: infowindow.InfoWindow = self.windows['info']
self.logger.info('--- Setting up application ---',
indent_forwards=True)
@ -119,12 +120,26 @@ class CustomApplication(QtWidgets.QApplication):
for widget in self.windows['settings'].ui.frame_constants.findChildren(QtWidgets.QLineEdit):
widget.setValidator(validator)
def bind_info_boxes():
def show_info(title: str, text: str):
"""Show info to user with QMessageBox
Args:
title (str): Title of Message
text (str): Content of Message
"""
self.infoWindow.update_info(title, text)
self.infoWindow.show()
self.settingsWindow.ui.info_conversion.clicked.connect(lambda: show_info(self.tr("Conversion Info"),
self.translator.loaded_language.settings_conversion))
# -Before-
# -Setup-
setup_windows()
improve_comboboxes()
assign_lineEdit_validators()
bind_info_boxes()
# -After-
# Load language

View File

@ -35,7 +35,6 @@ JSON_TO_NAME = OrderedDict(**{
'vocalModelName': 'comboBox_vocal',
'windowSize': 'comboBox_winSize',
})
CUDA_AVAILABLE = torch.cuda.is_available()
DEFAULT_SETTINGS = {
# --Independent Data (Data not directly connected with widgets)--
'inputPaths': [],
@ -83,7 +82,7 @@ DEFAULT_SETTINGS = {
# --Settings window -> Seperation Settings--
# -Conversion-
# Boolean
'checkBox_gpuConversion': CUDA_AVAILABLE,
'checkBox_gpuConversion': torch.cuda.is_available(),
'checkBox_postProcess': converter.default_data['postProcess'],
'checkBox_tta': converter.default_data['tta'],
'checkBox_outputImage': converter.default_data['outputImage'],
@ -93,6 +92,7 @@ DEFAULT_SETTINGS = {
'doubleSpinBox_aggressiveness': converter.default_data['aggressiveness'],
'comboBox_highEndProcess': converter.default_data['highEndProcess'],
# -Models-
'checkBox_ensemble': False,
'comboBox_instrumental': '',
'comboBox_vocal': '',
'comboBox_winSize': converter.default_data['window_size'],
@ -111,11 +111,11 @@ DEFAULT_SETTINGS = {
# Open settings on startup
'checkBox_settingsStartup': False,
# Disable animations
'checkBox_disableAnimations': False,
'checkBox_enableAnimations': True,
# Disable Shortcuts
'checkBox_disableShortcuts': False,
'checkBox_showInfoButtons': True,
# Process multiple files at once
'checkBox_multithreading': False,
'checkBox_multithreading': converter.default_data['multithreading'],
# -Export Settings-
# Autosave Instrumentals/Vocals
'checkBox_autoSaveInstrumentals': True,

View File

@ -41,7 +41,7 @@ QRadioButton[menu="true"]::indicator {
QFrame[menu="true"] {
background-color: rgb(31, 31, 31);
}
QFrame[settingsContent="true"] {
*[settingsContent="true"] {
background-color: #2A2A2A;
border: 1px solid #3b3b3b;
border-radius: 5px;

View File

@ -1 +1,11 @@
German
# Ultimate Vocal Remover GUI v5.0.0
## About
This application is a heavily modified version of the vocal remover AI created and posted by GitHub user [tsurumeso](https://github.com/tsurumeso). You can find tsurumeso's original command line version [here](https://github.com/tsurumeso/vocal-remover). The official v5 GUI is still under developement and will be released some time in Q3 2021. The v5 beta is available via command line only at this time. You can test it [here](https://github.com/Anjok07/ultimatevocalremovergui/tree/v5-beta-cml).
- **The Developers**
- [Anjok07](https://github.com/anjok07)- Model collaborator & UVR developer.
- [aufr33](https://github.com/aufr33) - Model collaborator & fellow UVR developer. This project wouldn't be what it is without your help, thank you for your continued support!
- [DilanBoskan](https://github.com/DilanBoskan) - The main UVR GUI developer. Thank you for helping bring the GUI to life! Your hard work and continued support is greatly appreciated.
- [tsurumeso](https://github.com/tsurumeso) - The engineer who authored the original AI code. Thank you for the hard work and dedication you put into the AI code UVR is built on!

View File

@ -1 +1,11 @@
Filipino
# Ultimate Vocal Remover GUI v5.0.0
## About
This application is a heavily modified version of the vocal remover AI created and posted by GitHub user [tsurumeso](https://github.com/tsurumeso). You can find tsurumeso's original command line version [here](https://github.com/tsurumeso/vocal-remover). The official v5 GUI is still under developement and will be released some time in Q3 2021. The v5 beta is available via command line only at this time. You can test it [here](https://github.com/Anjok07/ultimatevocalremovergui/tree/v5-beta-cml).
- **The Developers**
- [Anjok07](https://github.com/anjok07)- Model collaborator & UVR developer.
- [aufr33](https://github.com/aufr33) - Model collaborator & fellow UVR developer. This project wouldn't be what it is without your help, thank you for your continued support!
- [DilanBoskan](https://github.com/DilanBoskan) - The main UVR GUI developer. Thank you for helping bring the GUI to life! Your hard work and continued support is greatly appreciated.
- [tsurumeso](https://github.com/tsurumeso) - The engineer who authored the original AI code. Thank you for the hard work and dedication you put into the AI code UVR is built on!

View File

@ -1 +1,11 @@
Japanese
# Ultimate Vocal Remover GUI v5.0.0
## About
This application is a heavily modified version of the vocal remover AI created and posted by GitHub user [tsurumeso](https://github.com/tsurumeso). You can find tsurumeso's original command line version [here](https://github.com/tsurumeso/vocal-remover). The official v5 GUI is still under developement and will be released some time in Q3 2021. The v5 beta is available via command line only at this time. You can test it [here](https://github.com/Anjok07/ultimatevocalremovergui/tree/v5-beta-cml).
- **The Developers**
- [Anjok07](https://github.com/anjok07)- Model collaborator & UVR developer.
- [aufr33](https://github.com/aufr33) - Model collaborator & fellow UVR developer. This project wouldn't be what it is without your help, thank you for your continued support!
- [DilanBoskan](https://github.com/DilanBoskan) - The main UVR GUI developer. Thank you for helping bring the GUI to life! Your hard work and continued support is greatly appreciated.
- [tsurumeso](https://github.com/tsurumeso) - The engineer who authored the original AI code. Thank you for the hard work and dedication you put into the AI code UVR is built on!

View File

@ -1 +1,11 @@
Russian
# Ultimate Vocal Remover GUI v5.0.0
## About
This application is a heavily modified version of the vocal remover AI created and posted by GitHub user [tsurumeso](https://github.com/tsurumeso). You can find tsurumeso's original command line version [here](https://github.com/tsurumeso/vocal-remover). The official v5 GUI is still under developement and will be released some time in Q3 2021. The v5 beta is available via command line only at this time. You can test it [here](https://github.com/Anjok07/ultimatevocalremovergui/tree/v5-beta-cml).
- **The Developers**
- [Anjok07](https://github.com/anjok07)- Model collaborator & UVR developer.
- [aufr33](https://github.com/aufr33) - Model collaborator & fellow UVR developer. This project wouldn't be what it is without your help, thank you for your continued support!
- [DilanBoskan](https://github.com/DilanBoskan) - The main UVR GUI developer. Thank you for helping bring the GUI to life! Your hard work and continued support is greatly appreciated.
- [tsurumeso](https://github.com/tsurumeso) - The engineer who authored the original AI code. Thank you for the hard work and dedication you put into the AI code UVR is built on!

View File

@ -1,2 +1,11 @@
Turkish
Turkish
# Ultimate Vocal Remover GUI v5.0.0
## About
This application is a heavily modified version of the vocal remover AI created and posted by GitHub user [tsurumeso](https://github.com/tsurumeso). You can find tsurumeso's original command line version [here](https://github.com/tsurumeso/vocal-remover). The official v5 GUI is still under developement and will be released some time in Q3 2021. The v5 beta is available via command line only at this time. You can test it [here](https://github.com/Anjok07/ultimatevocalremovergui/tree/v5-beta-cml).
- **The Developers**
- [Anjok07](https://github.com/anjok07)- Model collaborator & UVR developer.
- [aufr33](https://github.com/aufr33) - Model collaborator & fellow UVR developer. This project wouldn't be what it is without your help, thank you for your continued support!
- [DilanBoskan](https://github.com/DilanBoskan) - The main UVR GUI developer. Thank you for helping bring the GUI to life! Your hard work and continued support is greatly appreciated.
- [tsurumeso](https://github.com/tsurumeso) - The engineer who authored the original AI code. Thank you for the hard work and dedication you put into the AI code UVR is built on!

View File

@ -1,31 +1,34 @@
[settingswindow]
size=@Size(940 551)
pos=@Point(371 253)
size=@Size(940 619)
pos=@Point(485 246)
checkBox_gpuConversion=false
checkBox_tta=true
checkBox_modelFolder=false
checkBox_outputImage=false
checkBox_modelFolder=true
checkBox_outputImage=true
checkBox_postProcess=true
checkBox_deepExtraction=true
comboBox_instrumental=MGM-v5-2Band-32000-BETA1
comboBox_vocal=
comboBox_winSize=320
doubleSpinBox_aggressiveness=0.02
comboBox_highEndProcess=Mirroring
comboBox_presets=Custom
comboBox_winSize=1024
doubleSpinBox_aggressiveness=0.1
comboBox_highEndProcess=Bypass
comboBox_presets=ALL
checkBox_notifiyOnFinish=false
checkBox_notifyUpdates=true
checkBox_settingsStartup=false
checkBox_settingsStartup=true
checkBox_disableAnimations=false
checkBox_disableShortcuts=false
checkBox_multithreading=false
comboBox_command=Off
checkBox_autoSaveInstrumentals=true
checkBox_autoSaveVocals=true
checkBox_enableAnimations=true
checkBox_showInfoButtons=true
checkBox_ensemble=false
[user]
exportDirectory=C:/Users/boska/Desktop
language=en
language=de
inputPaths=@Invalid()
inputsDirectory=C:/Users/boska/Desktop
presets=@Variant(\0\0\0\x7f\0\0\0\x18PySide::PyObjectWrapper\0\0\0\0\xc3\x80\x3X\x3\0\0\0\x41LLq\0}q\x1(X\xe\0\0\0\x61ggressivenessq\x2G?\xb9\x99\x99\x99\x99\x99\x9aX\xe\0\0\0\x64\x65\x65pExtractionq\x3\x88X\xe\0\0\0highEndProcessq\x4X\x6\0\0\0\x42ypassq\x5X\v\0\0\0modelFolderq\x6\x88X\v\0\0\0outputImageq\a\x88X\v\0\0\0postProcessq\b\x88X\x3\0\0\0ttaq\t\x88X\n\0\0\0windowSizeq\nM\0\x4u\x86q\v.), @Variant(\0\0\0\x7f\0\0\0\x18PySide::PyObjectWrapper\0\0\0\0\xc7\x80\x3X\x4\0\0\0NONEq\0}q\x1(X\xe\0\0\0\x61ggressivenessq\x2G\xbf\xb9\x99\x99\x99\x99\x99\x9aX\xe\0\0\0\x64\x65\x65pExtractionq\x3\x89X\xe\0\0\0highEndProcessq\x4X\t\0\0\0Mirroringq\x5X\v\0\0\0modelFolderq\x6\x89X\v\0\0\0outputImageq\a\x89X\v\0\0\0postProcessq\b\x89X\x3\0\0\0ttaq\t\x89X\n\0\0\0windowSizeq\nM`\x1u\x86q\v.)
@ -35,10 +38,14 @@ theme=dark
[mainwindow]
size=@Size(946 559)
pos=@Point(486 260)
pos=@Point(472 235)
isMaximized=false
[infowindow]
size=@Size(555 462)
pos=@Point(1316 273)
size=@Size(621 551)
pos=@Point(637 279)
isMaximized=false
[presetseditorwindow]
size=@Size(322 403)
pos=@Point(799 338)

View File

@ -17,7 +17,8 @@ class Ui_InfoWindow(object):
def setupUi(self, InfoWindow):
if not InfoWindow.objectName():
InfoWindow.setObjectName(u"InfoWindow")
InfoWindow.resize(450, 357)
InfoWindow.resize(563, 562)
InfoWindow.setWindowTitle(u"Info Window")
self.verticalLayout = QVBoxLayout(InfoWindow)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName(u"verticalLayout")
@ -43,6 +44,5 @@ class Ui_InfoWindow(object):
# setupUi
def retranslateUi(self, InfoWindow):
InfoWindow.setWindowTitle(
QCoreApplication.translate("InfoWindow", u"Form", None))
pass
# retranslateUi

View File

@ -17,7 +17,7 @@ class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(947, 559)
MainWindow.resize(906, 559)
MainWindow.setMinimumSize(QSize(0, 0))
MainWindow.setStyleSheet(u"")
self.horizontalLayout_2 = QHBoxLayout(MainWindow)
@ -174,12 +174,7 @@ class Ui_MainWindow(object):
self.comboBox_presets.setObjectName(u"comboBox_presets")
self.comboBox_presets.setMinimumSize(QSize(135, 25))
self.comboBox_presets.setMaximumSize(QSize(135, 16777215))
self.comboBox_presets.setStyleSheet(u"QComboBox::down-arrow {\n"
" image: none;\n"
"}\n"
"QComboBox::drop-down {\n"
" border-width: 0px;\n"
"}")
self.comboBox_presets.setStyleSheet(u"")
self.verticalLayout_10.addWidget(self.comboBox_presets)

View File

@ -66,12 +66,14 @@ class Ui_SettingsWindow(object):
self.verticalLayout.addWidget(self.radioButton_separationSettings)
self.radioButton_shortcuts = QRadioButton(self.frame_settingsSelection)
self.radioButton_shortcuts.setObjectName(u"radioButton_shortcuts")
self.radioButton_shortcuts.setMinimumSize(QSize(0, 40))
self.radioButton_shortcuts.setProperty("menu", True)
self.radioButton_customModels = QRadioButton(
self.frame_settingsSelection)
self.radioButton_customModels.setObjectName(
u"radioButton_customModels")
self.radioButton_customModels.setMinimumSize(QSize(0, 40))
self.radioButton_customModels.setProperty("menu", True)
self.verticalLayout.addWidget(self.radioButton_shortcuts)
self.verticalLayout.addWidget(self.radioButton_customModels)
self.radioButton_customization = QRadioButton(
self.frame_settingsSelection)
@ -132,7 +134,7 @@ class Ui_SettingsWindow(object):
self.scrollAreaWidgetContents_2 = QWidget()
self.scrollAreaWidgetContents_2.setObjectName(
u"scrollAreaWidgetContents_2")
self.scrollAreaWidgetContents_2.setGeometry(QRect(0, 0, 566, 248))
self.scrollAreaWidgetContents_2.setGeometry(QRect(0, 0, 656, 551))
sizePolicy2 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
@ -146,9 +148,12 @@ class Ui_SettingsWindow(object):
self.verticalLayout_5.setContentsMargins(0, 25, 35, 0)
self.frame_3 = QFrame(self.scrollAreaWidgetContents_2)
self.frame_3.setObjectName(u"frame_3")
sizePolicy2.setHeightForWidth(
sizePolicy3 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(
self.frame_3.sizePolicy().hasHeightForWidth())
self.frame_3.setSizePolicy(sizePolicy2)
self.frame_3.setSizePolicy(sizePolicy3)
self.frame_3.setFrameShape(QFrame.NoFrame)
self.frame_3.setFrameShadow(QFrame.Raised)
self.frame_3.setLineWidth(0)
@ -175,6 +180,7 @@ class Ui_SettingsWindow(object):
self.horizontalLayout_16.setContentsMargins(-1, -1, 8, -1)
self.label_15 = QLabel(self.frame_template_3)
self.label_15.setObjectName(u"label_15")
self.label_15.setMinimumSize(QSize(0, 33))
self.label_15.setIndent(10)
self.label_15.setProperty("title", True)
@ -191,6 +197,7 @@ class Ui_SettingsWindow(object):
self.info_conversion.setMinimumSize(QSize(28, 28))
self.info_conversion.setMaximumSize(QSize(28, 28))
self.info_conversion.setCursor(QCursor(Qt.PointingHandCursor))
self.info_conversion.setText(u"i")
self.verticalLayout_21.addWidget(self.info_conversion)
@ -310,6 +317,7 @@ class Ui_SettingsWindow(object):
self.horizontalLayout_17.setContentsMargins(-1, -1, 8, -1)
self.label_16 = QLabel(self.frame_template_4)
self.label_16.setObjectName(u"label_16")
self.label_16.setMinimumSize(QSize(0, 33))
self.label_16.setIndent(10)
self.label_16.setProperty("title", True)
@ -326,6 +334,7 @@ class Ui_SettingsWindow(object):
self.info_presets.setMinimumSize(QSize(28, 28))
self.info_presets.setMaximumSize(QSize(28, 28))
self.info_presets.setCursor(QCursor(Qt.PointingHandCursor))
self.info_presets.setText(u"i")
self.verticalLayout_22.addWidget(self.info_presets)
@ -344,12 +353,12 @@ class Ui_SettingsWindow(object):
self.gridLayout_17.setContentsMargins(20, 15, 20, 10)
self.pushButton_presetsEdit = QPushButton(self.frame_18)
self.pushButton_presetsEdit.setObjectName(u"pushButton_presetsEdit")
sizePolicy3 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Fixed)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(
sizePolicy4 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Fixed)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(
self.pushButton_presetsEdit.sizePolicy().hasHeightForWidth())
self.pushButton_presetsEdit.setSizePolicy(sizePolicy3)
self.pushButton_presetsEdit.setSizePolicy(sizePolicy4)
self.pushButton_presetsEdit.setMinimumSize(QSize(65, 27))
self.pushButton_presetsEdit.setMaximumSize(QSize(16777215, 16777215))
self.pushButton_presetsEdit.setCursor(QCursor(Qt.PointingHandCursor))
@ -385,15 +394,32 @@ class Ui_SettingsWindow(object):
self.verticalLayout_27.setObjectName(u"verticalLayout_27")
self.verticalLayout_27.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_18 = QHBoxLayout()
self.horizontalLayout_18.setSpacing(15)
self.horizontalLayout_18.setObjectName(u"horizontalLayout_18")
self.horizontalLayout_18.setContentsMargins(-1, -1, 8, -1)
self.label_17 = QLabel(self.frame_template_5)
self.label_17.setObjectName(u"label_17")
self.label_17.setMinimumSize(QSize(0, 33))
self.label_17.setIndent(10)
self.label_17.setProperty("title", True)
self.horizontalLayout_18.addWidget(self.label_17)
self.frame_7 = QFrame(self.frame_template_5)
self.frame_7.setObjectName(u"frame_7")
self.frame_7.setFrameShape(QFrame.NoFrame)
self.frame_7.setFrameShadow(QFrame.Raised)
self.verticalLayout_19 = QVBoxLayout(self.frame_7)
self.verticalLayout_19.setSpacing(0)
self.verticalLayout_19.setObjectName(u"verticalLayout_19")
self.verticalLayout_19.setContentsMargins(0, 10, 0, 0)
self.checkBox_ensemble = QCheckBox(self.frame_7)
self.checkBox_ensemble.setObjectName(u"checkBox_ensemble")
self.verticalLayout_19.addWidget(self.checkBox_ensemble)
self.horizontalLayout_18.addWidget(self.frame_7)
self.verticalFrame_6 = QFrame(self.frame_template_5)
self.verticalFrame_6.setObjectName(u"verticalFrame_6")
self.verticalFrame_6.setLineWidth(0)
@ -405,23 +431,29 @@ class Ui_SettingsWindow(object):
self.info_models.setMinimumSize(QSize(28, 28))
self.info_models.setMaximumSize(QSize(28, 28))
self.info_models.setCursor(QCursor(Qt.PointingHandCursor))
self.info_models.setText(u"i")
self.verticalLayout_28.addWidget(self.info_models)
self.horizontalLayout_18.addWidget(self.verticalFrame_6)
self.horizontalLayout_18.setStretch(0, 1)
self.horizontalLayout_18.setStretch(1, 1)
self.verticalLayout_27.addLayout(self.horizontalLayout_18)
self.frame_17 = QFrame(self.frame_template_5)
self.frame_17.setObjectName(u"frame_17")
self.frame_17.setProperty("settingsContent", True)
self.gridLayout_18 = QGridLayout(self.frame_17)
self.models_stackedWidget = QStackedWidget(self.frame_template_5)
self.models_stackedWidget.setObjectName(u"models_stackedWidget")
self.models_stackedWidget.setMinimumSize(QSize(0, 150))
self.models_stackedWidget.setProperty("settingsContent", True)
self.models_stackedWidget_page_1 = QWidget()
self.models_stackedWidget_page_1.setObjectName(
u"models_stackedWidget_page_1")
self.gridLayout_18 = QGridLayout(self.models_stackedWidget_page_1)
self.gridLayout_18.setObjectName(u"gridLayout_18")
self.gridLayout_18.setHorizontalSpacing(10)
self.gridLayout_18.setContentsMargins(20, 15, 20, 10)
self.frame_instrumentalComboBox = QFrame(self.frame_17)
self.frame_instrumentalComboBox = QFrame(
self.models_stackedWidget_page_1)
self.frame_instrumentalComboBox.setObjectName(
u"frame_instrumentalComboBox")
self.frame_instrumentalComboBox.setFrameShape(QFrame.NoFrame)
@ -453,14 +485,14 @@ class Ui_SettingsWindow(object):
self.gridLayout_18.addWidget(
self.frame_instrumentalComboBox, 0, 0, 1, 1)
self.frame_constants = QFrame(self.frame_17)
self.frame_constants = QFrame(self.models_stackedWidget_page_1)
self.frame_constants.setObjectName(u"frame_constants")
sizePolicy4 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(
sizePolicy5 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
sizePolicy5.setHorizontalStretch(0)
sizePolicy5.setVerticalStretch(0)
sizePolicy5.setHeightForWidth(
self.frame_constants.sizePolicy().hasHeightForWidth())
self.frame_constants.setSizePolicy(sizePolicy4)
self.frame_constants.setSizePolicy(sizePolicy5)
self.frame_constants.setMinimumSize(QSize(0, 0))
self.frame_constants.setMaximumSize(QSize(230, 140))
self.frame_constants.setFrameShape(QFrame.NoFrame)
@ -494,7 +526,7 @@ class Ui_SettingsWindow(object):
self.gridLayout_18.addWidget(self.frame_constants, 0, 1, 1, 1)
self.frame_stackComboBox = QFrame(self.frame_17)
self.frame_stackComboBox = QFrame(self.models_stackedWidget_page_1)
self.frame_stackComboBox.setObjectName(u"frame_stackComboBox")
self.frame_stackComboBox.setFrameShape(QFrame.NoFrame)
self.frame_stackComboBox.setFrameShadow(QFrame.Raised)
@ -525,9 +557,41 @@ class Ui_SettingsWindow(object):
self.gridLayout_18.addWidget(self.frame_stackComboBox, 0, 2, 1, 1)
self.verticalLayout_27.addWidget(self.frame_17)
self.models_stackedWidget.addWidget(self.models_stackedWidget_page_1)
self.models_stackedWidget_page_2 = QWidget()
self.models_stackedWidget_page_2.setObjectName(
u"models_stackedWidget_page_2")
self.gridLayout = QGridLayout(self.models_stackedWidget_page_2)
self.gridLayout.setObjectName(u"gridLayout")
self.frame_12 = QFrame(self.models_stackedWidget_page_2)
self.frame_12.setObjectName(u"frame_12")
self.frame_12.setFrameShape(QFrame.NoFrame)
self.frame_12.setFrameShadow(QFrame.Raised)
self.label_9 = QLabel(self.frame_12)
self.label_9.setObjectName(u"label_9")
self.label_9.setGeometry(QRect(350, 30, 151, 31))
self.treeWidget = QTreeWidget(self.frame_12)
__qtreewidgetitem = QTreeWidgetItem(self.treeWidget)
__qtreewidgetitem1 = QTreeWidgetItem(__qtreewidgetitem)
__qtreewidgetitem1.setCheckState(0, Qt.Checked)
__qtreewidgetitem2 = QTreeWidgetItem(__qtreewidgetitem)
__qtreewidgetitem2.setCheckState(0, Qt.Unchecked)
__qtreewidgetitem3 = QTreeWidgetItem(self.treeWidget)
__qtreewidgetitem4 = QTreeWidgetItem(__qtreewidgetitem3)
__qtreewidgetitem4.setCheckState(0, Qt.Unchecked)
__qtreewidgetitem5 = QTreeWidgetItem(__qtreewidgetitem3)
__qtreewidgetitem5.setCheckState(0, Qt.Unchecked)
QTreeWidgetItem(self.treeWidget)
self.treeWidget.setObjectName(u"treeWidget")
self.treeWidget.setGeometry(QRect(40, 0, 256, 192))
self.treeWidget.setStyleSheet(u"")
self.treeWidget.header().setVisible(False)
self.verticalLayout_27.setStretch(1, 1)
self.gridLayout.addWidget(self.frame_12, 0, 0, 1, 1)
self.models_stackedWidget.addWidget(self.models_stackedWidget_page_2)
self.verticalLayout_27.addWidget(self.models_stackedWidget)
self.verticalLayout_6.addWidget(self.frame_template_5)
@ -553,7 +617,7 @@ class Ui_SettingsWindow(object):
self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(
u"scrollAreaWidgetContents")
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 98, 35))
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 656, 551))
self.scrollAreaWidgetContents.setStyleSheet(u"QFrame#frame_engine, QFrame#frame_modelOptions {\n"
" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0.221409, y2:0.587, stop:0.119318 rgba(85, 78, 163, 255), stop:0.683616 rgba(0, 0, 0, 0));\n"
"}")
@ -588,7 +652,7 @@ class Ui_SettingsWindow(object):
self.scrollAreaWidgetContents_4 = QWidget()
self.scrollAreaWidgetContents_4.setObjectName(
u"scrollAreaWidgetContents_4")
self.scrollAreaWidgetContents_4.setGeometry(QRect(0, 0, 98, 35))
self.scrollAreaWidgetContents_4.setGeometry(QRect(0, 0, 656, 551))
self.scrollAreaWidgetContents_4.setStyleSheet(u"QFrame#frame_engine, QFrame#frame_modelOptions {\n"
" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0.221409, y2:0.587, stop:0.119318 rgba(85, 78, 163, 255), stop:0.683616 rgba(0, 0, 0, 0));\n"
"}")
@ -655,12 +719,18 @@ class Ui_SettingsWindow(object):
self.verticalLayout_16.setContentsMargins(0, 25, 35, 0)
self.frame_4 = QFrame(self.scrollAreaWidgetContents_5)
self.frame_4.setObjectName(u"frame_4")
sizePolicy6 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum)
sizePolicy6.setHorizontalStretch(0)
sizePolicy6.setVerticalStretch(0)
sizePolicy6.setHeightForWidth(
self.frame_4.sizePolicy().hasHeightForWidth())
self.frame_4.setSizePolicy(sizePolicy6)
self.frame_4.setFrameShape(QFrame.NoFrame)
self.frame_4.setFrameShadow(QFrame.Raised)
self.frame_4.setLineWidth(0)
self.gridLayout_7 = QGridLayout(self.frame_4)
self.gridLayout_7.setObjectName(u"gridLayout_7")
self.gridLayout_7.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_9 = QVBoxLayout(self.frame_4)
self.verticalLayout_9.setObjectName(u"verticalLayout_9")
self.verticalLayout_9.setContentsMargins(0, 0, 0, 0)
self.frame_5 = QFrame(self.frame_4)
self.frame_5.setObjectName(u"frame_5")
self.frame_5.setFrameShape(QFrame.NoFrame)
@ -691,6 +761,7 @@ class Ui_SettingsWindow(object):
self.horizontalLayout_14.setContentsMargins(-1, -1, 8, -1)
self.label_13 = QLabel(self.frame_template)
self.label_13.setObjectName(u"label_13")
self.label_13.setMinimumSize(QSize(0, 33))
self.label_13.setIndent(10)
self.label_13.setProperty("title", True)
@ -707,6 +778,7 @@ class Ui_SettingsWindow(object):
self.info_settings.setMinimumSize(QSize(28, 28))
self.info_settings.setMaximumSize(QSize(28, 28))
self.info_settings.setCursor(QCursor(Qt.PointingHandCursor))
self.info_settings.setText(u"i")
self.verticalLayout_13.addWidget(self.info_settings)
@ -733,18 +805,17 @@ class Ui_SettingsWindow(object):
self.gridLayout_4.setHorizontalSpacing(0)
self.gridLayout_4.setVerticalSpacing(10)
self.gridLayout_4.setContentsMargins(0, 5, 0, 0)
self.checkBox_disableAnimations = QCheckBox(self.frame_8)
self.checkBox_disableAnimations.setObjectName(
u"checkBox_disableAnimations")
self.checkBox_enableAnimations = QCheckBox(self.frame_8)
self.checkBox_enableAnimations.setObjectName(
u"checkBox_enableAnimations")
self.gridLayout_4.addWidget(
self.checkBox_disableAnimations, 4, 0, 1, 1)
self.gridLayout_4.addWidget(self.checkBox_enableAnimations, 4, 0, 1, 1)
self.checkBox_disableShortcuts = QCheckBox(self.frame_8)
self.checkBox_disableShortcuts.setObjectName(
u"checkBox_disableShortcuts")
self.checkBox_showInfoButtons = QCheckBox(self.frame_8)
self.checkBox_showInfoButtons.setObjectName(
u"checkBox_showInfoButtons")
self.gridLayout_4.addWidget(self.checkBox_disableShortcuts, 4, 1, 1, 1)
self.gridLayout_4.addWidget(self.checkBox_showInfoButtons, 4, 1, 1, 1)
self.checkBox_notifyUpdates = QCheckBox(self.frame_8)
self.checkBox_notifyUpdates.setObjectName(u"checkBox_notifyUpdates")
@ -801,12 +872,12 @@ class Ui_SettingsWindow(object):
self.pushButton_clearCommand = QPushButton(self.frame_11)
self.pushButton_clearCommand.setObjectName(u"pushButton_clearCommand")
sizePolicy5 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
sizePolicy5.setHorizontalStretch(0)
sizePolicy5.setVerticalStretch(0)
sizePolicy5.setHeightForWidth(
sizePolicy7 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
sizePolicy7.setHorizontalStretch(0)
sizePolicy7.setVerticalStretch(0)
sizePolicy7.setHeightForWidth(
self.pushButton_clearCommand.sizePolicy().hasHeightForWidth())
self.pushButton_clearCommand.setSizePolicy(sizePolicy5)
self.pushButton_clearCommand.setSizePolicy(sizePolicy7)
self.pushButton_clearCommand.setMinimumSize(QSize(50, 0))
self.pushButton_clearCommand.setCursor(QCursor(Qt.PointingHandCursor))
self.pushButton_clearCommand.setFlat(True)
@ -837,6 +908,7 @@ class Ui_SettingsWindow(object):
self.horizontalLayout_7.setContentsMargins(-1, -1, 8, -1)
self.label_5 = QLabel(self.frame_export)
self.label_5.setObjectName(u"label_5")
self.label_5.setMinimumSize(QSize(0, 33))
self.label_5.setIndent(10)
self.label_5.setProperty("title", True)
@ -853,6 +925,7 @@ class Ui_SettingsWindow(object):
self.info_export.setMinimumSize(QSize(28, 28))
self.info_export.setMaximumSize(QSize(28, 28))
self.info_export.setCursor(QCursor(Qt.PointingHandCursor))
self.info_export.setText(u"i")
self.verticalLayout_8.addWidget(self.info_export)
@ -884,9 +957,9 @@ class Ui_SettingsWindow(object):
self.label_3 = QLabel(self.frame_export_2)
self.label_3.setObjectName(u"label_3")
sizePolicy4.setHeightForWidth(
sizePolicy5.setHeightForWidth(
self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy4)
self.label_3.setSizePolicy(sizePolicy5)
self.label_3.setMinimumSize(QSize(110, 0))
self.label_3.setAlignment(
Qt.AlignLeading | Qt.AlignLeft | Qt.AlignVCenter)
@ -1040,7 +1113,7 @@ class Ui_SettingsWindow(object):
self.horizontalLayout_6.setStretch(0, 1)
self.gridLayout_7.addWidget(self.frame_5, 0, 0, 1, 1)
self.verticalLayout_9.addWidget(self.frame_5)
self.verticalLayout_16.addWidget(self.frame_4, 0, Qt.AlignTop)
@ -1056,8 +1129,9 @@ class Ui_SettingsWindow(object):
self.retranslateUi(SettingsWindow)
self.stackedWidget.setCurrentIndex(3)
self.stackedWidget.setCurrentIndex(0)
self.comboBox_highEndProcess.setCurrentIndex(4)
self.models_stackedWidget.setCurrentIndex(1)
self.comboBox_winSize.setCurrentIndex(0)
self.pushButton_de.setDefault(False)
self.pushButton_en.setDefault(False)
@ -1070,16 +1144,14 @@ class Ui_SettingsWindow(object):
"SettingsWindow", u"Settings", None))
self.radioButton_separationSettings.setText(
QCoreApplication.translate("SettingsWindow", u"Separation Settings", None))
self.radioButton_shortcuts.setText(
QCoreApplication.translate("SettingsWindow", u"Shortcuts", None))
self.radioButton_customModels.setText(
QCoreApplication.translate("SettingsWindow", u"Custom Models", None))
self.radioButton_customization.setText(
QCoreApplication.translate("SettingsWindow", u"Customization", None))
self.radioButton_preferences.setText(
QCoreApplication.translate("SettingsWindow", u"Preferences", None))
self.label_15.setText(QCoreApplication.translate(
"SettingsWindow", u"Conversion", None))
self.info_conversion.setText(
QCoreApplication.translate("SettingsWindow", u"i", None))
self.comboBox_highEndProcess.setItemText(
0, QCoreApplication.translate("SettingsWindow", u"None", None))
self.comboBox_highEndProcess.setItemText(
@ -1113,14 +1185,12 @@ class Ui_SettingsWindow(object):
"SettingsWindow", u"Deep extraction", None))
self.label_16.setText(QCoreApplication.translate(
"SettingsWindow", u"Presets", None))
self.info_presets.setText(
QCoreApplication.translate("SettingsWindow", u"i", None))
self.pushButton_presetsEdit.setText(
QCoreApplication.translate("SettingsWindow", u"Edit", None))
self.label_17.setText(QCoreApplication.translate(
"SettingsWindow", u"Models", None))
self.info_models.setText(
QCoreApplication.translate("SettingsWindow", u"i", None))
self.checkBox_ensemble.setText(
QCoreApplication.translate("SettingsWindow", u"Ensemble", None))
self.label_2.setText(QCoreApplication.translate(
"SettingsWindow", u"Instrumental Model", None))
self.label_winSize.setText(QCoreApplication.translate(
@ -1128,6 +1198,37 @@ class Ui_SettingsWindow(object):
self.label_4.setText(QCoreApplication.translate(
"SettingsWindow", u"Vocal Model", None))
self.label_9.setText(QCoreApplication.translate(
"SettingsWindow", u"Ensemble Page", None))
___qtreewidgetitem = self.treeWidget.headerItem()
___qtreewidgetitem.setText(
0, QCoreApplication.translate("SettingsWindow", u"1", None))
__sortingEnabled = self.treeWidget.isSortingEnabled()
self.treeWidget.setSortingEnabled(False)
___qtreewidgetitem1 = self.treeWidget.topLevelItem(0)
___qtreewidgetitem1.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Instrumental", None))
___qtreewidgetitem2 = ___qtreewidgetitem1.child(0)
___qtreewidgetitem2.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Model 1", None))
___qtreewidgetitem3 = ___qtreewidgetitem1.child(1)
___qtreewidgetitem3.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Model 2", None))
___qtreewidgetitem4 = self.treeWidget.topLevelItem(1)
___qtreewidgetitem4.setText(
0, QCoreApplication.translate("SettingsWindow", u"Vocal", None))
___qtreewidgetitem5 = ___qtreewidgetitem4.child(0)
___qtreewidgetitem5.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Vocal Model 1", None))
___qtreewidgetitem6 = ___qtreewidgetitem4.child(1)
___qtreewidgetitem6.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Vocal Model 2", None))
___qtreewidgetitem7 = self.treeWidget.topLevelItem(2)
___qtreewidgetitem7.setText(0, QCoreApplication.translate(
"SettingsWindow", u"Custom", None))
self.treeWidget.setSortingEnabled(__sortingEnabled)
self.label_6.setText(QCoreApplication.translate(
"SettingsWindow", u"Themes", None))
self.radioButton_darkTheme.setText(
@ -1136,12 +1237,10 @@ class Ui_SettingsWindow(object):
QCoreApplication.translate("SettingsWindow", u"Light", None))
self.label_13.setText(QCoreApplication.translate(
"SettingsWindow", u"Settings", None))
self.info_settings.setText(
QCoreApplication.translate("SettingsWindow", u"i", None))
self.checkBox_disableAnimations.setText(QCoreApplication.translate(
"SettingsWindow", u"Disable Animations", None))
self.checkBox_disableShortcuts.setText(QCoreApplication.translate(
"SettingsWindow", u"Disable Shortcuts", None))
self.checkBox_enableAnimations.setText(QCoreApplication.translate(
"SettingsWindow", u"Enable Animations", None))
self.checkBox_showInfoButtons.setText(QCoreApplication.translate(
"SettingsWindow", u"Show Info Buttons", None))
self.checkBox_notifyUpdates.setText(QCoreApplication.translate(
"SettingsWindow", u"Notify me of application updates", None))
self.checkBox_notifiyOnFinish.setText(QCoreApplication.translate(
@ -1165,8 +1264,6 @@ class Ui_SettingsWindow(object):
QCoreApplication.translate("SettingsWindow", u"Clear", None))
self.label_5.setText(QCoreApplication.translate(
"SettingsWindow", u"Export Settings", None))
self.info_export.setText(
QCoreApplication.translate("SettingsWindow", u"i", None))
self.pushButton_exportDirectory.setText("")
self.label_3.setText(QCoreApplication.translate(
"SettingsWindow", u"Export Directory:", None))

View File

@ -110,7 +110,8 @@ class InfoWindow(QtWidgets.QWidget):
Save states of the widgets in this window
"""
def set_text(self, text: str):
def update_info(self, title: str, text: str):
self.setWindowTitle(title)
self.ui.textEdit.setMarkdown(text)
# -Overriden methods-
@ -129,8 +130,6 @@ class InfoWindow(QtWidgets.QWidget):
self.settings.setValue('isMaximized',
self.isMaximized())
self.settings.endGroup()
# Commit Save
self.settings.sync()
def update_translation(self):
"""

View File

@ -82,7 +82,7 @@ class MainWindow(QtWidgets.QWidget):
Open the settings window
"""
self.logger.info('Opening settings window...')
if not self.app.windows['settings'].ui.checkBox_disableAnimations.isChecked():
if self.app.settingsWindow.ui.checkBox_enableAnimations.isChecked():
# Animations enabled
self.settings_ani.start()
# Reshow window
@ -589,8 +589,6 @@ class MainWindow(QtWidgets.QWidget):
self.settings.setValue('isMaximized',
self.isMaximized())
self.settings.endGroup()
# Commit Save
self.settings.sync()
def update_translation(self):
"""
@ -686,7 +684,7 @@ class AudioPlayer(QtMultimedia.QMediaPlayer):
"""
Resume playing the song and send gif to pause image
"""
if not self.app.windows['settings'].ui.checkBox_disableAnimations.isChecked():
if self.app.settingsWindow.ui.checkBox_enableAnimations.isChecked():
# Enabled Animations
# Start gif
self.playpause_gif.setPaused(False)
@ -700,7 +698,7 @@ class AudioPlayer(QtMultimedia.QMediaPlayer):
"""
Pause output and update image to play
"""
if not self.app.windows['settings'].ui.checkBox_disableAnimations.isChecked():
if self.app.settingsWindow.ui.checkBox_enableAnimations.isChecked():
# Enabled Animations
# Start gif
self.playpause_gif.setPaused(False)

View File

@ -167,9 +167,10 @@ class PresetsEditorWindow(QtWidgets.QWidget):
# Some paths already selected
msg = QtWidgets.QMessageBox()
msg.setWindowTitle(self.tr('Test', 'Confirmation', 'A'))
msg.setWindowTitle(QtCore.QCoreApplication.translate('MessageBox', 'Confirmation'))
msg.setIcon(QtWidgets.QMessageBox.Icon.Warning)
msg.setText(f'You will delete {len(selected_items)} items. Do you wish to continue?')
msg.setText(QtCore.QCoreApplication.translate('MessageBox',
'You will delete %n items. Do you wish to continue?').replace("%n", str(len(selected_items))))
msg.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
msg.setWindowFlag(Qt.WindowStaysOnTopHint)
val = msg.exec_()

View File

@ -15,6 +15,7 @@ from .infowindow import InfoWindow
# -Other-
import datetime as dt
from collections import OrderedDict
import torch
# System
import hashlib
import os
@ -26,7 +27,7 @@ class SettingsWindow(QtWidgets.QWidget):
"""
Settings window for UVR, available sections are:
- Seperation Settings: Modify settings, like model and ai engine for the seperation of audio files
- Shortcuts: Set shortcuts to quickly change settings or select other music files/new export directory
- Custom Models: Implement custom models
- Customization: Select from different themes for the application
- Preferences: Change personalised settings like language, export directory,
and whether to show the command line
@ -46,7 +47,7 @@ class SettingsWindow(QtWidgets.QWidget):
# -Other Variables-
self.menu_update_methods = {
0: self.update_page_seperationSettings,
1: self.update_page_shortcuts,
1: self.update_page_customModels,
2: self.update_page_customization,
3: self.update_page_preferences,
}
@ -142,6 +143,21 @@ class SettingsWindow(QtWidgets.QWidget):
self.settingsManager.set_settings(settings)
self.search_for_preset = True
def checkbox_showInfoButtons_toggled(self):
"""Show or hide info buttons based on checkbox state"""
info_buttons = filter(lambda btn: "info" in btn.objectName().lower(),
self.findChildren(QtWidgets.QPushButton))
show_buttons = self.ui.checkBox_showInfoButtons.isChecked()
for btn in info_buttons:
btn.setVisible(show_buttons)
def checkbox_ensemble_toggled(self):
"""Switch to normal or ensemble page in the models section"""
if self.ui.checkBox_ensemble.isChecked():
self.ui.models_stackedWidget.setCurrentIndex(1)
else:
self.ui.models_stackedWidget.setCurrentIndex(0)
def frame_export_dragEnterEvent(self, event: QtGui.QDragEnterEvent):
"""
Check whether the files the user is dragging over the widget
@ -197,6 +213,8 @@ class SettingsWindow(QtWidgets.QWidget):
self.logger.indent_backwards()
def settings_changed(self):
# Searches for matching presets and changes the currently selected
# preset with the matched one if a preset was found
if self.search_for_preset:
current_settings = self.settingsManager.get_settings(0)
presets: dict = self.app.windows['presetsEditor'].get_presets()
@ -216,17 +234,6 @@ class SettingsWindow(QtWidgets.QWidget):
else:
self.ui.comboBox_presets.setCurrentIndex(0)
def show_info(self, title: str, text: str):
"""Show info to user with QMessageBox
Args:
title (str): Title of Message
text (str): Content of Message
"""
self.app.windows['info'].setWindowTitle(title)
self.app.windows['info'].set_text(text)
self.app.windows['info'].show()
# -Window Setup Methods-
def setup_window(self):
@ -332,6 +339,10 @@ class SettingsWindow(QtWidgets.QWidget):
self.ui.comboBox_instrumental.currentIndexChanged.connect(self.update_page_seperationSettings)
self.ui.comboBox_vocal.currentIndexChanged.connect(self.update_page_seperationSettings)
self.ui.comboBox_presets.currentIndexChanged.connect(self.comboBox_presets_currentIndexChanged)
self.ui.checkBox_ensemble.toggled.connect(self.checkbox_ensemble_toggled)
# -Customization Page-
self.ui.radioButton_lightTheme.clicked.connect(lambda: self.app.themeManager.load_theme('light'))
self.ui.radioButton_darkTheme.clicked.connect(lambda: self.app.themeManager.load_theme('dark'))
# -Preferences Page-
# Language
for button in self.ui.frame_languages.findChildren(QtWidgets.QPushButton):
@ -347,12 +358,8 @@ class SettingsWindow(QtWidgets.QWidget):
self.ui.pushButton_clearCommand.clicked.connect(self.pushButton_clearCommand_clicked)
# Comboboxes
self.ui.comboBox_command.currentIndexChanged.connect(self.comboBox_command_currentIndexChanged)
self.ui.radioButton_lightTheme.clicked.connect(lambda: self.app.themeManager.load_theme('light'))
self.ui.radioButton_darkTheme.clicked.connect(lambda: self.app.themeManager.load_theme('dark'))
self.ui.info_conversion.clicked.connect(lambda: self.show_info(self.tr("Conversion Info"),
self.app.translator.loaded_language.settings_conversion))
# Checkboxes
self.ui.checkBox_showInfoButtons.toggled.connect(self.checkbox_showInfoButtons_toggled)
bind_settings_changed()
@ -368,7 +375,7 @@ class SettingsWindow(QtWidgets.QWidget):
self.menu_group = QtWidgets.QButtonGroup(self) # Menu group
self.menu_group.addButton(self.ui.radioButton_separationSettings,
id=0)
self.menu_group.addButton(self.ui.radioButton_shortcuts,
self.menu_group.addButton(self.ui.radioButton_customModels,
id=1)
self.menu_group.addButton(self.ui.radioButton_customization,
id=2)
@ -377,17 +384,14 @@ class SettingsWindow(QtWidgets.QWidget):
# -Before setup-
self.search_for_preset = False
# Load saved settings for widgets
self.load_window()
# Update available model lists
self._update_selectable_models()
# Open settings window on startup
open_settings = self.settings.value('settingswindow/checkBox_settingsStartup',
const.DEFAULT_SETTINGS['checkBox_settingsStartup'],
bool)
if not const.CUDA_AVAILABLE:
self.ui.checkBox_gpuConversion.setEnabled(False)
self.ui.checkBox_gpuConversion.setToolTip("CUDA is not available on your system")
# Load saved settings for widgets
self.load_window()
# -Setup-
setup_menu()
@ -399,12 +403,18 @@ class SettingsWindow(QtWidgets.QWidget):
self.app.windows['main'].pushButton_settings_clicked()
# -After setup-
# Clear command
# Commands for update
self.pushButton_clearCommand_clicked()
self.checkbox_showInfoButtons_toggled()
self.checkbox_ensemble_toggled()
# Load menu (Preferences)
self.update_window()
self.menu_loadPage(0, True)
self.search_for_preset = True
if not torch.cuda.is_available():
self.ui.checkBox_gpuConversion.setEnabled(False)
self.ui.checkBox_gpuConversion.setChecked(False)
self.ui.checkBox_gpuConversion.setToolTip("CUDA is not available on your system")
self.logger.indent_backwards()
def load_window(self):
@ -431,7 +441,7 @@ class SettingsWindow(QtWidgets.QWidget):
self.logger.info('Updating settings window...',
indent_forwards=True)
self.update_page_seperationSettings()
self.update_page_shortcuts()
self.update_page_customModels()
self.update_page_customization()
self.update_page_preferences()
self.logger.indent_backwards()
@ -442,9 +452,7 @@ class SettingsWindow(QtWidgets.QWidget):
Update values and states of all widgets in the
seperation settings page
"""
self.logger.info('Updating: "Seperation Settings" page',
indent_forwards=True)
# -Presets subgroup-
def refill_presets_combobox():
mainWindowPresetWidget = self.app.windows['main'].ui.comboBox_presets
self.ui.comboBox_presets.blockSignals(True)
mainWindowPresetWidget.blockSignals(True)
@ -464,6 +472,11 @@ class SettingsWindow(QtWidgets.QWidget):
mainWindowPresetWidget.blockSignals(False)
self.settings_changed()
self.logger.info('Updating: "Seperation Settings" page',
indent_forwards=True)
# -Presets subgroup-
refill_presets_combobox()
self.logger.indent_backwards()
def _update_selectable_models(self):
@ -497,7 +510,6 @@ class SettingsWindow(QtWidgets.QWidget):
# Get data
full_path = os.path.join(folder, f)
model_id = get_model_id(full_path)
print(model_id)
model_name = os.path.splitext(os.path.basename(f))[0]
# Add item to combobox
widget.addItem(model_name,
@ -516,13 +528,13 @@ class SettingsWindow(QtWidgets.QWidget):
fill_model_comboBox(widget=self.ui.comboBox_vocal,
folder=ResourcePaths.vocalModelsDir)
# Shortcuts Page
def update_page_shortcuts(self):
# Custom Models Page
def update_page_customModels(self):
"""
Update values and states of all widgets in the
shortcuts page
custom models page
"""
self.logger.info('Updating: "Shortcuts" page',
self.logger.info('Updating: "Custom Models" page',
indent_forwards=True)
self.logger.indent_backwards()
@ -577,7 +589,7 @@ class SettingsWindow(QtWidgets.QWidget):
Which page to load.
0 - Seperation Settings Page
1 - Shortcuts Page
1 - Custom Models Page
2 - Customization Page
3 - Preferences Page
force (bool):
@ -626,8 +638,6 @@ class SettingsWindow(QtWidgets.QWidget):
self.settings.setValue('pos',
self.pos())
self.settings.endGroup()
# Commit Save
self.settings.sync()
def update_translation(self):
"""Update translation of this window"""
@ -680,6 +690,8 @@ class SettingsManager:
self.win.ui.checkBox_postProcess,
self.win.ui.checkBox_deepExtraction,
# -Models-
# Checkbox
self.win.ui.checkBox_ensemble,
# Combobox
self.win.ui.comboBox_instrumental,
self.win.ui.comboBox_vocal,
@ -690,7 +702,7 @@ class SettingsManager:
# -Presets-
# Combobox
self.win.ui.comboBox_presets, ]
shortcuts_widgets = []
customModels_widgets = []
customization_widgets = [
# self.win.ui.radioButton_lightTheme,
# self.win.ui.radioButton_darkTheme,
@ -701,8 +713,8 @@ class SettingsManager:
self.win.ui.checkBox_notifiyOnFinish,
self.win.ui.checkBox_notifyUpdates,
self.win.ui.checkBox_settingsStartup,
self.win.ui.checkBox_disableAnimations,
self.win.ui.checkBox_disableShortcuts,
self.win.ui.checkBox_enableAnimations,
self.win.ui.checkBox_showInfoButtons,
self.win.ui.checkBox_multithreading,
# Combobox
self.win.ui.comboBox_command,
@ -713,7 +725,7 @@ class SettingsManager:
# Assign to save_widgets
self.save_widgets[0] = seperation_settings_widgets
self.save_widgets[1] = shortcuts_widgets
self.save_widgets[1] = customModels_widgets
self.save_widgets[2] = customization_widgets
self.save_widgets[3] = preferences_widgets
@ -726,7 +738,7 @@ class SettingsManager:
Defaults to None.
0 - Seperation Settings Page
1 - Shortcuts Page
1 - Custom Models Page
2 - Customization Page
3 - Preferences Page
None - All widgets
@ -919,7 +931,7 @@ class SettingsManager:
Defaults to None.
0 - Seperation Settings Page
1 - Shortcuts Page
1 - Custom Models Page
2 - Customization Page
3 - Preferences Page
None - All widgets

View File

@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>357</height>
<width>563</width>
<height>562</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Info Window</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>947</width>
<width>906</width>
<height>559</height>
</rect>
</property>
@ -394,12 +394,7 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">QComboBox::down-arrow {
image: none;
}
QComboBox::drop-down {
border-width: 0px;
}</string>
<string notr="true"/>
</property>
</widget>
</item>

View File

@ -133,7 +133,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_shortcuts">
<widget class="QRadioButton" name="radioButton_customModels">
<property name="minimumSize">
<size>
<width>0</width>
@ -141,7 +141,7 @@
</size>
</property>
<property name="text">
<string>Shortcuts</string>
<string>Custom Models</string>
</property>
<property name="menu" stdset="0">
<bool>true</bool>
@ -234,7 +234,7 @@
<number>0</number>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_seperationSettings">
<property name="styleSheet">
@ -287,8 +287,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>566</width>
<height>248</height>
<width>656</width>
<height>551</height>
</rect>
</property>
<property name="sizePolicy">
@ -322,7 +322,7 @@
<item alignment="Qt::AlignTop">
<widget class="QFrame" name="frame_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -404,6 +404,12 @@
</property>
<item>
<widget class="QLabel" name="label_15">
<property name="minimumSize">
<size>
<width>0</width>
<height>33</height>
</size>
</property>
<property name="text">
<string>Conversion</string>
</property>
@ -451,7 +457,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>
@ -700,6 +706,12 @@
</property>
<item>
<widget class="QLabel" name="label_16">
<property name="minimumSize">
<size>
<width>0</width>
<height>33</height>
</size>
</property>
<property name="text">
<string>Presets</string>
</property>
@ -747,7 +759,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>
@ -841,7 +853,7 @@
<property name="acceptDrops">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27" stretch="0,1">
<layout class="QVBoxLayout" name="verticalLayout_27" stretch="0,0">
<property name="spacing">
<number>7</number>
</property>
@ -858,12 +870,21 @@
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="1,0">
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="0,1,0">
<property name="spacing">
<number>15</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<item>
<widget class="QLabel" name="label_17">
<property name="minimumSize">
<size>
<width>0</width>
<height>33</height>
</size>
</property>
<property name="text">
<string>Models</string>
</property>
@ -875,6 +896,40 @@
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_7">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_19">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox_ensemble">
<property name="text">
<string>Ensemble</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="verticalFrame_6">
<property name="lineWidth">
@ -911,7 +966,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>
@ -921,10 +976,20 @@
</layout>
</item>
<item>
<widget class="QFrame" name="frame_17">
<widget class="QStackedWidget" name="models_stackedWidget">
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<property name="settingsContent" stdset="0">
<bool>true</bool>
</property>
<widget class="QWidget" name="models_stackedWidget_page_1" native="true">
<layout class="QGridLayout" name="gridLayout_18" rowstretch="0">
<property name="leftMargin">
<number>20</number>
@ -1204,6 +1269,102 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="models_stackedWidget_page_2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QFrame" name="frame_12">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>350</x>
<y>30</y>
<width>151</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Ensemble Page</string>
</property>
</widget>
<widget class="QTreeWidget" name="treeWidget">
<property name="geometry">
<rect>
<x>40</x>
<y>0</y>
<width>256</width>
<height>192</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>1</string>
</property>
</column>
<item>
<property name="text">
<string>Instrumental</string>
</property>
<item>
<property name="text">
<string>Model 1</string>
</property>
<property name="checkState">
<enum>Checked</enum>
</property>
</item>
<item>
<property name="text">
<string>Model 2</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
</item>
<item>
<property name="text">
<string>Vocal</string>
</property>
<item>
<property name="text">
<string>Vocal Model 1</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string>Vocal Model 2</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
</item>
<item>
<property name="text">
<string>Custom</string>
</property>
</item>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
@ -1253,8 +1414,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>35</height>
<width>656</width>
<height>551</height>
</rect>
</property>
<property name="styleSheet">
@ -1330,8 +1491,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>35</height>
<width>656</width>
<height>551</height>
</rect>
</property>
<property name="styleSheet">
@ -1488,6 +1649,12 @@
</property>
<item alignment="Qt::AlignTop">
<widget class="QFrame" name="frame_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@ -1497,7 +1664,7 @@
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="leftMargin">
<number>0</number>
</property>
@ -1510,7 +1677,7 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<item>
<widget class="QFrame" name="frame_5">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
@ -1598,6 +1765,12 @@
</property>
<item>
<widget class="QLabel" name="label_13">
<property name="minimumSize">
<size>
<width>0</width>
<height>33</height>
</size>
</property>
<property name="text">
<string>Settings</string>
</property>
@ -1645,7 +1818,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>
@ -1706,16 +1879,16 @@
<number>10</number>
</property>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBox_disableAnimations">
<widget class="QCheckBox" name="checkBox_enableAnimations">
<property name="text">
<string>Disable Animations</string>
<string>Enable Animations</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBox_disableShortcuts">
<widget class="QCheckBox" name="checkBox_showInfoButtons">
<property name="text">
<string>Disable Shortcuts</string>
<string>Show Info Buttons</string>
</property>
</widget>
</item>
@ -1905,6 +2078,12 @@
</property>
<item>
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>33</height>
</size>
</property>
<property name="text">
<string>Export Settings</string>
</property>
@ -1952,7 +2131,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>