impr: add TabOverview database describe label

This commit is contained in:
2023-09-20 01:57:28 +08:00
parent 605a69834b
commit ddd418039b
5 changed files with 196 additions and 150 deletions

View File

@ -17,6 +17,13 @@
<item>
<widget class="QWidget" name="widget" native="true"/>
</item>
<item>
<widget class="QLabel" name="databaseDescribeLabel">
<property name="text">
<string extracomment="This database now have {} packs, {} songs, {} difficulties, {} chart info ({} complete) and {} scores.">databaseDescribeLabel {} {} {} {} {} {}</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_2" native="true">
<property name="sizePolicy">

View File

@ -1,108 +1,114 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'tabOverview.ui'
##
## Created by: Qt User Interface Compiler version 6.5.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QSizePolicy,
QVBoxLayout, QWidget)
class Ui_TabOverview(object):
def setupUi(self, TabOverview):
if not TabOverview.objectName():
TabOverview.setObjectName(u"TabOverview")
TabOverview.resize(696, 509)
TabOverview.setWindowTitle(u"TabOverview")
self.verticalLayout = QVBoxLayout(TabOverview)
self.verticalLayout.setObjectName(u"verticalLayout")
self.widget = QWidget(TabOverview)
self.widget.setObjectName(u"widget")
self.verticalLayout.addWidget(self.widget)
self.widget_2 = QWidget(TabOverview)
self.widget_2.setObjectName(u"widget_2")
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
self.widget_2.setSizePolicy(sizePolicy)
self.horizontalLayout = QHBoxLayout(self.widget_2)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.widget_3 = QWidget(self.widget_2)
self.widget_3.setObjectName(u"widget_3")
self.verticalLayout_2 = QVBoxLayout(self.widget_3)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.b30Label = QLabel(self.widget_3)
self.b30Label.setObjectName(u"b30Label")
font = QFont()
font.setPointSize(30)
self.b30Label.setFont(font)
self.b30Label.setText(u"0.00")
self.b30Label.setAlignment(Qt.AlignBottom|Qt.AlignHCenter)
self.verticalLayout_2.addWidget(self.b30Label)
self.label_2 = QLabel(self.widget_3)
self.label_2.setObjectName(u"label_2")
font1 = QFont()
font1.setPointSize(20)
self.label_2.setFont(font1)
self.label_2.setText(u"B30")
self.label_2.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
self.verticalLayout_2.addWidget(self.label_2)
self.horizontalLayout.addWidget(self.widget_3)
self.widget_4 = QWidget(self.widget_2)
self.widget_4.setObjectName(u"widget_4")
self.widget_4.setEnabled(False)
self.verticalLayout_3 = QVBoxLayout(self.widget_4)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.r10Label = QLabel(self.widget_4)
self.r10Label.setObjectName(u"r10Label")
self.r10Label.setEnabled(False)
self.r10Label.setFont(font)
self.r10Label.setText(u"--")
self.r10Label.setAlignment(Qt.AlignBottom|Qt.AlignHCenter)
self.verticalLayout_3.addWidget(self.r10Label)
self.label_4 = QLabel(self.widget_4)
self.label_4.setObjectName(u"label_4")
self.label_4.setEnabled(False)
self.label_4.setFont(font1)
self.label_4.setText(u"R10")
self.label_4.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
self.verticalLayout_3.addWidget(self.label_4)
self.horizontalLayout.addWidget(self.widget_4)
self.verticalLayout.addWidget(self.widget_2)
self.retranslateUi(TabOverview)
QMetaObject.connectSlotsByName(TabOverview)
# setupUi
def retranslateUi(self, TabOverview):
pass
# retranslateUi
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'tabOverview.ui'
##
## Created by: Qt User Interface Compiler version 6.5.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QSizePolicy,
QVBoxLayout, QWidget)
class Ui_TabOverview(object):
def setupUi(self, TabOverview):
if not TabOverview.objectName():
TabOverview.setObjectName(u"TabOverview")
TabOverview.resize(696, 509)
TabOverview.setWindowTitle(u"TabOverview")
self.verticalLayout = QVBoxLayout(TabOverview)
self.verticalLayout.setObjectName(u"verticalLayout")
self.widget = QWidget(TabOverview)
self.widget.setObjectName(u"widget")
self.verticalLayout.addWidget(self.widget)
self.databaseDescribeLabel = QLabel(TabOverview)
self.databaseDescribeLabel.setObjectName(u"databaseDescribeLabel")
self.verticalLayout.addWidget(self.databaseDescribeLabel)
self.widget_2 = QWidget(TabOverview)
self.widget_2.setObjectName(u"widget_2")
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
self.widget_2.setSizePolicy(sizePolicy)
self.horizontalLayout = QHBoxLayout(self.widget_2)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.widget_3 = QWidget(self.widget_2)
self.widget_3.setObjectName(u"widget_3")
self.verticalLayout_2 = QVBoxLayout(self.widget_3)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.b30Label = QLabel(self.widget_3)
self.b30Label.setObjectName(u"b30Label")
font = QFont()
font.setPointSize(30)
self.b30Label.setFont(font)
self.b30Label.setText(u"0.00")
self.b30Label.setAlignment(Qt.AlignBottom|Qt.AlignHCenter)
self.verticalLayout_2.addWidget(self.b30Label)
self.label_2 = QLabel(self.widget_3)
self.label_2.setObjectName(u"label_2")
font1 = QFont()
font1.setPointSize(20)
self.label_2.setFont(font1)
self.label_2.setText(u"B30")
self.label_2.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
self.verticalLayout_2.addWidget(self.label_2)
self.horizontalLayout.addWidget(self.widget_3)
self.widget_4 = QWidget(self.widget_2)
self.widget_4.setObjectName(u"widget_4")
self.widget_4.setEnabled(False)
self.verticalLayout_3 = QVBoxLayout(self.widget_4)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.r10Label = QLabel(self.widget_4)
self.r10Label.setObjectName(u"r10Label")
self.r10Label.setEnabled(False)
self.r10Label.setFont(font)
self.r10Label.setText(u"--")
self.r10Label.setAlignment(Qt.AlignBottom|Qt.AlignHCenter)
self.verticalLayout_3.addWidget(self.r10Label)
self.label_4 = QLabel(self.widget_4)
self.label_4.setObjectName(u"label_4")
self.label_4.setEnabled(False)
self.label_4.setFont(font1)
self.label_4.setText(u"R10")
self.label_4.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
self.verticalLayout_3.addWidget(self.label_4)
self.horizontalLayout.addWidget(self.widget_4)
self.verticalLayout.addWidget(self.widget_2)
self.retranslateUi(TabOverview)
QMetaObject.connectSlotsByName(TabOverview)
# setupUi
def retranslateUi(self, TabOverview):
self.databaseDescribeLabel.setText(QCoreApplication.translate("TabOverview", u"databaseDescribeLabel {} {} {} {} {} {}", None))
pass
# retranslateUi

