mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-07-01 12:26:26 +00:00
feat: insert score when no chart data
This commit is contained in:
@ -39,6 +39,9 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -206,6 +209,9 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -287,6 +293,9 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -336,6 +345,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
|
<widget class="QCheckBox" name="warnIfIncompleteCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>warnIfIncomplete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
@ -1,284 +1,293 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'scoreEditor.ui'
|
## Form generated from reading UI file 'scoreEditor.ui'
|
||||||
##
|
##
|
||||||
## Created by: Qt User Interface Compiler version 6.5.2
|
## Created by: Qt User Interface Compiler version 6.5.2
|
||||||
##
|
##
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||||
QMetaObject, QObject, QPoint, QRect,
|
QMetaObject, QObject, QPoint, QRect,
|
||||||
QSize, QTime, QUrl, Qt)
|
QSize, QTime, QUrl, Qt)
|
||||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||||
QFont, QFontDatabase, QGradient, QIcon,
|
QFont, QFontDatabase, QGradient, QIcon,
|
||||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||||
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDateTimeEdit,
|
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDateTimeEdit,
|
||||||
QGridLayout, QLabel, QLineEdit, QPushButton,
|
QGridLayout, QLabel, QLineEdit, QPushButton,
|
||||||
QSizePolicy, QSpacerItem, QSpinBox, QWidget)
|
QSizePolicy, QSpacerItem, QSpinBox, QWidget)
|
||||||
|
|
||||||
from ui.implements.components.focusSelectAllLineEdit import FocusSelectAllLineEdit
|
from ui.implements.components.focusSelectAllLineEdit import FocusSelectAllLineEdit
|
||||||
|
|
||||||
class Ui_ScoreEditor(object):
|
class Ui_ScoreEditor(object):
|
||||||
def setupUi(self, ScoreEditor):
|
def setupUi(self, ScoreEditor):
|
||||||
if not ScoreEditor.objectName():
|
if not ScoreEditor.objectName():
|
||||||
ScoreEditor.setObjectName(u"ScoreEditor")
|
ScoreEditor.setObjectName(u"ScoreEditor")
|
||||||
ScoreEditor.resize(450, 350)
|
ScoreEditor.resize(450, 350)
|
||||||
ScoreEditor.setWindowTitle(u"ScoreEditor")
|
ScoreEditor.setWindowTitle(u"ScoreEditor")
|
||||||
self.gridLayout = QGridLayout(ScoreEditor)
|
self.gridLayout = QGridLayout(ScoreEditor)
|
||||||
self.gridLayout.setObjectName(u"gridLayout")
|
self.gridLayout.setObjectName(u"gridLayout")
|
||||||
self.pureNoneCheckBox = QCheckBox(ScoreEditor)
|
self.pureNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
self.pureNoneCheckBox.setObjectName(u"pureNoneCheckBox")
|
self.pureNoneCheckBox.setObjectName(u"pureNoneCheckBox")
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.pureNoneCheckBox, 2, 2, 1, 1)
|
self.gridLayout.addWidget(self.pureNoneCheckBox, 2, 2, 1, 1)
|
||||||
|
|
||||||
self.label_7 = QLabel(ScoreEditor)
|
self.label_7 = QLabel(ScoreEditor)
|
||||||
self.label_7.setObjectName(u"label_7")
|
self.label_7.setObjectName(u"label_7")
|
||||||
self.label_7.setText(u"Modifier")
|
self.label_7.setText(u"Modifier")
|
||||||
self.label_7.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_7.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.label_7, 9, 0, 1, 1)
|
self.gridLayout.addWidget(self.label_7, 9, 0, 1, 1)
|
||||||
|
|
||||||
self.pureSpinBox = QSpinBox(ScoreEditor)
|
self.pureSpinBox = QSpinBox(ScoreEditor)
|
||||||
self.pureSpinBox.setObjectName(u"pureSpinBox")
|
self.pureSpinBox.setObjectName(u"pureSpinBox")
|
||||||
self.pureSpinBox.setMinimumSize(QSize(100, 0))
|
self.pureSpinBox.setMinimumSize(QSize(100, 0))
|
||||||
self.pureSpinBox.setMaximum(0)
|
self.pureSpinBox.setMinimum(0)
|
||||||
|
self.pureSpinBox.setMaximum(0)
|
||||||
self.gridLayout.addWidget(self.pureSpinBox, 2, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.pureSpinBox, 2, 1, 1, 1)
|
||||||
self.clearTypeNoneCheckBox = QCheckBox(ScoreEditor)
|
|
||||||
self.clearTypeNoneCheckBox.setObjectName(u"clearTypeNoneCheckBox")
|
self.clearTypeNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
self.clearTypeNoneCheckBox.setChecked(True)
|
self.clearTypeNoneCheckBox.setObjectName(u"clearTypeNoneCheckBox")
|
||||||
|
self.clearTypeNoneCheckBox.setChecked(True)
|
||||||
self.gridLayout.addWidget(self.clearTypeNoneCheckBox, 10, 2, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.clearTypeNoneCheckBox, 10, 2, 1, 1)
|
||||||
self.label_2 = QLabel(ScoreEditor)
|
|
||||||
self.label_2.setObjectName(u"label_2")
|
self.label_2 = QLabel(ScoreEditor)
|
||||||
self.label_2.setText(u"PURE")
|
self.label_2.setObjectName(u"label_2")
|
||||||
self.label_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_2.setText(u"PURE")
|
||||||
|
self.label_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||||
self.label_4 = QLabel(ScoreEditor)
|
|
||||||
self.label_4.setObjectName(u"label_4")
|
self.label_4 = QLabel(ScoreEditor)
|
||||||
self.label_4.setText(u"LOST")
|
self.label_4.setObjectName(u"label_4")
|
||||||
self.label_4.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_4.setText(u"LOST")
|
||||||
|
self.label_4.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
||||||
self.dateNoneCheckBox = QCheckBox(ScoreEditor)
|
|
||||||
self.dateNoneCheckBox.setObjectName(u"dateNoneCheckBox")
|
self.dateNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
|
self.dateNoneCheckBox.setObjectName(u"dateNoneCheckBox")
|
||||||
self.gridLayout.addWidget(self.dateNoneCheckBox, 5, 2, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.dateNoneCheckBox, 5, 2, 1, 1)
|
||||||
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
|
||||||
|
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||||
self.gridLayout.addItem(self.verticalSpacer, 6, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addItem(self.verticalSpacer, 6, 1, 1, 1)
|
||||||
self.validateLabel = QLabel(ScoreEditor)
|
|
||||||
self.validateLabel.setObjectName(u"validateLabel")
|
self.validateLabel = QLabel(ScoreEditor)
|
||||||
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
|
self.validateLabel.setObjectName(u"validateLabel")
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.validateLabel.sizePolicy().hasHeightForWidth())
|
sizePolicy.setVerticalStretch(0)
|
||||||
self.validateLabel.setSizePolicy(sizePolicy)
|
sizePolicy.setHeightForWidth(self.validateLabel.sizePolicy().hasHeightForWidth())
|
||||||
self.validateLabel.setText(u"...")
|
self.validateLabel.setSizePolicy(sizePolicy)
|
||||||
self.validateLabel.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.validateLabel.setText(u"...")
|
||||||
|
self.validateLabel.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.validateLabel, 12, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.validateLabel, 12, 1, 1, 1)
|
||||||
self.clearTypeComboBox = QComboBox(ScoreEditor)
|
|
||||||
self.clearTypeComboBox.setObjectName(u"clearTypeComboBox")
|
self.clearTypeComboBox = QComboBox(ScoreEditor)
|
||||||
self.clearTypeComboBox.setEnabled(False)
|
self.clearTypeComboBox.setObjectName(u"clearTypeComboBox")
|
||||||
self.clearTypeComboBox.setMinimumSize(QSize(100, 0))
|
self.clearTypeComboBox.setEnabled(False)
|
||||||
|
self.clearTypeComboBox.setMinimumSize(QSize(100, 0))
|
||||||
self.gridLayout.addWidget(self.clearTypeComboBox, 10, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.clearTypeComboBox, 10, 1, 1, 1)
|
||||||
self.label_8 = QLabel(ScoreEditor)
|
|
||||||
self.label_8.setObjectName(u"label_8")
|
self.label_8 = QLabel(ScoreEditor)
|
||||||
self.label_8.setText(u"Clear Type")
|
self.label_8.setObjectName(u"label_8")
|
||||||
self.label_8.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_8.setText(u"Clear Type")
|
||||||
|
self.label_8.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.label_8, 10, 0, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.label_8, 10, 0, 1, 1)
|
||||||
self.label_3 = QLabel(ScoreEditor)
|
|
||||||
self.label_3.setObjectName(u"label_3")
|
self.label_3 = QLabel(ScoreEditor)
|
||||||
self.label_3.setText(u"FAR")
|
self.label_3.setObjectName(u"label_3")
|
||||||
self.label_3.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_3.setText(u"FAR")
|
||||||
|
self.label_3.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
|
||||||
self.label_6 = QLabel(ScoreEditor)
|
|
||||||
self.label_6.setObjectName(u"label_6")
|
self.label_6 = QLabel(ScoreEditor)
|
||||||
self.label_6.setText(u"MAX RECALL")
|
self.label_6.setObjectName(u"label_6")
|
||||||
self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_6.setText(u"MAX RECALL")
|
||||||
|
self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.gridLayout.addWidget(self.label_6, 8, 0, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.label_6, 8, 0, 1, 1)
|
||||||
self.maxRecallSpinBox = QSpinBox(ScoreEditor)
|
|
||||||
self.maxRecallSpinBox.setObjectName(u"maxRecallSpinBox")
|
self.maxRecallSpinBox = QSpinBox(ScoreEditor)
|
||||||
self.maxRecallSpinBox.setEnabled(False)
|
self.maxRecallSpinBox.setObjectName(u"maxRecallSpinBox")
|
||||||
self.maxRecallSpinBox.setMinimumSize(QSize(100, 0))
|
self.maxRecallSpinBox.setEnabled(False)
|
||||||
self.maxRecallSpinBox.setMinimum(0)
|
self.maxRecallSpinBox.setMinimumSize(QSize(100, 0))
|
||||||
self.maxRecallSpinBox.setMaximum(0)
|
self.maxRecallSpinBox.setMinimum(0)
|
||||||
self.maxRecallSpinBox.setValue(0)
|
self.maxRecallSpinBox.setMaximum(0)
|
||||||
|
self.maxRecallSpinBox.setValue(0)
|
||||||
self.gridLayout.addWidget(self.maxRecallSpinBox, 8, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.maxRecallSpinBox, 8, 1, 1, 1)
|
||||||
self.modifierComboBox = QComboBox(ScoreEditor)
|
|
||||||
self.modifierComboBox.setObjectName(u"modifierComboBox")
|
self.modifierComboBox = QComboBox(ScoreEditor)
|
||||||
self.modifierComboBox.setEnabled(False)
|
self.modifierComboBox.setObjectName(u"modifierComboBox")
|
||||||
|
self.modifierComboBox.setEnabled(False)
|
||||||
self.gridLayout.addWidget(self.modifierComboBox, 9, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.modifierComboBox, 9, 1, 1, 1)
|
||||||
self.dateTimeEdit = QDateTimeEdit(ScoreEditor)
|
|
||||||
self.dateTimeEdit.setObjectName(u"dateTimeEdit")
|
self.dateTimeEdit = QDateTimeEdit(ScoreEditor)
|
||||||
sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
self.dateTimeEdit.setObjectName(u"dateTimeEdit")
|
||||||
sizePolicy1.setHorizontalStretch(0)
|
sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
||||||
sizePolicy1.setVerticalStretch(0)
|
sizePolicy1.setHorizontalStretch(0)
|
||||||
sizePolicy1.setHeightForWidth(self.dateTimeEdit.sizePolicy().hasHeightForWidth())
|
sizePolicy1.setVerticalStretch(0)
|
||||||
self.dateTimeEdit.setSizePolicy(sizePolicy1)
|
sizePolicy1.setHeightForWidth(self.dateTimeEdit.sizePolicy().hasHeightForWidth())
|
||||||
self.dateTimeEdit.setDisplayFormat(u"yyyy/MM/dd HH:mm:ss")
|
self.dateTimeEdit.setSizePolicy(sizePolicy1)
|
||||||
self.dateTimeEdit.setCalendarPopup(False)
|
self.dateTimeEdit.setDisplayFormat(u"yyyy/MM/dd HH:mm:ss")
|
||||||
|
self.dateTimeEdit.setCalendarPopup(False)
|
||||||
self.gridLayout.addWidget(self.dateTimeEdit, 5, 1, 1, 1)
|
|
||||||
|
self.gridLayout.addWidget(self.dateTimeEdit, 5, 1, 1, 1)
|
||||||
self.lostSpinBox = QSpinBox(ScoreEditor)
|
|
||||||
self.lostSpinBox.setObjectName(u"lostSpinBox")
|
self.lostSpinBox = QSpinBox(ScoreEditor)
|
||||||
self.lostSpinBox.setMinimumSize(QSize(100, 0))
|
self.lostSpinBox.setObjectName(u"lostSpinBox")
|
||||||
self.lostSpinBox.setMaximum(0)
|
self.lostSpinBox.setMinimumSize(QSize(100, 0))
|
||||||
|
self.lostSpinBox.setMinimum(0)
|
||||||
self.gridLayout.addWidget(self.lostSpinBox, 4, 1, 1, 1)
|
self.lostSpinBox.setMaximum(0)
|
||||||
|
|
||||||
self.lostNoneCheckBox = QCheckBox(ScoreEditor)
|
self.gridLayout.addWidget(self.lostSpinBox, 4, 1, 1, 1)
|
||||||
self.lostNoneCheckBox.setObjectName(u"lostNoneCheckBox")
|
|
||||||
|
self.lostNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
self.gridLayout.addWidget(self.lostNoneCheckBox, 4, 2, 1, 1)
|
self.lostNoneCheckBox.setObjectName(u"lostNoneCheckBox")
|
||||||
|
|
||||||
self.commentLineEdit = QLineEdit(ScoreEditor)
|
self.gridLayout.addWidget(self.lostNoneCheckBox, 4, 2, 1, 1)
|
||||||
self.commentLineEdit.setObjectName(u"commentLineEdit")
|
|
||||||
self.commentLineEdit.setEnabled(False)
|
self.commentLineEdit = QLineEdit(ScoreEditor)
|
||||||
|
self.commentLineEdit.setObjectName(u"commentLineEdit")
|
||||||
self.gridLayout.addWidget(self.commentLineEdit, 11, 1, 1, 1)
|
self.commentLineEdit.setEnabled(False)
|
||||||
|
|
||||||
self.modifierNoneCheckBox = QCheckBox(ScoreEditor)
|
self.gridLayout.addWidget(self.commentLineEdit, 11, 1, 1, 1)
|
||||||
self.modifierNoneCheckBox.setObjectName(u"modifierNoneCheckBox")
|
|
||||||
self.modifierNoneCheckBox.setChecked(True)
|
self.modifierNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
|
self.modifierNoneCheckBox.setObjectName(u"modifierNoneCheckBox")
|
||||||
self.gridLayout.addWidget(self.modifierNoneCheckBox, 9, 2, 1, 1)
|
self.modifierNoneCheckBox.setChecked(True)
|
||||||
|
|
||||||
self.commentNoneCheckBox = QCheckBox(ScoreEditor)
|
self.gridLayout.addWidget(self.modifierNoneCheckBox, 9, 2, 1, 1)
|
||||||
self.commentNoneCheckBox.setObjectName(u"commentNoneCheckBox")
|
|
||||||
self.commentNoneCheckBox.setChecked(True)
|
self.commentNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
|
self.commentNoneCheckBox.setObjectName(u"commentNoneCheckBox")
|
||||||
self.gridLayout.addWidget(self.commentNoneCheckBox, 11, 2, 1, 1)
|
self.commentNoneCheckBox.setChecked(True)
|
||||||
|
|
||||||
self.label_5 = QLabel(ScoreEditor)
|
self.gridLayout.addWidget(self.commentNoneCheckBox, 11, 2, 1, 1)
|
||||||
self.label_5.setObjectName(u"label_5")
|
|
||||||
self.label_5.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_5 = QLabel(ScoreEditor)
|
||||||
|
self.label_5.setObjectName(u"label_5")
|
||||||
self.gridLayout.addWidget(self.label_5, 5, 0, 1, 1)
|
self.label_5.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
|
|
||||||
self.commitButton = QPushButton(ScoreEditor)
|
self.gridLayout.addWidget(self.label_5, 5, 0, 1, 1)
|
||||||
self.commitButton.setObjectName(u"commitButton")
|
|
||||||
|
self.commitButton = QPushButton(ScoreEditor)
|
||||||
self.gridLayout.addWidget(self.commitButton, 12, 2, 1, 1)
|
self.commitButton.setObjectName(u"commitButton")
|
||||||
|
|
||||||
self.scoreLineEdit = FocusSelectAllLineEdit(ScoreEditor)
|
self.gridLayout.addWidget(self.commitButton, 12, 2, 1, 1)
|
||||||
self.scoreLineEdit.setObjectName(u"scoreLineEdit")
|
|
||||||
self.scoreLineEdit.setInputMask(u"B9'999'999;_")
|
self.scoreLineEdit = FocusSelectAllLineEdit(ScoreEditor)
|
||||||
|
self.scoreLineEdit.setObjectName(u"scoreLineEdit")
|
||||||
self.gridLayout.addWidget(self.scoreLineEdit, 1, 1, 1, 1)
|
self.scoreLineEdit.setInputMask(u"B9'999'999;_")
|
||||||
|
|
||||||
self.maxRecallNoneCheckBox = QCheckBox(ScoreEditor)
|
self.gridLayout.addWidget(self.scoreLineEdit, 1, 1, 1, 1)
|
||||||
self.maxRecallNoneCheckBox.setObjectName(u"maxRecallNoneCheckBox")
|
|
||||||
self.maxRecallNoneCheckBox.setChecked(True)
|
self.maxRecallNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
|
self.maxRecallNoneCheckBox.setObjectName(u"maxRecallNoneCheckBox")
|
||||||
self.gridLayout.addWidget(self.maxRecallNoneCheckBox, 8, 2, 1, 1)
|
self.maxRecallNoneCheckBox.setChecked(True)
|
||||||
|
|
||||||
self.farSpinBox = QSpinBox(ScoreEditor)
|
self.gridLayout.addWidget(self.maxRecallNoneCheckBox, 8, 2, 1, 1)
|
||||||
self.farSpinBox.setObjectName(u"farSpinBox")
|
|
||||||
self.farSpinBox.setMinimumSize(QSize(100, 0))
|
self.farSpinBox = QSpinBox(ScoreEditor)
|
||||||
self.farSpinBox.setMaximum(0)
|
self.farSpinBox.setObjectName(u"farSpinBox")
|
||||||
|
self.farSpinBox.setMinimumSize(QSize(100, 0))
|
||||||
self.gridLayout.addWidget(self.farSpinBox, 3, 1, 1, 1)
|
self.farSpinBox.setMinimum(0)
|
||||||
|
self.farSpinBox.setMaximum(0)
|
||||||
self.label_9 = QLabel(ScoreEditor)
|
|
||||||
self.label_9.setObjectName(u"label_9")
|
self.gridLayout.addWidget(self.farSpinBox, 3, 1, 1, 1)
|
||||||
self.label_9.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
|
||||||
|
self.label_9 = QLabel(ScoreEditor)
|
||||||
self.gridLayout.addWidget(self.label_9, 11, 0, 1, 1)
|
self.label_9.setObjectName(u"label_9")
|
||||||
|
self.label_9.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.label = QLabel(ScoreEditor)
|
|
||||||
self.label.setObjectName(u"label")
|
self.gridLayout.addWidget(self.label_9, 11, 0, 1, 1)
|
||||||
self.label.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
|
||||||
|
self.label = QLabel(ScoreEditor)
|
||||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
self.label.setObjectName(u"label")
|
||||||
|
self.label.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.farNoneCheckBox = QCheckBox(ScoreEditor)
|
|
||||||
self.farNoneCheckBox.setObjectName(u"farNoneCheckBox")
|
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.farNoneCheckBox, 3, 2, 1, 1)
|
self.farNoneCheckBox = QCheckBox(ScoreEditor)
|
||||||
|
self.farNoneCheckBox.setObjectName(u"farNoneCheckBox")
|
||||||
self.label_10 = QLabel(ScoreEditor)
|
|
||||||
self.label_10.setObjectName(u"label_10")
|
self.gridLayout.addWidget(self.farNoneCheckBox, 3, 2, 1, 1)
|
||||||
self.label_10.setText(u"ID")
|
|
||||||
self.label_10.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
self.label_10 = QLabel(ScoreEditor)
|
||||||
|
self.label_10.setObjectName(u"label_10")
|
||||||
self.gridLayout.addWidget(self.label_10, 0, 0, 1, 1)
|
self.label_10.setText(u"ID")
|
||||||
|
self.label_10.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||||
self.idLabel = QLabel(ScoreEditor)
|
|
||||||
self.idLabel.setObjectName(u"idLabel")
|
self.gridLayout.addWidget(self.label_10, 0, 0, 1, 1)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.idLabel, 0, 1, 1, 1)
|
self.idLabel = QLabel(ScoreEditor)
|
||||||
|
self.idLabel.setObjectName(u"idLabel")
|
||||||
QWidget.setTabOrder(self.scoreLineEdit, self.pureSpinBox)
|
|
||||||
QWidget.setTabOrder(self.pureSpinBox, self.pureNoneCheckBox)
|
self.gridLayout.addWidget(self.idLabel, 0, 1, 1, 1)
|
||||||
QWidget.setTabOrder(self.pureNoneCheckBox, self.farSpinBox)
|
|
||||||
QWidget.setTabOrder(self.farSpinBox, self.farNoneCheckBox)
|
self.warnIfIncompleteCheckBox = QCheckBox(ScoreEditor)
|
||||||
QWidget.setTabOrder(self.farNoneCheckBox, self.lostSpinBox)
|
self.warnIfIncompleteCheckBox.setObjectName(u"warnIfIncompleteCheckBox")
|
||||||
QWidget.setTabOrder(self.lostSpinBox, self.lostNoneCheckBox)
|
|
||||||
QWidget.setTabOrder(self.lostNoneCheckBox, self.dateTimeEdit)
|
self.gridLayout.addWidget(self.warnIfIncompleteCheckBox, 12, 0, 1, 1)
|
||||||
QWidget.setTabOrder(self.dateTimeEdit, self.dateNoneCheckBox)
|
|
||||||
QWidget.setTabOrder(self.dateNoneCheckBox, self.maxRecallSpinBox)
|
QWidget.setTabOrder(self.scoreLineEdit, self.pureSpinBox)
|
||||||
QWidget.setTabOrder(self.maxRecallSpinBox, self.maxRecallNoneCheckBox)
|
QWidget.setTabOrder(self.pureSpinBox, self.pureNoneCheckBox)
|
||||||
QWidget.setTabOrder(self.maxRecallNoneCheckBox, self.modifierComboBox)
|
QWidget.setTabOrder(self.pureNoneCheckBox, self.farSpinBox)
|
||||||
QWidget.setTabOrder(self.modifierComboBox, self.modifierNoneCheckBox)
|
QWidget.setTabOrder(self.farSpinBox, self.farNoneCheckBox)
|
||||||
QWidget.setTabOrder(self.modifierNoneCheckBox, self.clearTypeComboBox)
|
QWidget.setTabOrder(self.farNoneCheckBox, self.lostSpinBox)
|
||||||
QWidget.setTabOrder(self.clearTypeComboBox, self.clearTypeNoneCheckBox)
|
QWidget.setTabOrder(self.lostSpinBox, self.lostNoneCheckBox)
|
||||||
QWidget.setTabOrder(self.clearTypeNoneCheckBox, self.commentLineEdit)
|
QWidget.setTabOrder(self.lostNoneCheckBox, self.dateTimeEdit)
|
||||||
QWidget.setTabOrder(self.commentLineEdit, self.commentNoneCheckBox)
|
QWidget.setTabOrder(self.dateTimeEdit, self.dateNoneCheckBox)
|
||||||
QWidget.setTabOrder(self.commentNoneCheckBox, self.commitButton)
|
QWidget.setTabOrder(self.dateNoneCheckBox, self.maxRecallSpinBox)
|
||||||
|
QWidget.setTabOrder(self.maxRecallSpinBox, self.maxRecallNoneCheckBox)
|
||||||
self.retranslateUi(ScoreEditor)
|
QWidget.setTabOrder(self.maxRecallNoneCheckBox, self.modifierComboBox)
|
||||||
self.pureNoneCheckBox.toggled.connect(self.pureSpinBox.setDisabled)
|
QWidget.setTabOrder(self.modifierComboBox, self.modifierNoneCheckBox)
|
||||||
self.clearTypeNoneCheckBox.toggled.connect(self.clearTypeComboBox.setDisabled)
|
QWidget.setTabOrder(self.modifierNoneCheckBox, self.clearTypeComboBox)
|
||||||
self.modifierNoneCheckBox.toggled.connect(self.modifierComboBox.setDisabled)
|
QWidget.setTabOrder(self.clearTypeComboBox, self.clearTypeNoneCheckBox)
|
||||||
self.maxRecallNoneCheckBox.toggled.connect(self.maxRecallSpinBox.setDisabled)
|
QWidget.setTabOrder(self.clearTypeNoneCheckBox, self.commentLineEdit)
|
||||||
self.dateNoneCheckBox.toggled.connect(self.dateTimeEdit.setDisabled)
|
QWidget.setTabOrder(self.commentLineEdit, self.commentNoneCheckBox)
|
||||||
self.lostNoneCheckBox.toggled.connect(self.lostSpinBox.setDisabled)
|
QWidget.setTabOrder(self.commentNoneCheckBox, self.commitButton)
|
||||||
self.farNoneCheckBox.toggled.connect(self.farSpinBox.setDisabled)
|
|
||||||
self.commentNoneCheckBox.toggled.connect(self.commentLineEdit.setDisabled)
|
self.retranslateUi(ScoreEditor)
|
||||||
|
self.pureNoneCheckBox.toggled.connect(self.pureSpinBox.setDisabled)
|
||||||
QMetaObject.connectSlotsByName(ScoreEditor)
|
self.clearTypeNoneCheckBox.toggled.connect(self.clearTypeComboBox.setDisabled)
|
||||||
# setupUi
|
self.modifierNoneCheckBox.toggled.connect(self.modifierComboBox.setDisabled)
|
||||||
|
self.maxRecallNoneCheckBox.toggled.connect(self.maxRecallSpinBox.setDisabled)
|
||||||
def retranslateUi(self, ScoreEditor):
|
self.dateNoneCheckBox.toggled.connect(self.dateTimeEdit.setDisabled)
|
||||||
self.pureNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
self.lostNoneCheckBox.toggled.connect(self.lostSpinBox.setDisabled)
|
||||||
self.clearTypeNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
self.farNoneCheckBox.toggled.connect(self.farSpinBox.setDisabled)
|
||||||
self.dateNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
self.commentNoneCheckBox.toggled.connect(self.commentLineEdit.setDisabled)
|
||||||
self.lostNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
|
||||||
self.modifierNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
QMetaObject.connectSlotsByName(ScoreEditor)
|
||||||
self.commentNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
# setupUi
|
||||||
self.label_5.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.date", None))
|
|
||||||
self.commitButton.setText(QCoreApplication.translate("ScoreEditor", u"commitButton", None))
|
def retranslateUi(self, ScoreEditor):
|
||||||
self.maxRecallNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
self.pureNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
self.label_9.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.comment", None))
|
self.clearTypeNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
self.label.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.score", None))
|
self.dateNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
self.farNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
self.lostNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
self.idLabel.setText(QCoreApplication.translate("ScoreEditor", u"idAutoInsert", None))
|
self.modifierNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
pass
|
self.commentNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
# retranslateUi
|
self.label_5.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.date", None))
|
||||||
|
self.commitButton.setText(QCoreApplication.translate("ScoreEditor", u"commitButton", None))
|
||||||
|
self.maxRecallNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
|
self.label_9.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.comment", None))
|
||||||
|
self.label.setText(QCoreApplication.translate("ScoreEditor", u"formLabel.score", None))
|
||||||
|
self.farNoneCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"setNone", None))
|
||||||
|
self.idLabel.setText(QCoreApplication.translate("ScoreEditor", u"idAutoInsert", None))
|
||||||
|
self.warnIfIncompleteCheckBox.setText(QCoreApplication.translate("ScoreEditor", u"warnIfIncomplete", None))
|
||||||
|
pass
|
||||||
|
# retranslateUi
|
||||||
|
|
||||||
|
@ -45,7 +45,14 @@ class ChartSelector(Ui_ChartSelector, QWidget):
|
|||||||
ratingClass = self.ratingClassSelector.value()
|
ratingClass = self.ratingClassSelector.value()
|
||||||
|
|
||||||
if songId and isinstance(ratingClass, int):
|
if songId and isinstance(ratingClass, int):
|
||||||
return self.db.get_chart(songId, ratingClass)
|
result = self.db.get_chart(songId, ratingClass)
|
||||||
|
if result is None and self.songIdSelector.mode == SongIdSelectorMode.SongId:
|
||||||
|
return Chart(
|
||||||
|
song_id=songId,
|
||||||
|
rating_class=ratingClass,
|
||||||
|
set=self.songIdSelector.packId(),
|
||||||
|
)
|
||||||
|
return result
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def updateDatabase(self):
|
def updateDatabase(self):
|
||||||
@ -62,19 +69,23 @@ class ChartSelector(Ui_ChartSelector, QWidget):
|
|||||||
def updateResultLabel(self):
|
def updateResultLabel(self):
|
||||||
chart = self.value()
|
chart = self.value()
|
||||||
if isinstance(chart, Chart):
|
if isinstance(chart, Chart):
|
||||||
pack = self.db.get_pack(chart.set)
|
if chart.constant is not None:
|
||||||
texts = [
|
pack = self.db.get_pack(chart.set)
|
||||||
[
|
|
||||||
pack.name,
|
texts = [
|
||||||
chart.title,
|
[
|
||||||
f"{rating_class_to_text(chart.rating_class)} "
|
pack.name,
|
||||||
f"{chart.rating}{'+' if chart.rating_plus else ''}"
|
chart.title,
|
||||||
f"({chart.constant / 10})",
|
f"{rating_class_to_text(chart.rating_class)} "
|
||||||
],
|
f"{chart.rating}{'+' if chart.rating_plus else ''}"
|
||||||
[pack.id, chart.song_id, str(chart.rating_class)],
|
f"({chart.constant / 10})",
|
||||||
]
|
],
|
||||||
texts = [" | ".join(t) for t in texts]
|
[pack.id, chart.song_id, str(chart.rating_class)],
|
||||||
text = f'{texts[0]}<br><font color="gray">{texts[1]}</font>'
|
]
|
||||||
|
texts = [" | ".join(t) for t in texts]
|
||||||
|
text = f'{texts[0]}<br><font color="gray">{texts[1]}</font>'
|
||||||
|
else:
|
||||||
|
text = f'No chart data<br><font color="gray">{chart.set} | {chart.song_id} | {chart.rating_class}</font>'
|
||||||
self.resultLabel.setText(text)
|
self.resultLabel.setText(text)
|
||||||
else:
|
else:
|
||||||
self.resultLabel.setText("...")
|
self.resultLabel.setText("...")
|
||||||
|
@ -17,12 +17,13 @@ from PySide6.QtWidgets import (
|
|||||||
from ui.designer.components.scoreEditor_ui import Ui_ScoreEditor
|
from ui.designer.components.scoreEditor_ui import Ui_ScoreEditor
|
||||||
from ui.extends.shared.language import LanguageChangeEventFilter
|
from ui.extends.shared.language import LanguageChangeEventFilter
|
||||||
|
|
||||||
|
# TODO: use bit flags
|
||||||
class ScoreValidateResult(IntEnum):
|
class ScoreValidateResult(IntEnum):
|
||||||
Ok = 0
|
Ok = 0
|
||||||
ScoreMismatch = 1
|
ScoreMismatch = 1
|
||||||
ScoreEmpty = 2
|
ScoreEmpty = 2
|
||||||
ChartInvalid = 50
|
ChartInvalid = 50
|
||||||
|
ChartIncomplete = 51
|
||||||
ScoreIncomplete = 100
|
ScoreIncomplete = 100
|
||||||
|
|
||||||
|
|
||||||
@ -38,6 +39,10 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
self.installEventFilter(self.languageChangeEventFilter)
|
self.installEventFilter(self.languageChangeEventFilter)
|
||||||
|
|
||||||
self.__validateBeforeAccept = True
|
self.__validateBeforeAccept = True
|
||||||
|
self.__warnIfIncomplete = True
|
||||||
|
self.warnIfIncompleteCheckBox.setChecked(self.__warnIfIncomplete)
|
||||||
|
self.warnIfIncompleteCheckBox.toggled.connect(self.setWarnIfIncomplete)
|
||||||
|
|
||||||
self.__chart = None
|
self.__chart = None
|
||||||
self.__score_id = None
|
self.__score_id = None
|
||||||
|
|
||||||
@ -75,13 +80,24 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
|
|
||||||
self.dateTimeEdit.setDateTime(QDateTime.currentDateTime())
|
self.dateTimeEdit.setDateTime(QDateTime.currentDateTime())
|
||||||
|
|
||||||
|
def validateBeforeAccept(self):
|
||||||
|
return self.__validateBeforeAccept
|
||||||
|
|
||||||
def setValidateBeforeAccept(self, __bool: bool):
|
def setValidateBeforeAccept(self, __bool: bool):
|
||||||
self.__validateBeforeAccept = __bool
|
self.__validateBeforeAccept = __bool
|
||||||
|
|
||||||
|
def warnIfIncomplete(self):
|
||||||
|
return self.__warnIfIncomplete
|
||||||
|
|
||||||
|
def setWarnIfIncomplete(self, __bool: bool):
|
||||||
|
if self.sender() != self.warnIfIncompleteCheckBox:
|
||||||
|
self.warnIfIncompleteCheckBox.setChecked(__bool)
|
||||||
|
self.__warnIfIncomplete = __bool
|
||||||
|
|
||||||
def triggerValidateMessageBox(self):
|
def triggerValidateMessageBox(self):
|
||||||
validate = self.validateScore()
|
validate = self.validateScore()
|
||||||
|
|
||||||
if validate in [ScoreValidateResult.Ok, ScoreValidateResult.ScoreIncomplete]:
|
if validate == ScoreValidateResult.Ok:
|
||||||
return True
|
return True
|
||||||
if validate == ScoreValidateResult.ChartInvalid:
|
if validate == ScoreValidateResult.ChartInvalid:
|
||||||
QMessageBox.critical(
|
QMessageBox.critical(
|
||||||
@ -92,6 +108,19 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
# fmt: on
|
# fmt: on
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
if validate == ScoreValidateResult.ChartIncomplete:
|
||||||
|
if not self.__warnIfIncomplete:
|
||||||
|
return True
|
||||||
|
result = QMessageBox.warning(
|
||||||
|
self,
|
||||||
|
# fmt: off
|
||||||
|
QCoreApplication.translate("ScoreEditor", "chartIncompleteDialog.title"),
|
||||||
|
QCoreApplication.translate("ScoreEditor", "chartIncompleteDialog.content"),
|
||||||
|
# fmt: on
|
||||||
|
QMessageBox.StandardButton.Yes,
|
||||||
|
QMessageBox.StandardButton.No,
|
||||||
|
)
|
||||||
|
return result == QMessageBox.StandardButton.Yes
|
||||||
if validate == ScoreValidateResult.ScoreMismatch:
|
if validate == ScoreValidateResult.ScoreMismatch:
|
||||||
result = QMessageBox.warning(
|
result = QMessageBox.warning(
|
||||||
self,
|
self,
|
||||||
@ -114,6 +143,19 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
QMessageBox.StandardButton.No,
|
QMessageBox.StandardButton.No,
|
||||||
)
|
)
|
||||||
return result == QMessageBox.StandardButton.Yes
|
return result == QMessageBox.StandardButton.Yes
|
||||||
|
elif validate == ScoreValidateResult.ScoreIncomplete:
|
||||||
|
if not self.__warnIfIncomplete:
|
||||||
|
return True
|
||||||
|
result = QMessageBox.warning(
|
||||||
|
self,
|
||||||
|
# fmt: off
|
||||||
|
QCoreApplication.translate("ScoreEditor", "scoreIncompleteDialog.title"),
|
||||||
|
QCoreApplication.translate("ScoreEditor", "scoreIncompleteDialog.content"),
|
||||||
|
# fmt: on
|
||||||
|
QMessageBox.StandardButton.Yes,
|
||||||
|
QMessageBox.StandardButton.No,
|
||||||
|
)
|
||||||
|
return result == QMessageBox.StandardButton.Yes
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -130,25 +172,20 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
score_text = self.scoreLineEdit.text().replace("'", "")
|
score_text = self.scoreLineEdit.text().replace("'", "")
|
||||||
return int(score_text) if score_text else 0
|
return int(score_text) if score_text else 0
|
||||||
|
|
||||||
def setMinimums(self):
|
def setComboBoxMaximums(self, max: int):
|
||||||
self.pureSpinBox.setMinimum(0)
|
self.pureSpinBox.setMaximum(max)
|
||||||
self.farSpinBox.setMinimum(0)
|
self.farSpinBox.setMaximum(max)
|
||||||
self.lostSpinBox.setMinimum(0)
|
self.lostSpinBox.setMaximum(max)
|
||||||
self.maxRecallSpinBox.setMinimum(-1)
|
self.maxRecallSpinBox.setMaximum(max)
|
||||||
|
|
||||||
def setLimits(self, chart: Chart):
|
def setLimits(self, chart: Chart):
|
||||||
self.setMinimums()
|
if not isinstance(chart, Chart) or chart.notes is None:
|
||||||
self.pureSpinBox.setMaximum(chart.notes)
|
self.setComboBoxMaximums(283375)
|
||||||
self.farSpinBox.setMaximum(chart.notes)
|
else:
|
||||||
self.lostSpinBox.setMaximum(chart.notes)
|
self.setComboBoxMaximums(chart.notes)
|
||||||
self.maxRecallSpinBox.setMaximum(chart.notes)
|
|
||||||
|
|
||||||
def resetLimits(self):
|
def resetLimits(self):
|
||||||
self.setMinimums()
|
self.setComboBoxMaximums(0)
|
||||||
self.pureSpinBox.setMaximum(0)
|
|
||||||
self.farSpinBox.setMaximum(0)
|
|
||||||
self.lostSpinBox.setMaximum(0)
|
|
||||||
self.maxRecallSpinBox.setMaximum(0)
|
|
||||||
|
|
||||||
def setChart(self, chart: Optional[Chart]):
|
def setChart(self, chart: Optional[Chart]):
|
||||||
if isinstance(chart, Chart):
|
if isinstance(chart, Chart):
|
||||||
@ -163,6 +200,9 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
if not isinstance(self.__chart, Chart):
|
if not isinstance(self.__chart, Chart):
|
||||||
return ScoreValidateResult.ChartInvalid
|
return ScoreValidateResult.ChartInvalid
|
||||||
|
|
||||||
|
if self.__chart.notes is None:
|
||||||
|
return ScoreValidateResult.ChartIncomplete
|
||||||
|
|
||||||
score = self.value()
|
score = self.value()
|
||||||
|
|
||||||
if score.pure is None or score.far is None:
|
if score.pure is None or score.far is None:
|
||||||
@ -184,6 +224,8 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
|||||||
text = QCoreApplication.translate("ScoreEditor", "validate.ok")
|
text = QCoreApplication.translate("ScoreEditor", "validate.ok")
|
||||||
elif validate == ScoreValidateResult.ChartInvalid:
|
elif validate == ScoreValidateResult.ChartInvalid:
|
||||||
text = QCoreApplication.translate("ScoreEditor", "validate.chartInvalid")
|
text = QCoreApplication.translate("ScoreEditor", "validate.chartInvalid")
|
||||||
|
elif validate == ScoreValidateResult.ChartIncomplete:
|
||||||
|
text = QCoreApplication.translate("ScoreEditor", "validate.chartIncomple")
|
||||||
elif validate == ScoreValidateResult.ScoreMismatch:
|
elif validate == ScoreValidateResult.ScoreMismatch:
|
||||||
text = QCoreApplication.translate("ScoreEditor", "validate.scoreMismatch")
|
text = QCoreApplication.translate("ScoreEditor", "validate.scoreMismatch")
|
||||||
elif validate == ScoreValidateResult.ScoreEmpty:
|
elif validate == ScoreValidateResult.ScoreEmpty:
|
||||||
|
Reference in New Issue
Block a user