mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-19 09:10:18 +00:00
Compare commits
5 Commits
dd647d6963
...
381f27db87
Author | SHA1 | Date | |
---|---|---|---|
381f27db87 | |||
e0d92b7784 | |||
5aedf91c09 | |||
b193b82d95 | |||
01457f3559 |
@ -258,6 +258,13 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>listView</tabstop>
|
||||
<tabstop>constantLineEdit</tabstop>
|
||||
<tabstop>notesLineEdit</tabstop>
|
||||
<tabstop>commitButton</tabstop>
|
||||
<tabstop>deleteButton</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -179,6 +179,10 @@ class Ui_TabDb_ChartInfoEditor(object):
|
||||
|
||||
self.gridLayout.addWidget(self.listView, 1, 0, 1, 1)
|
||||
|
||||
QWidget.setTabOrder(self.listView, self.constantLineEdit)
|
||||
QWidget.setTabOrder(self.constantLineEdit, self.notesLineEdit)
|
||||
QWidget.setTabOrder(self.notesLineEdit, self.commitButton)
|
||||
QWidget.setTabOrder(self.commitButton, self.deleteButton)
|
||||
|
||||
self.retranslateUi(TabDb_ChartInfoEditor)
|
||||
|
||||
|
@ -143,6 +143,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QPushButton" name="exportSmartRteB30Button">
|
||||
<property name="text">
|
||||
<string>exportSmartRteB30Button</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>exportSmartRteB30.description</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -121,6 +121,18 @@ class Ui_TabDb_Manage(object):
|
||||
|
||||
self.formLayout.setWidget(6, QFormLayout.FieldRole, self.label_8)
|
||||
|
||||
self.exportSmartRteB30Button = QPushButton(TabDb_Manage)
|
||||
self.exportSmartRteB30Button.setObjectName(u"exportSmartRteB30Button")
|
||||
|
||||
self.formLayout.setWidget(10, QFormLayout.LabelRole, self.exportSmartRteB30Button)
|
||||
|
||||
self.label_9 = QLabel(TabDb_Manage)
|
||||
self.label_9.setObjectName(u"label_9")
|
||||
self.label_9.setOpenExternalLinks(True)
|
||||
self.label_9.setTextInteractionFlags(Qt.LinksAccessibleByKeyboard|Qt.LinksAccessibleByMouse)
|
||||
|
||||
self.formLayout.setWidget(10, QFormLayout.FieldRole, self.label_9)
|
||||
|
||||
|
||||
self.retranslateUi(TabDb_Manage)
|
||||
|
||||
@ -144,6 +156,8 @@ class Ui_TabDb_Manage(object):
|
||||
self.label_7.setText(QCoreApplication.translate("TabDb_Manage", u"importApk.description", None))
|
||||
self.importOnlineButton.setText(QCoreApplication.translate("TabDb_Manage", u"importOnlineButton", None))
|
||||
self.label_8.setText(QCoreApplication.translate("TabDb_Manage", u"importOnline.description", None))
|
||||
self.exportSmartRteB30Button.setText(QCoreApplication.translate("TabDb_Manage", u"exportSmartRteB30Button", None))
|
||||
self.label_9.setText(QCoreApplication.translate("TabDb_Manage", u"exportSmartRteB30.description", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
||||
|
@ -694,57 +694,9 @@
|
||||
<property name="title">
|
||||
<string>playRatingCalculate</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="playRatingCalculateScoreLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string notr="true">B9'999'999;_</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string notr="true">></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="playRatingCalculateResultLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="PlayRatingCalculator" name="playRatingCalculator" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -764,6 +716,12 @@
|
||||
<header>ui.implements.components.ratingClassSelector</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>PlayRatingCalculator</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ui.implements.components.playRatingCalculator</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -16,9 +16,10 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QComboBox, QFrame, QGridLayout,
|
||||
QGroupBox, QHBoxLayout, QLabel, QLineEdit,
|
||||
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)
|
||||
QGroupBox, QHBoxLayout, QLabel, QSizePolicy,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
from ui.implements.components.playRatingCalculator import PlayRatingCalculator
|
||||
from ui.implements.components.ratingClassSelector import RatingClassSelector
|
||||
from ui.implements.components.songIdSelector import SongIdSelector
|
||||
|
||||
@ -502,34 +503,12 @@ class Ui_TabTools_InfoLookup(object):
|
||||
|
||||
self.groupBox_6 = QGroupBox(TabTools_InfoLookup)
|
||||
self.groupBox_6.setObjectName(u"groupBox_6")
|
||||
self.horizontalLayout_5 = QHBoxLayout(self.groupBox_6)
|
||||
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
|
||||
self.playRatingCalculateScoreLineEdit = QLineEdit(self.groupBox_6)
|
||||
self.playRatingCalculateScoreLineEdit.setObjectName(u"playRatingCalculateScoreLineEdit")
|
||||
self.playRatingCalculateScoreLineEdit.setMinimumSize(QSize(100, 0))
|
||||
self.playRatingCalculateScoreLineEdit.setMaximumSize(QSize(150, 16777215))
|
||||
self.playRatingCalculateScoreLineEdit.setInputMask(u"B9'999'999;_")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.groupBox_6)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.playRatingCalculator = PlayRatingCalculator(self.groupBox_6)
|
||||
self.playRatingCalculator.setObjectName(u"playRatingCalculator")
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.playRatingCalculateScoreLineEdit)
|
||||
|
||||
self.label = QLabel(self.groupBox_6)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setText(u">")
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.label)
|
||||
|
||||
self.playRatingCalculateResultLabel = QLabel(self.groupBox_6)
|
||||
self.playRatingCalculateResultLabel.setObjectName(u"playRatingCalculateResultLabel")
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
self.playRatingCalculateResultLabel.setFont(font)
|
||||
self.playRatingCalculateResultLabel.setText(u"...")
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.playRatingCalculateResultLabel)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_5.addItem(self.horizontalSpacer)
|
||||
self.verticalLayout_2.addWidget(self.playRatingCalculator)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.groupBox_6)
|
||||
|
@ -165,7 +165,7 @@
|
||||
<widget class="QRadioButton" name="legacyPlayPlus_x125fragRadioButton">
|
||||
<property name="text">
|
||||
<string notr="true">x1.25
|
||||
125</string>
|
||||
250</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -361,6 +361,13 @@
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>calculate.toStep.playResultLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="calculate_toStep_playResultSpinBox">
|
||||
<property name="sizePolicy">
|
||||
@ -380,10 +387,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="calculate_toStep_calculatePlayResultFromScoreButton">
|
||||
<property name="text">
|
||||
<string>calculate.toStep.playResultLabel</string>
|
||||
<string>calculate.toStep.calculatePlayResultFromScoreButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -401,26 +408,38 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="calculate_toStep_resultLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="calculate_toStep_detailedResultLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel { color: gray; }</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="calculate_toStep_calculatePlayResultFromScoreButton">
|
||||
<property name="text">
|
||||
<string>calculate.toStep.calculatePlayResultFromScoreButton</string>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -463,19 +482,38 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="calculate_fromStep_resultLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="calculate_fromStep_detailedResultLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel { color: gray; }</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -137,7 +137,7 @@ class Ui_TabTools_StepCalculator(object):
|
||||
self.legacyPlayPlus_x125fragRadioButton = QRadioButton(self.legacyPlayPlus_useFragmentsGroupBox)
|
||||
self.legacyPlayPlus_x125fragRadioButton.setObjectName(u"legacyPlayPlus_x125fragRadioButton")
|
||||
self.legacyPlayPlus_x125fragRadioButton.setText(u"x1.25\n"
|
||||
"125")
|
||||
"250")
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.legacyPlayPlus_x125fragRadioButton)
|
||||
|
||||
@ -288,6 +288,11 @@ class Ui_TabTools_StepCalculator(object):
|
||||
self.formLayout_2 = QFormLayout(self.groupBox)
|
||||
self.formLayout_2.setObjectName(u"formLayout_2")
|
||||
self.formLayout_2.setLabelAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
self.label_2 = QLabel(self.groupBox)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label_2)
|
||||
|
||||
self.calculate_toStep_playResultSpinBox = QDoubleSpinBox(self.groupBox)
|
||||
self.calculate_toStep_playResultSpinBox.setObjectName(u"calculate_toStep_playResultSpinBox")
|
||||
sizePolicy2.setHeightForWidth(self.calculate_toStep_playResultSpinBox.sizePolicy().hasHeightForWidth())
|
||||
@ -298,10 +303,10 @@ class Ui_TabTools_StepCalculator(object):
|
||||
|
||||
self.formLayout_2.setWidget(0, QFormLayout.FieldRole, self.calculate_toStep_playResultSpinBox)
|
||||
|
||||
self.label_2 = QLabel(self.groupBox)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.calculate_toStep_calculatePlayResultFromScoreButton = QPushButton(self.groupBox)
|
||||
self.calculate_toStep_calculatePlayResultFromScoreButton.setObjectName(u"calculate_toStep_calculatePlayResultFromScoreButton")
|
||||
|
||||
self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label_2)
|
||||
self.formLayout_2.setWidget(1, QFormLayout.FieldRole, self.calculate_toStep_calculatePlayResultFromScoreButton)
|
||||
|
||||
self.label_7 = QLabel(self.groupBox)
|
||||
self.label_7.setObjectName(u"label_7")
|
||||
@ -310,18 +315,28 @@ class Ui_TabTools_StepCalculator(object):
|
||||
|
||||
self.formLayout_2.setWidget(2, QFormLayout.LabelRole, self.label_7)
|
||||
|
||||
self.verticalLayout_9 = QVBoxLayout()
|
||||
self.verticalLayout_9.setObjectName(u"verticalLayout_9")
|
||||
self.calculate_toStep_resultLabel = QLabel(self.groupBox)
|
||||
self.calculate_toStep_resultLabel.setObjectName(u"calculate_toStep_resultLabel")
|
||||
sizePolicy4.setHeightForWidth(self.calculate_toStep_resultLabel.sizePolicy().hasHeightForWidth())
|
||||
self.calculate_toStep_resultLabel.setSizePolicy(sizePolicy4)
|
||||
self.calculate_toStep_resultLabel.setText(u"...")
|
||||
self.calculate_toStep_resultLabel.setAlignment(Qt.AlignBottom|Qt.AlignLeading|Qt.AlignLeft)
|
||||
|
||||
self.formLayout_2.setWidget(2, QFormLayout.FieldRole, self.calculate_toStep_resultLabel)
|
||||
self.verticalLayout_9.addWidget(self.calculate_toStep_resultLabel)
|
||||
|
||||
self.calculate_toStep_calculatePlayResultFromScoreButton = QPushButton(self.groupBox)
|
||||
self.calculate_toStep_calculatePlayResultFromScoreButton.setObjectName(u"calculate_toStep_calculatePlayResultFromScoreButton")
|
||||
self.calculate_toStep_detailedResultLabel = QLabel(self.groupBox)
|
||||
self.calculate_toStep_detailedResultLabel.setObjectName(u"calculate_toStep_detailedResultLabel")
|
||||
font = QFont()
|
||||
font.setPointSize(8)
|
||||
self.calculate_toStep_detailedResultLabel.setFont(font)
|
||||
self.calculate_toStep_detailedResultLabel.setStyleSheet(u"QLabel { color: gray; }")
|
||||
self.calculate_toStep_detailedResultLabel.setText(u"...")
|
||||
self.calculate_toStep_detailedResultLabel.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
|
||||
|
||||
self.formLayout_2.setWidget(1, QFormLayout.FieldRole, self.calculate_toStep_calculatePlayResultFromScoreButton)
|
||||
self.verticalLayout_9.addWidget(self.calculate_toStep_detailedResultLabel)
|
||||
|
||||
|
||||
self.formLayout_2.setLayout(2, QFormLayout.FieldRole, self.verticalLayout_9)
|
||||
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.groupBox)
|
||||
@ -350,13 +365,26 @@ class Ui_TabTools_StepCalculator(object):
|
||||
|
||||
self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.label_9)
|
||||
|
||||
self.verticalLayout_10 = QVBoxLayout()
|
||||
self.verticalLayout_10.setObjectName(u"verticalLayout_10")
|
||||
self.calculate_fromStep_resultLabel = QLabel(self.groupBox_2)
|
||||
self.calculate_fromStep_resultLabel.setObjectName(u"calculate_fromStep_resultLabel")
|
||||
sizePolicy4.setHeightForWidth(self.calculate_fromStep_resultLabel.sizePolicy().hasHeightForWidth())
|
||||
self.calculate_fromStep_resultLabel.setSizePolicy(sizePolicy4)
|
||||
self.calculate_fromStep_resultLabel.setText(u"...")
|
||||
self.calculate_fromStep_resultLabel.setAlignment(Qt.AlignBottom|Qt.AlignLeading|Qt.AlignLeft)
|
||||
|
||||
self.formLayout_3.setWidget(1, QFormLayout.FieldRole, self.calculate_fromStep_resultLabel)
|
||||
self.verticalLayout_10.addWidget(self.calculate_fromStep_resultLabel)
|
||||
|
||||
self.calculate_fromStep_detailedResultLabel = QLabel(self.groupBox_2)
|
||||
self.calculate_fromStep_detailedResultLabel.setObjectName(u"calculate_fromStep_detailedResultLabel")
|
||||
self.calculate_fromStep_detailedResultLabel.setFont(font)
|
||||
self.calculate_fromStep_detailedResultLabel.setStyleSheet(u"QLabel { color: gray; }")
|
||||
self.calculate_fromStep_detailedResultLabel.setText(u"...")
|
||||
self.calculate_fromStep_detailedResultLabel.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop)
|
||||
|
||||
self.verticalLayout_10.addWidget(self.calculate_fromStep_detailedResultLabel)
|
||||
|
||||
|
||||
self.formLayout_3.setLayout(1, QFormLayout.FieldRole, self.verticalLayout_10)
|
||||
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.groupBox_2)
|
||||
@ -394,8 +422,8 @@ class Ui_TabTools_StepCalculator(object):
|
||||
self.partnerSkillPresetButton_maya.setText(QCoreApplication.translate("TabTools_StepCalculator", u"partner.skill.presets.maya", None))
|
||||
self.groupBox.setTitle(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.toStep", None))
|
||||
self.label_2.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.toStep.playResultLabel", None))
|
||||
self.label_7.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.toStep.resultLabel", None))
|
||||
self.calculate_toStep_calculatePlayResultFromScoreButton.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.toStep.calculatePlayResultFromScoreButton", None))
|
||||
self.label_7.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.toStep.resultLabel", None))
|
||||
self.groupBox_2.setTitle(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.fromStep", None))
|
||||
self.label_4.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.fromStep.targetStepLabel", None))
|
||||
self.label_9.setText(QCoreApplication.translate("TabTools_StepCalculator", u"calculate.fromStep.resultLabel", None))
|
||||
|
@ -7,6 +7,7 @@ import exif
|
||||
from arcaea_offline.database import Database
|
||||
from arcaea_offline.models import Chart, Score
|
||||
from arcaea_offline.utils.partner import KanaeDayNight, kanae_day_night
|
||||
from arcaea_offline_ocr.crop import CropBlackEdges
|
||||
from arcaea_offline_ocr.device import DeviceOcr, DeviceOcrResult
|
||||
from arcaea_offline_ocr.device.rois import (
|
||||
DeviceRois,
|
||||
@ -43,6 +44,7 @@ class TabDeviceOcrRunnable(OcrRunnable):
|
||||
def run(self):
|
||||
try:
|
||||
img = imread_unicode(self.imagePath, cv2.IMREAD_COLOR)
|
||||
img = CropBlackEdges.crop(img, cv2.COLOR_BGR2GRAY)
|
||||
if isinstance(self.rois, type) and issubclass(self.rois, DeviceRoisAuto):
|
||||
rois = self.rois(img.shape[1], img.shape[0])
|
||||
else:
|
||||
|
23
ui/implements/components/arcaeaScoreLineEdit.py
Normal file
23
ui/implements/components/arcaeaScoreLineEdit.py
Normal file
@ -0,0 +1,23 @@
|
||||
from PySide6.QtGui import QFont
|
||||
|
||||
from .focusSelectAllLineEdit import FocusSelectAllLineEdit
|
||||
|
||||
|
||||
class ArcaeaScoreLineEdit(FocusSelectAllLineEdit):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
font = QFont("GeosansLight")
|
||||
font.setPointSize(14)
|
||||
font.setBold(True)
|
||||
font.setStyleStrategy(
|
||||
QFont.StyleStrategy.NoSubpixelAntialias
|
||||
| QFont.StyleStrategy.PreferAntialias
|
||||
)
|
||||
self.setFont(font)
|
||||
|
||||
self.setInputMask("B9'999'999;_")
|
||||
|
||||
def score(self) -> int | None:
|
||||
textWithoutMask = self.text().replace("'", "")
|
||||
return int(textWithoutMask) if textWithoutMask else None
|
86
ui/implements/components/playRatingCalculator.py
Normal file
86
ui/implements/components/playRatingCalculator.py
Normal file
@ -0,0 +1,86 @@
|
||||
from arcaea_offline.calculate import calculate_play_rating
|
||||
from PySide6.QtCore import QCoreApplication
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
from PySide6.QtWidgets import (
|
||||
QHBoxLayout,
|
||||
QLabel,
|
||||
QPushButton,
|
||||
QSizePolicy,
|
||||
QSpacerItem,
|
||||
QWidget,
|
||||
)
|
||||
|
||||
from ui.extends.shared.language import LanguageChangeEventFilter
|
||||
|
||||
from .arcaeaScoreLineEdit import ArcaeaScoreLineEdit
|
||||
|
||||
|
||||
class PlayRatingCalculator(QWidget):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.languageChangeEventFilter = LanguageChangeEventFilter(self)
|
||||
self.installEventFilter(self.languageChangeEventFilter)
|
||||
|
||||
self.setupUi()
|
||||
|
||||
self.arcaeaScoreLineEdit.textChanged.connect(self.updateResultLabel)
|
||||
self.copyButton.clicked.connect(self.on_copyButton_clicked)
|
||||
|
||||
self.constant: int | None = None
|
||||
|
||||
def setConstant(self, constant: int | None):
|
||||
self.constant = constant
|
||||
self.updateResultLabel()
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
if self.constant is None:
|
||||
return None
|
||||
|
||||
score = self.arcaeaScoreLineEdit.score()
|
||||
if score is None:
|
||||
return None
|
||||
|
||||
return calculate_play_rating(self.constant, score)
|
||||
|
||||
def updateResultLabel(self):
|
||||
result = self.result
|
||||
self.resultLabel.setText(str(result) if result is not None else "...")
|
||||
|
||||
def on_copyButton_clicked(self):
|
||||
result = self.result
|
||||
if result is not None:
|
||||
QGuiApplication.clipboard().setText(str(result))
|
||||
|
||||
def setupUi(self, *args):
|
||||
self.horizontalLayout = QHBoxLayout(self)
|
||||
|
||||
self.arcaeaScoreLineEdit = ArcaeaScoreLineEdit(self)
|
||||
self.horizontalLayout.addWidget(self.arcaeaScoreLineEdit)
|
||||
|
||||
self.label = QLabel(self)
|
||||
self.label.setText(" > ")
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
|
||||
self.resultLabel = QLabel(self)
|
||||
self.resultLabel.setText("...")
|
||||
self.resultLabel.setSizePolicy(
|
||||
QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred
|
||||
)
|
||||
self.horizontalLayout.addWidget(self.resultLabel)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(
|
||||
20, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred
|
||||
)
|
||||
self.horizontalLayout.addSpacerItem(self.horizontalSpacer)
|
||||
|
||||
self.copyButton = QPushButton(self)
|
||||
self.horizontalLayout.addWidget(self.copyButton)
|
||||
|
||||
self.retranslateUi()
|
||||
|
||||
def retranslateUi(self, *args):
|
||||
self.copyButton.setText(
|
||||
QCoreApplication.translate("PotentialCalculator", "copyButton")
|
||||
)
|
@ -1,3 +1,4 @@
|
||||
import csv
|
||||
import json
|
||||
import logging
|
||||
import traceback
|
||||
@ -13,6 +14,7 @@ from arcaea_offline.external.arcaea import (
|
||||
)
|
||||
from arcaea_offline.external.arcaea.common import ArcaeaParser
|
||||
from arcaea_offline.external.arcsong import ArcsongDbParser
|
||||
from arcaea_offline.external.smartrte import SmartRteB30CsvConverter
|
||||
from arcaea_offline.models import Difficulty, Pack, Song
|
||||
from PySide6.QtCore import QDir, Slot
|
||||
from PySide6.QtWidgets import QFileDialog, QMessageBox, QWidget
|
||||
@ -232,3 +234,27 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
)
|
||||
with open(exportLocation, "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
|
||||
@Slot()
|
||||
def on_exportSmartRteB30Button_clicked(self):
|
||||
try:
|
||||
with Database().sessionmaker() as session:
|
||||
converter = SmartRteB30CsvConverter(session)
|
||||
csvRows = converter.rows()
|
||||
|
||||
exportLocation, _filter = QFileDialog.getSaveFileName(
|
||||
self,
|
||||
"Export CSV file",
|
||||
QDir.current().filePath("smartrte_scores.csv"),
|
||||
"CSV (*.csv);;*",
|
||||
)
|
||||
with open(exportLocation, "w", encoding="utf-8", newline="") as f:
|
||||
csvWriter = csv.writer(f)
|
||||
csvWriter.writerows(csvRows)
|
||||
|
||||
QMessageBox.information(self, None, "OK")
|
||||
except Exception as e:
|
||||
logging.exception("Export SmartRTE csv error:")
|
||||
QMessageBox.critical(
|
||||
self, "Export Error", "\n".join(traceback.format_exception(e))
|
||||
)
|
||||
|
@ -1,6 +1,5 @@
|
||||
import re
|
||||
|
||||
from arcaea_offline.calculate import calculate_play_rating
|
||||
from arcaea_offline.database import Database
|
||||
from PySide6.QtCore import QDateTime
|
||||
from PySide6.QtWidgets import QVBoxLayout, QWidget
|
||||
@ -27,15 +26,8 @@ class TabTools_InfoLookup(Ui_TabTools_InfoLookup, QWidget):
|
||||
self.ratingClassSelector.valueChanged.connect(self.updateDifficultyLabels)
|
||||
self.ratingClassSelector.valueChanged.connect(self.updateChartInfoLabels)
|
||||
|
||||
self.songIdSelector.valueChanged.connect(
|
||||
self.updatePlayRatingCalculateResultLabel
|
||||
)
|
||||
self.ratingClassSelector.valueChanged.connect(
|
||||
self.updatePlayRatingCalculateResultLabel
|
||||
)
|
||||
self.playRatingCalculateScoreLineEdit.textChanged.connect(
|
||||
self.updatePlayRatingCalculateResultLabel
|
||||
)
|
||||
self.songIdSelector.valueChanged.connect(self.updatePlayRatingCalculator)
|
||||
self.ratingClassSelector.valueChanged.connect(self.updatePlayRatingCalculator)
|
||||
|
||||
self.langSelectComboBox.addItem("En - English [en]", "en")
|
||||
self.langSelectComboBox.addItem("あ - Japanese [ja]", "ja")
|
||||
@ -213,29 +205,12 @@ class TabTools_InfoLookup(Ui_TabTools_InfoLookup, QWidget):
|
||||
str(chartInfo.notes) if chartInfo.notes is not None else "-"
|
||||
)
|
||||
|
||||
def resetPlayRatingCalculateResultLabel(self):
|
||||
self.playRatingCalculateResultLabel.setText("...")
|
||||
|
||||
def updatePlayRatingCalculateResultLabel(self):
|
||||
def updatePlayRatingCalculator(self):
|
||||
songId = self.songIdSelector.songId()
|
||||
ratingClass = self.ratingClassSelector.value()
|
||||
|
||||
if not songId or ratingClass is None:
|
||||
self.resetPlayRatingCalculateResultLabel()
|
||||
return
|
||||
|
||||
chartInfo = self.db.get_chart_info(songId, ratingClass)
|
||||
|
||||
if not chartInfo or not chartInfo.constant:
|
||||
self.resetPlayRatingCalculateResultLabel()
|
||||
return
|
||||
|
||||
if scoreText := self.playRatingCalculateScoreLineEdit.text().replace("'", ""):
|
||||
score = int(scoreText)
|
||||
|
||||
self.playRatingCalculateResultLabel.setText(
|
||||
f"{calculate_play_rating(chartInfo.constant, score):.3f}"
|
||||
)
|
||||
if not chartInfo:
|
||||
self.playRatingCalculator.setConstant(None)
|
||||
else:
|
||||
self.resetPlayRatingCalculateResultLabel()
|
||||
return
|
||||
self.playRatingCalculator.setConstant(chartInfo.constant)
|
||||
|
@ -1,6 +1,5 @@
|
||||
import logging
|
||||
|
||||
from arcaea_offline.calculate import calculate_play_rating
|
||||
from arcaea_offline.calculate.world_step import (
|
||||
AmaneBelowExPartnerBonus,
|
||||
AwakenedEtoPartnerBonus,
|
||||
@ -15,14 +14,22 @@ from arcaea_offline.calculate.world_step import (
|
||||
calculate_step,
|
||||
calculate_step_original,
|
||||
)
|
||||
from arcaea_offline.models import Chart, Score
|
||||
from PySide6.QtCore import QEasingCurve, QObject, QSize, Qt, QTimeLine
|
||||
from PySide6.QtGui import QIcon, QPainter, QPaintEvent, QPixmap
|
||||
from PySide6.QtCore import (
|
||||
QCoreApplication,
|
||||
QEasingCurve,
|
||||
QObject,
|
||||
QSize,
|
||||
QTimeLine,
|
||||
Signal,
|
||||
)
|
||||
from PySide6.QtGui import QIcon, QPixmap
|
||||
from PySide6.QtWidgets import (
|
||||
QAbstractButton,
|
||||
QButtonGroup,
|
||||
QDialog,
|
||||
QGraphicsColorizeEffect,
|
||||
QLabel,
|
||||
QPushButton,
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
)
|
||||
|
||||
@ -30,26 +37,13 @@ from ui.designer.tabs.tabTools.tabTools_StepCalculator_ui import (
|
||||
Ui_TabTools_StepCalculator,
|
||||
)
|
||||
from ui.extends.shared.language import LanguageChangeEventFilter
|
||||
from ui.implements.components.chartAndScoreInput import ChartAndScoreInput
|
||||
from ui.implements.components.chartSelector import ChartSelector
|
||||
from ui.implements.components.playRatingCalculator import PlayRatingCalculator
|
||||
from ui.implements.components.songIdSelector import SongIdSelectorMode
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MapTypeListWidgetWidget(QLabel):
|
||||
def paintEvent(self, e: QPaintEvent) -> None:
|
||||
size = self.size()
|
||||
painter = QPainter(self)
|
||||
scaledPixmap = self.pixmap().scaled(
|
||||
size,
|
||||
Qt.AspectRatioMode.KeepAspectRatio,
|
||||
Qt.TransformationMode.SmoothTransformation,
|
||||
)
|
||||
x = (size.width() - scaledPixmap.width()) / 2
|
||||
y = (size.height() - scaledPixmap.height()) / 2
|
||||
painter.drawPixmap(x, y, scaledPixmap)
|
||||
|
||||
|
||||
class ButtonGrayscaleEffectApplier(QObject):
|
||||
def __init__(self, parent: QAbstractButton):
|
||||
super().__init__(parent)
|
||||
@ -79,11 +73,56 @@ class ButtonGrayscaleEffectApplier(QObject):
|
||||
target.setGraphicsEffect(effect)
|
||||
|
||||
|
||||
class ChartAndScoreInputDialog(ChartAndScoreInput):
|
||||
class PlayRatingCalculatorDialog(QDialog):
|
||||
accepted = Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setWindowFlag(Qt.WindowType.Dialog, True)
|
||||
self.setSongIdSelectorMode(SongIdSelectorMode.Chart)
|
||||
|
||||
self.verticalLayout = QVBoxLayout(self)
|
||||
|
||||
self.chartSelector = ChartSelector(self)
|
||||
self.chartSelector.setSongIdSelectorMode(SongIdSelectorMode.Chart)
|
||||
self.verticalLayout.addWidget(self.chartSelector)
|
||||
|
||||
self.playRatingCalculator = PlayRatingCalculator(self)
|
||||
self.verticalLayout.addWidget(self.playRatingCalculator)
|
||||
|
||||
self.acceptButton = QPushButton(self)
|
||||
self.acceptButton.setText(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("StepCalculator", "playRatingCalculatorDialog.acceptButton")
|
||||
# fmt: on
|
||||
)
|
||||
self.acceptButton.setEnabled(False)
|
||||
self.verticalLayout.addWidget(self.acceptButton)
|
||||
|
||||
self.chartSelector.valueChanged.connect(self.updatePlayRatingCalculator)
|
||||
self.playRatingCalculator.arcaeaScoreLineEdit.textChanged.connect(
|
||||
self.updateAcceptButton
|
||||
)
|
||||
self.acceptButton.clicked.connect(self.accepted)
|
||||
|
||||
def updatePlayRatingCalculator(self):
|
||||
chart = self.chartSelector.value()
|
||||
if chart is None:
|
||||
self.playRatingCalculator.setConstant(None)
|
||||
else:
|
||||
self.playRatingCalculator.setConstant(chart.constant)
|
||||
self.updateAcceptButton()
|
||||
|
||||
def updateAcceptButton(self):
|
||||
if self.playRatingCalculator.result is None:
|
||||
self.acceptButton.setEnabled(False)
|
||||
else:
|
||||
self.acceptButton.setEnabled(True)
|
||||
|
||||
def reset(self):
|
||||
self.chartSelector.resetButton.click()
|
||||
self.playRatingCalculator.arcaeaScoreLineEdit.clear()
|
||||
|
||||
def value(self):
|
||||
return self.playRatingCalculator.result
|
||||
|
||||
|
||||
class TabTools_StepCalculator(Ui_TabTools_StepCalculator, QWidget):
|
||||
@ -203,23 +242,18 @@ class TabTools_StepCalculator(Ui_TabTools_StepCalculator, QWidget):
|
||||
)
|
||||
self.partnerSkillPresetButton_maya.clicked.connect(self.applyPartnerPreset)
|
||||
|
||||
def openChartAndScoreInputDialog(self):
|
||||
dialog = ChartAndScoreInputDialog(self)
|
||||
dialog.scoreCommited.connect(
|
||||
lambda: self.setPlayResultFromChartAndScoreInput(dialog)
|
||||
)
|
||||
dialog.show()
|
||||
self.playRatingCalculatorDialog = PlayRatingCalculatorDialog(self)
|
||||
self.playRatingCalculatorDialog.accepted.connect(self.set_toStep_PlayRating)
|
||||
|
||||
def setPlayResultFromChartAndScoreInput(self, dialog: ChartAndScoreInputDialog):
|
||||
if score := dialog.score():
|
||||
chart = dialog.chart()
|
||||
self.calculate_toStep_playResultSpinBox.setValue(
|
||||
float(calculate_play_rating(chart.constant, score.score))
|
||||
)
|
||||
dialog.close()
|
||||
dialog.deleteLater()
|
||||
else:
|
||||
return
|
||||
def openChartAndScoreInputDialog(self):
|
||||
self.playRatingCalculatorDialog.reset()
|
||||
self.playRatingCalculatorDialog.show()
|
||||
|
||||
def set_toStep_PlayRating(self):
|
||||
result = self.playRatingCalculatorDialog.value()
|
||||
if result is not None:
|
||||
self.calculate_toStep_playResultSpinBox.setValue(result)
|
||||
self.playRatingCalculatorDialog.close()
|
||||
|
||||
def applyPartnerPreset(self):
|
||||
if not self.sender():
|
||||
@ -307,7 +341,8 @@ class TabTools_StepCalculator(Ui_TabTools_StepCalculator, QWidget):
|
||||
step = calculate_step(
|
||||
playResult, partner_bonus=partnerBonus, step_booster=stepBooster
|
||||
)
|
||||
self.calculate_toStep_resultLabel.setText(f"{step}<br>({stepOriginal})")
|
||||
self.calculate_toStep_resultLabel.setText(str(step))
|
||||
self.calculate_toStep_detailedResultLabel.setText(str(stepOriginal))
|
||||
except Exception:
|
||||
if self.detailedLogOutputCheckBox.isChecked():
|
||||
logger.exception("Cannot calculate toStep")
|
||||
@ -315,16 +350,14 @@ class TabTools_StepCalculator(Ui_TabTools_StepCalculator, QWidget):
|
||||
|
||||
# fromStep
|
||||
try:
|
||||
self.calculate_fromStep_resultLabel.setText(
|
||||
str(
|
||||
calculate_play_rating_from_step(
|
||||
fromStepResult = calculate_play_rating_from_step(
|
||||
self.calculate_fromStep_targetStepSpinBox.value(),
|
||||
self.partnerStepValueSpinBox.value(),
|
||||
partner_bonus=partnerBonus,
|
||||
step_booster=stepBooster,
|
||||
)
|
||||
)
|
||||
)
|
||||
self.calculate_fromStep_resultLabel.setText(str(round(fromStepResult, 2)))
|
||||
self.calculate_fromStep_detailedResultLabel.setText(str(fromStepResult))
|
||||
except Exception:
|
||||
if self.detailedLogOutputCheckBox.isChecked():
|
||||
logger.exception("Cannot calculate fromStep")
|
||||
|
@ -726,6 +726,16 @@ validation</translation>
|
||||
<source>importOnline.description</source>
|
||||
<translation>Import scores from the result of Arcaea Online API</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="149"/>
|
||||
<source>exportSmartRteB30Button</source>
|
||||
<translation>Export Scores (CSV, SmartRTE B30)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="156"/>
|
||||
<source>exportSmartRteB30.description</source>
|
||||
<translation>Export all your scores to <a href="https://smartrte.github.io/b30gen.html">smartrte.github.io</a> compatible CSV file</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabOcrDisabled</name>
|
||||
|
@ -725,6 +725,16 @@
|
||||
<source>importOnline.description</source>
|
||||
<translation>从 Arcaea Online 的 API 结果导入分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="149"/>
|
||||
<source>exportSmartRteB30Button</source>
|
||||
<translation>导出分数(CSV,SmartRTE B30)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="156"/>
|
||||
<source>exportSmartRteB30.description</source>
|
||||
<translation>将所有分数导出为兼容 <a href="https://smartrte.github.io/b30gen.html">smartrte.github.io</a> 的 CSV 文件</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabOcrDisabled</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user