View File

@ -21,3 +21,18 @@ class TabOverview(Ui_TabOverview, QWidget):
def updateOverview(self):
b30 = self.db.get_b30() or 0.00
self.b30Label.setText(str(f"{b30:.3f}"))
self.retranslateUi(self)
def retranslateUi(self, *args):
super().retranslateUi(self)
db = Database()
describeText = self.databaseDescribeLabel.text()
describeText = describeText.format(
db.count_packs(),
db.count_songs(),
db.count_difficulties(),
db.count_chart_infos(),
db.count_complete_chart_infos(),
db.count_scores(),
)
self.databaseDescribeLabel.setText(describeText)

View File

@ -749,6 +749,15 @@ validation</translation>
<translation>Select Image SIFT Database</translation>
</message>
</context>
<context>
<name>TabOverview</name>
<message>
<location filename="../../designer/tabs/tabOverview.ui" line="23"/>
<source>databaseDescribeLabel {} {} {} {} {} {}</source>
<extracomment>This database now have {} packs, {} songs, {} difficulties, {} chart info ({} complete) and {} scores.</extracomment>
<translation>This database now have {} packs, {} songs, {} difficulties, {} chart info ({} complete) and {} scores.</translation>
</message>
</context>
<context>
<name>TabToolsEntry</name>
<message>
@ -933,107 +942,107 @@ validation</translation>
<context>
<name>TabTools_StepCalculator</name>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="109"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="90"/>
<source>legacyPlay.noOptions</source>
<translation>No options</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="159"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="140"/>
<source>legacyPlayPlus.useFragments</source>
<translation>Use Fragments</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="202"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="183"/>
<source>play.memoryBoost</source>
<translation>Memory boost</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="213"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="194"/>
<source>partner.title</source>
<translation>Partner</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="221"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="202"/>
<source>partner.stepValueLabel</source>
<translation>STEP value</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="255"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="236"/>
<source>partner.skill.title</source>
<translation>Partner Skill</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="272"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="253"/>
<source>partner.skill.stepBonus</source>
<translation>Step bonus</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="279"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="260"/>
<source>partner.skill.finalMultiplier</source>
<translation>Final multiplier</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="308"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="289"/>
<source>partner.skill.presets</source>
<translation>Preset Datas</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="314"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="295"/>
<source>partner.skill.presets.awakenedEto</source>
<translation>Eto (Awakened)</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="321"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="302"/>
<source>partner.skill.presets.awakenedIlith</source>
<translation>Ilith (Awakened)</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="328"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="309"/>
<source>partner.skill.presets.awakenedLuna</source>
<translation>Luna (Awakened)</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="335"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="316"/>
<source>partner.skill.presets.amaneBelowEx</source>
<translation>Amane (Below EX)</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="342"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="323"/>
<source>partner.skill.presets.maya</source>
<translation>Maya</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="370"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="351"/>
<source>calculate.toStep</source>
<translation>Calculate to Step</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="398"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="379"/>
<source>calculate.toStep.playResultLabel</source>
<translation>Play result</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="405"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="412"/>
<source>calculate.toStep.calculatePlayResultFromScoreButton</source>
<translation>Calculate from Score</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="418"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="392"/>
<source>calculate.toStep.resultLabel</source>
<translation>Result</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="441"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="422"/>
<source>calculate.fromStep</source>
<translation>Calculate from Step</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="450"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="431"/>
<source>calculate.fromStep.targetStepLabel</source>
<translation>Target step value</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="473"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="454"/>
<source>calculate.fromStep.resultLabel</source>
<translation>Result (play rating)</translation>
</message>

View File

@ -748,6 +748,15 @@
<translation> SIFT </translation>
</message>
</context>
<context>
<name>TabOverview</name>
<message>
<location filename="../../designer/tabs/tabOverview.ui" line="23"/>
<source>databaseDescribeLabel {} {} {} {} {} {}</source>
<extracomment>This database now have {} packs, {} songs, {} difficulties, {} chart info ({} complete) and {} scores.</extracomment>
<translation> {} {} {} {} {} {} </translation>
</message>
</context>
<context>
<name>TabToolsEntry</name>
<message>
@ -932,107 +941,107 @@
<context>
<name>TabTools_StepCalculator</name>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="109"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="90"/>
<source>legacyPlay.noOptions</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="159"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="140"/>
<source>legacyPlayPlus.useFragments</source>
<translation>使</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="202"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="183"/>
<source>play.memoryBoost</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="213"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="194"/>
<source>partner.title</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="221"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="202"/>
<source>partner.stepValueLabel</source>
<translation>STEP </translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="255"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="236"/>
<source>partner.skill.title</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="272"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="253"/>
<source>partner.skill.stepBonus</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="279"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="260"/>
<source>partner.skill.finalMultiplier</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="308"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="289"/>
<source>partner.skill.presets</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="314"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="295"/>
<source>partner.skill.presets.awakenedEto</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="321"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="302"/>
<source>partner.skill.presets.awakenedIlith</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="328"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="309"/>
<source>partner.skill.presets.awakenedLuna</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="335"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="316"/>
<source>partner.skill.presets.amaneBelowEx</source>
<translation>EX </translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="342"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="323"/>
<source>partner.skill.presets.maya</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="370"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="351"/>
<source>calculate.toStep</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="398"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="379"/>
<source>calculate.toStep.playResultLabel</source>
<translation> PTT</translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="405"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="412"/>
<source>calculate.toStep.calculatePlayResultFromScoreButton</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="418"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="392"/>
<source>calculate.toStep.resultLabel</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="441"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="422"/>
<source>calculate.fromStep</source>
<translation></translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="450"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="431"/>
<source>calculate.fromStep.targetStepLabel</source>
<translation> STEP </translation>
</message>
<message>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="473"/>
<location filename="../../designer/tabs/tabTools/tabTools_StepCalculator.ui" line="454"/>
<source>calculate.fromStep.resultLabel</source>
<translation> PTT</translation>
</message>