mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-07-01 20:36:26 +00:00
Compare commits
22 Commits
865fc8b7c8
...
v0.3.8
Author | SHA1 | Date | |
---|---|---|---|
d5895fe230
|
|||
cd2e3f51ca
|
|||
4a09dc210a | |||
cc8ab11b78
|
|||
48c5682e55 | |||
ee03770764
|
|||
b45c7f7de5
|
|||
15bc56e6f9
|
|||
39ee379010
|
|||
5a71a5822b
|
|||
c888b312b3
|
|||
8e4fdc30b5
|
|||
1ca868cfc6
|
|||
d63d2f0d8b
|
|||
3cd187fde3
|
|||
cce918a121
|
|||
1ec302d98c
|
|||
3d6e5f997e | |||
495f6dc424
|
|||
0b599e3d9c
|
|||
a51a67fae3
|
|||
b48e177ae8
|
40
.github/workflows/build-from-latest-dependency.yml
vendored
Normal file
40
.github/workflows/build-from-latest-dependency.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Build UI from latest `arcaea-offline-*` dependencies
|
||||
run-name: ${{ github.actor }} started a build request.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
# install dependencies
|
||||
- run: "pip install -r requirements.txt"
|
||||
- run: "pip uninstall arcaea-offline arcaea-offline-ocr -y"
|
||||
- run: "pip install git+https://github.com/283375/arcaea-offline"
|
||||
- run: "pip install git+https://github.com/283375/arcaea-offline-ocr"
|
||||
- run: "pip install nuitka imageio"
|
||||
- name: Install UPX
|
||||
uses: crazy-max/ghaction-upx@v3
|
||||
with:
|
||||
install-only: true
|
||||
|
||||
# release builtin files
|
||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
||||
- run: "python prebuild.py"
|
||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
||||
|
||||
# build
|
||||
- run: "python -m nuitka --plugin-enable=upx --enable-plugin=pyside6 --assume-yes-for-downloads --windows-icon-from-ico=./ui/resources/images/icon.png --standalone --onefile index.py"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-windows
|
||||
path: index.exe
|
49
.github/workflows/build.yml
vendored
Normal file
49
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: Build UI
|
||||
run-name: ${{ github.actor }} started a build request.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: "pip"
|
||||
|
||||
# install dependencies
|
||||
- run: "pip install -r requirements.txt"
|
||||
- run: "pip install nuitka imageio"
|
||||
- name: Install UPX
|
||||
uses: crazy-max/ghaction-upx@v3
|
||||
with:
|
||||
install-only: true
|
||||
|
||||
# release builtin files
|
||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
||||
- run: "python prebuild.py"
|
||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
||||
|
||||
# build
|
||||
- run: "python -m nuitka --plugin-enable=upx --enable-plugin=pyside6 --assume-yes-for-downloads --windows-icon-from-ico=./ui/resources/images/icon.png --standalone --onefile index.py"
|
||||
|
||||
- name: Draft a release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
discussion_category_name: New releases
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
index.exe
|
14
.pre-commit-config.yaml
Normal file
14
.pre-commit-config.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
22
README.md
22
README.md
@ -1,9 +1,27 @@
|
||||
# Arcaea Offline PySide UI
|
||||
|
||||
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [283375/arcaea-offline-ocr](https://github.com/283375/arcaea-offline-ocr)
|
||||
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [ArcaeaOffline/core-ocr](https://github.com/ArcaeaOffline/core-ocr).
|
||||
|
||||
## Before you run `python index.py`...
|
||||
## Prerequisites
|
||||
|
||||
* Install requirements
|
||||
* Release translation files from `ui/resources/lang/*.ts`
|
||||
* Run `prebuild.py`
|
||||
* Compile `ui/resources/resources.qrc` to `ui/resources/resources_rc.py`
|
||||
|
||||
You can refer to the [GitHub Actions file](./.github/workflows/build.yml) for a rough reference.
|
||||
|
||||
```
|
||||
pip install -r ./requirements.txt
|
||||
pyside6-lrelease ./ui/resources/lang/en_US.ts ./ui/resources/lang/zh_CN.ts
|
||||
python prebuild.py
|
||||
pyside6-rcc ./ui/resources/resources.qrc -o ./ui/resources/resources_rc.py
|
||||
```
|
||||
|
||||
Sometimes you have to install the latest, unpublished version of `arcaea-offline` and `arcaea-offline-ocr`.
|
||||
|
||||
```
|
||||
pip uninstall -y arcaea-offline arcaea-offline-ocr
|
||||
pip install git+https://github.com/283375/arcaea-offline
|
||||
pip install git+https://github.com/ArcaeaOffline/core-ocr
|
||||
```
|
||||
|
2
index.py
2
index.py
@ -68,7 +68,7 @@ if __name__ == "__main__":
|
||||
|
||||
databaseChecker = DatabaseChecker()
|
||||
databaseChecker.setWindowIcon(QIcon(":/images/icon.png"))
|
||||
databaseCheckResult = databaseChecker.confirmDb()
|
||||
databaseCheckResult = databaseChecker.confirmDb() if Settings().databaseUrl() else 0
|
||||
|
||||
if not databaseCheckResult & DatabaseCheckerResult.Initted:
|
||||
result = databaseChecker.exec()
|
||||
|
@ -40,7 +40,6 @@ def getBuildToolsVer():
|
||||
|
||||
def writeVersionFile():
|
||||
versionFile = Path("ui/resources/VERSION")
|
||||
assert versionFile.exists()
|
||||
|
||||
versionText = (
|
||||
"arcaea-offline-pyside-ui\n{gitDesc}\n{buildToolsVer}\n\n"
|
||||
|
@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "arcaea-offline-pyside-ui"
|
||||
version = "0.1.0"
|
||||
version = "0.3.8"
|
||||
authors = [{ name = "283375", email = "log_283375@163.com" }]
|
||||
description = "No description."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"arcaea-offline==0.1.0",
|
||||
"arcaea-offline-ocr==0.1.0",
|
||||
"arcaea-offline==0.2.2",
|
||||
"arcaea-offline-ocr==0.0.98",
|
||||
"exif==1.6.0",
|
||||
"PySide6==6.5.2",
|
||||
]
|
||||
@ -21,8 +21,8 @@ classifiers = [
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://github.com/283375/arcaea-offline-pyside-ui"
|
||||
"Bug Tracker" = "https://github.com/283375/arcaea-offline-pyside-ui/issues"
|
||||
"Homepage" = "https://github.com/ArcaeaOffline/client-pyside6"
|
||||
"Bug Tracker" = "https://github.com/ArcaeaOffline/client-pyside6/issues"
|
||||
|
||||
[tool.black]
|
||||
force-exclude = '''
|
||||
|
@ -1,4 +1,5 @@
|
||||
arcaea-offline==0.1.0
|
||||
arcaea-offline-ocr==0.1.0
|
||||
arcaea-offline==0.2.2
|
||||
arcaea-offline-ocr==0.0.98
|
||||
exif==1.6.0
|
||||
Pillow==10.1.0
|
||||
PySide6==6.5.2
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<height>528</height>
|
||||
<width>580</width>
|
||||
<height>551</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -17,70 +17,21 @@
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="syncArcSongDbButton">
|
||||
<property name="text">
|
||||
<string>syncArcSongDbButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>syncArcSongDb.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QPushButton" name="importSt3Button">
|
||||
<property name="text">
|
||||
<string>importSt3Button</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>importSt3.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QPushButton" name="exportScoresButton">
|
||||
<property name="text">
|
||||
<string>exportScoresButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>exportScores.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="importPacklistButton">
|
||||
<property name="text">
|
||||
<string>importPacklistButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>importPacklist.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="importSonglistButton">
|
||||
<property name="text">
|
||||
<string>importSonglistButton</string>
|
||||
@ -88,69 +39,129 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>importPacklist.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>importSonglist.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QPushButton" name="exportArcsongJsonButton">
|
||||
<property name="text">
|
||||
<string>exportArcsongJsonButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>exportArcsongJson.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="importApkButton">
|
||||
<property name="text">
|
||||
<string>importApkButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>importApk.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>chartInfoGroup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="syncArcSongDbButton">
|
||||
<property name="text">
|
||||
<string>syncArcSongDbButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>syncArcSongDb.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>importScoreGroup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QPushButton" name="importSt3Button">
|
||||
<property name="text">
|
||||
<string>importSt3Button</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>importSt3.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QPushButton" name="importOnlineButton">
|
||||
<property name="text">
|
||||
<string>importOnlineButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>importOnline.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="13" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>exportScoreGroup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QPushButton" name="exportScoresButton">
|
||||
<property name="text">
|
||||
<string>exportScoresButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>exportScores.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QPushButton" name="exportSmartRteB30Button">
|
||||
<property name="text">
|
||||
<string>exportSmartRteB30Button</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="15" column="1">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>exportSmartRteB30.description</string>
|
||||
@ -163,6 +174,124 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>miscGroup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<widget class="QPushButton" name="exportArcsongJsonButton">
|
||||
<property name="text">
|
||||
<string>exportArcsongJsonButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>exportArcsongJson.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>packSongInfoGroup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QPushButton" name="syncChartInfoDbButton">
|
||||
<property name="text">
|
||||
<string>syncChartInfoDbButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>syncChartInfoDb.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -15,123 +15,168 @@ 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, QFormLayout, QFrame, QLabel,
|
||||
QPushButton, QSizePolicy, QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QFormLayout, QLabel, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QWidget)
|
||||
|
||||
class Ui_TabDb_Manage(object):
|
||||
def setupUi(self, TabDb_Manage):
|
||||
if not TabDb_Manage.objectName():
|
||||
TabDb_Manage.setObjectName(u"TabDb_Manage")
|
||||
TabDb_Manage.resize(630, 528)
|
||||
TabDb_Manage.resize(580, 551)
|
||||
TabDb_Manage.setWindowTitle(u"TabDb_Manage")
|
||||
self.formLayout = QFormLayout(TabDb_Manage)
|
||||
self.formLayout.setObjectName(u"formLayout")
|
||||
self.formLayout.setLabelAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
self.syncArcSongDbButton = QPushButton(TabDb_Manage)
|
||||
self.syncArcSongDbButton.setObjectName(u"syncArcSongDbButton")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.LabelRole, self.syncArcSongDbButton)
|
||||
|
||||
self.label = QLabel(TabDb_Manage)
|
||||
self.label.setObjectName(u"label")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.FieldRole, self.label)
|
||||
|
||||
self.importSt3Button = QPushButton(TabDb_Manage)
|
||||
self.importSt3Button.setObjectName(u"importSt3Button")
|
||||
|
||||
self.formLayout.setWidget(5, QFormLayout.LabelRole, self.importSt3Button)
|
||||
|
||||
self.label_2 = QLabel(TabDb_Manage)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.formLayout.setWidget(5, QFormLayout.FieldRole, self.label_2)
|
||||
|
||||
self.line = QFrame(TabDb_Manage)
|
||||
self.line.setObjectName(u"line")
|
||||
self.line.setFrameShape(QFrame.HLine)
|
||||
self.line.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.formLayout.setWidget(7, QFormLayout.SpanningRole, self.line)
|
||||
|
||||
self.exportScoresButton = QPushButton(TabDb_Manage)
|
||||
self.exportScoresButton.setObjectName(u"exportScoresButton")
|
||||
|
||||
self.formLayout.setWidget(8, QFormLayout.LabelRole, self.exportScoresButton)
|
||||
|
||||
self.label_3 = QLabel(TabDb_Manage)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.formLayout.setWidget(8, QFormLayout.FieldRole, self.label_3)
|
||||
|
||||
self.line_2 = QFrame(TabDb_Manage)
|
||||
self.line_2.setObjectName(u"line_2")
|
||||
self.line_2.setFrameShape(QFrame.HLine)
|
||||
self.line_2.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.formLayout.setWidget(1, QFormLayout.SpanningRole, self.line_2)
|
||||
|
||||
self.importPacklistButton = QPushButton(TabDb_Manage)
|
||||
self.importPacklistButton.setObjectName(u"importPacklistButton")
|
||||
|
||||
self.formLayout.setWidget(2, QFormLayout.LabelRole, self.importPacklistButton)
|
||||
|
||||
self.importSonglistButton = QPushButton(TabDb_Manage)
|
||||
self.importSonglistButton.setObjectName(u"importSonglistButton")
|
||||
|
||||
self.formLayout.setWidget(3, QFormLayout.LabelRole, self.importSonglistButton)
|
||||
self.formLayout.setWidget(1, QFormLayout.LabelRole, self.importPacklistButton)
|
||||
|
||||
self.label_4 = QLabel(TabDb_Manage)
|
||||
self.label_4.setObjectName(u"label_4")
|
||||
|
||||
self.formLayout.setWidget(2, QFormLayout.FieldRole, self.label_4)
|
||||
self.formLayout.setWidget(1, QFormLayout.FieldRole, self.label_4)
|
||||
|
||||
self.importSonglistButton = QPushButton(TabDb_Manage)
|
||||
self.importSonglistButton.setObjectName(u"importSonglistButton")
|
||||
|
||||
self.formLayout.setWidget(2, QFormLayout.LabelRole, self.importSonglistButton)
|
||||
|
||||
self.label_5 = QLabel(TabDb_Manage)
|
||||
self.label_5.setObjectName(u"label_5")
|
||||
|
||||
self.formLayout.setWidget(3, QFormLayout.FieldRole, self.label_5)
|
||||
|
||||
self.exportArcsongJsonButton = QPushButton(TabDb_Manage)
|
||||
self.exportArcsongJsonButton.setObjectName(u"exportArcsongJsonButton")
|
||||
|
||||
self.formLayout.setWidget(9, QFormLayout.LabelRole, self.exportArcsongJsonButton)
|
||||
|
||||
self.label_6 = QLabel(TabDb_Manage)
|
||||
self.label_6.setObjectName(u"label_6")
|
||||
|
||||
self.formLayout.setWidget(9, QFormLayout.FieldRole, self.label_6)
|
||||
self.formLayout.setWidget(2, QFormLayout.FieldRole, self.label_5)
|
||||
|
||||
self.importApkButton = QPushButton(TabDb_Manage)
|
||||
self.importApkButton.setObjectName(u"importApkButton")
|
||||
|
||||
self.formLayout.setWidget(4, QFormLayout.LabelRole, self.importApkButton)
|
||||
self.formLayout.setWidget(3, QFormLayout.LabelRole, self.importApkButton)
|
||||
|
||||
self.label_7 = QLabel(TabDb_Manage)
|
||||
self.label_7.setObjectName(u"label_7")
|
||||
|
||||
self.formLayout.setWidget(4, QFormLayout.FieldRole, self.label_7)
|
||||
self.formLayout.setWidget(3, QFormLayout.FieldRole, self.label_7)
|
||||
|
||||
self.label_11 = QLabel(TabDb_Manage)
|
||||
self.label_11.setObjectName(u"label_11")
|
||||
font = QFont()
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
self.label_11.setFont(font)
|
||||
|
||||
self.formLayout.setWidget(5, QFormLayout.SpanningRole, self.label_11)
|
||||
|
||||
self.syncArcSongDbButton = QPushButton(TabDb_Manage)
|
||||
self.syncArcSongDbButton.setObjectName(u"syncArcSongDbButton")
|
||||
|
||||
self.formLayout.setWidget(6, QFormLayout.LabelRole, self.syncArcSongDbButton)
|
||||
|
||||
self.label = QLabel(TabDb_Manage)
|
||||
self.label.setObjectName(u"label")
|
||||
|
||||
self.formLayout.setWidget(6, QFormLayout.FieldRole, self.label)
|
||||
|
||||
self.label_12 = QLabel(TabDb_Manage)
|
||||
self.label_12.setObjectName(u"label_12")
|
||||
self.label_12.setFont(font)
|
||||
|
||||
self.formLayout.setWidget(9, QFormLayout.SpanningRole, self.label_12)
|
||||
|
||||
self.importSt3Button = QPushButton(TabDb_Manage)
|
||||
self.importSt3Button.setObjectName(u"importSt3Button")
|
||||
|
||||
self.formLayout.setWidget(10, QFormLayout.LabelRole, self.importSt3Button)
|
||||
|
||||
self.label_2 = QLabel(TabDb_Manage)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.formLayout.setWidget(10, QFormLayout.FieldRole, self.label_2)
|
||||
|
||||
self.importOnlineButton = QPushButton(TabDb_Manage)
|
||||
self.importOnlineButton.setObjectName(u"importOnlineButton")
|
||||
|
||||
self.formLayout.setWidget(6, QFormLayout.LabelRole, self.importOnlineButton)
|
||||
self.formLayout.setWidget(11, QFormLayout.LabelRole, self.importOnlineButton)
|
||||
|
||||
self.label_8 = QLabel(TabDb_Manage)
|
||||
self.label_8.setObjectName(u"label_8")
|
||||
|
||||
self.formLayout.setWidget(6, QFormLayout.FieldRole, self.label_8)
|
||||
self.formLayout.setWidget(11, QFormLayout.FieldRole, self.label_8)
|
||||
|
||||
self.label_13 = QLabel(TabDb_Manage)
|
||||
self.label_13.setObjectName(u"label_13")
|
||||
self.label_13.setFont(font)
|
||||
|
||||
self.formLayout.setWidget(13, QFormLayout.SpanningRole, self.label_13)
|
||||
|
||||
self.exportScoresButton = QPushButton(TabDb_Manage)
|
||||
self.exportScoresButton.setObjectName(u"exportScoresButton")
|
||||
|
||||
self.formLayout.setWidget(14, QFormLayout.LabelRole, self.exportScoresButton)
|
||||
|
||||
self.label_3 = QLabel(TabDb_Manage)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.formLayout.setWidget(14, QFormLayout.FieldRole, self.label_3)
|
||||
|
||||
self.exportSmartRteB30Button = QPushButton(TabDb_Manage)
|
||||
self.exportSmartRteB30Button.setObjectName(u"exportSmartRteB30Button")
|
||||
|
||||
self.formLayout.setWidget(10, QFormLayout.LabelRole, self.exportSmartRteB30Button)
|
||||
self.formLayout.setWidget(15, 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.formLayout.setWidget(15, QFormLayout.FieldRole, self.label_9)
|
||||
|
||||
self.label_14 = QLabel(TabDb_Manage)
|
||||
self.label_14.setObjectName(u"label_14")
|
||||
self.label_14.setFont(font)
|
||||
|
||||
self.formLayout.setWidget(17, QFormLayout.SpanningRole, self.label_14)
|
||||
|
||||
self.exportArcsongJsonButton = QPushButton(TabDb_Manage)
|
||||
self.exportArcsongJsonButton.setObjectName(u"exportArcsongJsonButton")
|
||||
|
||||
self.formLayout.setWidget(18, QFormLayout.LabelRole, self.exportArcsongJsonButton)
|
||||
|
||||
self.label_6 = QLabel(TabDb_Manage)
|
||||
self.label_6.setObjectName(u"label_6")
|
||||
|
||||
self.formLayout.setWidget(18, QFormLayout.FieldRole, self.label_6)
|
||||
|
||||
self.label_10 = QLabel(TabDb_Manage)
|
||||
self.label_10.setObjectName(u"label_10")
|
||||
self.label_10.setFont(font)
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.SpanningRole, self.label_10)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.formLayout.setItem(4, QFormLayout.LabelRole, self.verticalSpacer)
|
||||
|
||||
self.verticalSpacer_2 = QSpacerItem(20, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.formLayout.setItem(8, QFormLayout.LabelRole, self.verticalSpacer_2)
|
||||
|
||||
self.verticalSpacer_3 = QSpacerItem(20, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.formLayout.setItem(12, QFormLayout.LabelRole, self.verticalSpacer_3)
|
||||
|
||||
self.verticalSpacer_4 = QSpacerItem(20, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.formLayout.setItem(16, QFormLayout.LabelRole, self.verticalSpacer_4)
|
||||
|
||||
self.syncChartInfoDbButton = QPushButton(TabDb_Manage)
|
||||
self.syncChartInfoDbButton.setObjectName(u"syncChartInfoDbButton")
|
||||
|
||||
self.formLayout.setWidget(7, QFormLayout.LabelRole, self.syncChartInfoDbButton)
|
||||
|
||||
self.label_15 = QLabel(TabDb_Manage)
|
||||
self.label_15.setObjectName(u"label_15")
|
||||
|
||||
self.formLayout.setWidget(7, QFormLayout.FieldRole, self.label_15)
|
||||
|
||||
|
||||
self.retranslateUi(TabDb_Manage)
|
||||
@ -140,24 +185,30 @@ class Ui_TabDb_Manage(object):
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, TabDb_Manage):
|
||||
self.syncArcSongDbButton.setText(QCoreApplication.translate("TabDb_Manage", u"syncArcSongDbButton", None))
|
||||
self.label.setText(QCoreApplication.translate("TabDb_Manage", u"syncArcSongDb.description", None))
|
||||
self.importSt3Button.setText(QCoreApplication.translate("TabDb_Manage", u"importSt3Button", None))
|
||||
self.label_2.setText(QCoreApplication.translate("TabDb_Manage", u"importSt3.description", None))
|
||||
self.exportScoresButton.setText(QCoreApplication.translate("TabDb_Manage", u"exportScoresButton", None))
|
||||
self.label_3.setText(QCoreApplication.translate("TabDb_Manage", u"exportScores.description", None))
|
||||
self.importPacklistButton.setText(QCoreApplication.translate("TabDb_Manage", u"importPacklistButton", None))
|
||||
self.importSonglistButton.setText(QCoreApplication.translate("TabDb_Manage", u"importSonglistButton", None))
|
||||
self.label_4.setText(QCoreApplication.translate("TabDb_Manage", u"importPacklist.description", None))
|
||||
self.importSonglistButton.setText(QCoreApplication.translate("TabDb_Manage", u"importSonglistButton", None))
|
||||
self.label_5.setText(QCoreApplication.translate("TabDb_Manage", u"importSonglist.description", None))
|
||||
self.exportArcsongJsonButton.setText(QCoreApplication.translate("TabDb_Manage", u"exportArcsongJsonButton", None))
|
||||
self.label_6.setText(QCoreApplication.translate("TabDb_Manage", u"exportArcsongJson.description", None))
|
||||
self.importApkButton.setText(QCoreApplication.translate("TabDb_Manage", u"importApkButton", None))
|
||||
self.label_7.setText(QCoreApplication.translate("TabDb_Manage", u"importApk.description", None))
|
||||
self.label_11.setText(QCoreApplication.translate("TabDb_Manage", u"chartInfoGroup", None))
|
||||
self.syncArcSongDbButton.setText(QCoreApplication.translate("TabDb_Manage", u"syncArcSongDbButton", None))
|
||||
self.label.setText(QCoreApplication.translate("TabDb_Manage", u"syncArcSongDb.description", None))
|
||||
self.label_12.setText(QCoreApplication.translate("TabDb_Manage", u"importScoreGroup", None))
|
||||
self.importSt3Button.setText(QCoreApplication.translate("TabDb_Manage", u"importSt3Button", None))
|
||||
self.label_2.setText(QCoreApplication.translate("TabDb_Manage", u"importSt3.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.label_13.setText(QCoreApplication.translate("TabDb_Manage", u"exportScoreGroup", None))
|
||||
self.exportScoresButton.setText(QCoreApplication.translate("TabDb_Manage", u"exportScoresButton", None))
|
||||
self.label_3.setText(QCoreApplication.translate("TabDb_Manage", u"exportScores.description", None))
|
||||
self.exportSmartRteB30Button.setText(QCoreApplication.translate("TabDb_Manage", u"exportSmartRteB30Button", None))
|
||||
self.label_9.setText(QCoreApplication.translate("TabDb_Manage", u"exportSmartRteB30.description", None))
|
||||
self.label_14.setText(QCoreApplication.translate("TabDb_Manage", u"miscGroup", None))
|
||||
self.exportArcsongJsonButton.setText(QCoreApplication.translate("TabDb_Manage", u"exportArcsongJsonButton", None))
|
||||
self.label_6.setText(QCoreApplication.translate("TabDb_Manage", u"exportArcsongJson.description", None))
|
||||
self.label_10.setText(QCoreApplication.translate("TabDb_Manage", u"packSongInfoGroup", None))
|
||||
self.syncChartInfoDbButton.setText(QCoreApplication.translate("TabDb_Manage", u"syncChartInfoDbButton", None))
|
||||
self.label_15.setText(QCoreApplication.translate("TabDb_Manage", u"syncChartInfoDb.description", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
||||
|
@ -6,31 +6,31 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<width>600</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">TabDb_RemoveDuplicateScores</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>scan.title</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_scoreCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.score</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>scan.title</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_scoreCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.score</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_pureCheckBox">
|
||||
<property name="text">
|
||||
@ -52,155 +52,235 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_maxRecallCheckBox">
|
||||
<property name="text">
|
||||
<string notr="true">MAX RECALL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_clearTypeCheckBox">
|
||||
<widget class="QCheckBox" name="scan_option_maxRecallCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.clearType</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_modifierCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.modifier</string>
|
||||
<string notr="true">MAX RECALL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="scan_scanButton">
|
||||
<widget class="QCheckBox" name="scan_option_dateCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.scanButton</string>
|
||||
<string>scan.option.date</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_modifierCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.modifier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="scan_option_clearTypeCheckBox">
|
||||
<property name="text">
|
||||
<string>scan.option.clearType</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>quickSelect.title</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>quickSelect.keepSingleLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="quickSelect_timeComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="quickSelect_ColumnComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>91</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="quickSelect_selectButton">
|
||||
<property name="text">
|
||||
<string>quickSelect.selectButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="collapseAllButton">
|
||||
<property name="text">
|
||||
<string>collapseAllButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="expandAllButton">
|
||||
<property name="text">
|
||||
<string>expandAllButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="resetModelButton">
|
||||
<property name="text">
|
||||
<string>resetModelButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeView" name="treeView">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="scan_scanButton">
|
||||
<property name="text">
|
||||
<string>scan.scanButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="deleteSelectedButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton { color: red };</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>deleteSelectedButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="treeView">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::NoSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="headerHidden">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>quickSelect.title</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>quickSelect.description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="quickSelect_comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="quickSelect_selectButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>quickSelect.selectButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="deselectAllButton">
|
||||
<property name="text">
|
||||
<string>deselectAllButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reverseSelectionButton">
|
||||
<property name="text">
|
||||
<string>reverseSelectionButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="collapseAllButton">
|
||||
<property name="text">
|
||||
<string>collapseAllButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="expandAllButton">
|
||||
<property name="text">
|
||||
<string>expandAllButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="resetModelButton">
|
||||
<property name="text">
|
||||
<string>resetModelButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deleteSelectionButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton { color: red };</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>deleteSelectionButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>scan_option_scoreCheckBox</tabstop>
|
||||
<tabstop>scan_option_pureCheckBox</tabstop>
|
||||
<tabstop>scan_option_farCheckBox</tabstop>
|
||||
<tabstop>scan_option_lostCheckBox</tabstop>
|
||||
<tabstop>scan_option_maxRecallCheckBox</tabstop>
|
||||
<tabstop>scan_option_dateCheckBox</tabstop>
|
||||
<tabstop>scan_option_modifierCheckBox</tabstop>
|
||||
<tabstop>scan_option_clearTypeCheckBox</tabstop>
|
||||
<tabstop>scan_scanButton</tabstop>
|
||||
<tabstop>treeView</tabstop>
|
||||
<tabstop>quickSelect_comboBox</tabstop>
|
||||
<tabstop>quickSelect_selectButton</tabstop>
|
||||
<tabstop>deselectAllButton</tabstop>
|
||||
<tabstop>reverseSelectionButton</tabstop>
|
||||
<tabstop>collapseAllButton</tabstop>
|
||||
<tabstop>expandAllButton</tabstop>
|
||||
<tabstop>resetModelButton</tabstop>
|
||||
<tabstop>deleteSelectionButton</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -16,31 +16,31 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QAbstractItemView, QApplication, QCheckBox, QComboBox,
|
||||
QGridLayout, QGroupBox, QHBoxLayout, QHeaderView,
|
||||
QLabel, QPushButton, QSizePolicy, QSpacerItem,
|
||||
QTreeView, QVBoxLayout, QWidget)
|
||||
QGroupBox, QHBoxLayout, QHeaderView, QLabel,
|
||||
QPushButton, QSizePolicy, QSpacerItem, QTreeView,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
class Ui_TabDb_RemoveDuplicateScores(object):
|
||||
def setupUi(self, TabDb_RemoveDuplicateScores):
|
||||
if not TabDb_RemoveDuplicateScores.objectName():
|
||||
TabDb_RemoveDuplicateScores.setObjectName(u"TabDb_RemoveDuplicateScores")
|
||||
TabDb_RemoveDuplicateScores.resize(700, 500)
|
||||
TabDb_RemoveDuplicateScores.resize(600, 500)
|
||||
TabDb_RemoveDuplicateScores.setWindowTitle(u"TabDb_RemoveDuplicateScores")
|
||||
self.gridLayout = QGridLayout(TabDb_RemoveDuplicateScores)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.verticalLayout = QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout_2 = QVBoxLayout(TabDb_RemoveDuplicateScores)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.groupBox_2 = QGroupBox(TabDb_RemoveDuplicateScores)
|
||||
self.groupBox_2.setObjectName(u"groupBox_2")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.groupBox_2)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout = QVBoxLayout(self.groupBox_2)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout_4 = QVBoxLayout()
|
||||
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.scan_option_scoreCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_scoreCheckBox.setObjectName(u"scan_option_scoreCheckBox")
|
||||
|
||||
self.verticalLayout_2.addWidget(self.scan_option_scoreCheckBox)
|
||||
self.horizontalLayout_2.addWidget(self.scan_option_scoreCheckBox)
|
||||
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.scan_option_pureCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_pureCheckBox.setObjectName(u"scan_option_pureCheckBox")
|
||||
self.scan_option_pureCheckBox.setText(u"PURE")
|
||||
@ -59,38 +59,59 @@ class Ui_TabDb_RemoveDuplicateScores(object):
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.scan_option_lostCheckBox)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
|
||||
self.scan_option_maxRecallCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_maxRecallCheckBox.setObjectName(u"scan_option_maxRecallCheckBox")
|
||||
self.scan_option_maxRecallCheckBox.setText(u"MAX RECALL")
|
||||
|
||||
self.verticalLayout_2.addWidget(self.scan_option_maxRecallCheckBox)
|
||||
self.horizontalLayout_2.addWidget(self.scan_option_maxRecallCheckBox)
|
||||
|
||||
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_2)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.verticalLayout_4)
|
||||
|
||||
self.horizontalLayout_3 = QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
self.scan_option_clearTypeCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_clearTypeCheckBox.setObjectName(u"scan_option_clearTypeCheckBox")
|
||||
self.scan_option_dateCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_dateCheckBox.setObjectName(u"scan_option_dateCheckBox")
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.scan_option_clearTypeCheckBox)
|
||||
self.horizontalLayout_3.addWidget(self.scan_option_dateCheckBox)
|
||||
|
||||
self.scan_option_modifierCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_modifierCheckBox.setObjectName(u"scan_option_modifierCheckBox")
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.scan_option_modifierCheckBox)
|
||||
|
||||
self.scan_option_clearTypeCheckBox = QCheckBox(self.groupBox_2)
|
||||
self.scan_option_clearTypeCheckBox.setObjectName(u"scan_option_clearTypeCheckBox")
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
self.horizontalLayout_3.addWidget(self.scan_option_clearTypeCheckBox)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
|
||||
self.scan_scanButton = QPushButton(self.groupBox_2)
|
||||
self.scan_scanButton.setObjectName(u"scan_scanButton")
|
||||
|
||||
self.verticalLayout_2.addWidget(self.scan_scanButton)
|
||||
self.verticalLayout.addWidget(self.scan_scanButton)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.groupBox_2)
|
||||
self.verticalLayout_2.addWidget(self.groupBox_2)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.treeView = QTreeView(TabDb_RemoveDuplicateScores)
|
||||
self.treeView.setObjectName(u"treeView")
|
||||
self.treeView.setEditTriggers(QAbstractItemView.NoEditTriggers)
|
||||
self.treeView.setSelectionMode(QAbstractItemView.NoSelection)
|
||||
self.treeView.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
|
||||
self.treeView.setHeaderHidden(True)
|
||||
|
||||
self.horizontalLayout.addWidget(self.treeView)
|
||||
|
||||
self.verticalLayout_6 = QVBoxLayout()
|
||||
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
|
||||
self.groupBox = QGroupBox(TabDb_RemoveDuplicateScores)
|
||||
self.groupBox.setObjectName(u"groupBox")
|
||||
self.verticalLayout_3 = QVBoxLayout(self.groupBox)
|
||||
@ -100,73 +121,103 @@ class Ui_TabDb_RemoveDuplicateScores(object):
|
||||
|
||||
self.verticalLayout_3.addWidget(self.label)
|
||||
|
||||
self.quickSelect_timeComboBox = QComboBox(self.groupBox)
|
||||
self.quickSelect_timeComboBox.setObjectName(u"quickSelect_timeComboBox")
|
||||
self.quickSelect_comboBox = QComboBox(self.groupBox)
|
||||
self.quickSelect_comboBox.setObjectName(u"quickSelect_comboBox")
|
||||
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.quickSelect_comboBox.sizePolicy().hasHeightForWidth())
|
||||
self.quickSelect_comboBox.setSizePolicy(sizePolicy)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.quickSelect_timeComboBox)
|
||||
self.verticalLayout_3.addWidget(self.quickSelect_comboBox)
|
||||
|
||||
self.quickSelect_ColumnComboBox = QComboBox(self.groupBox)
|
||||
self.quickSelect_ColumnComboBox.setObjectName(u"quickSelect_ColumnComboBox")
|
||||
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.quickSelect_ColumnComboBox)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 91, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.verticalLayout_3.addItem(self.verticalSpacer)
|
||||
self.verticalLayout_3.addItem(self.verticalSpacer_2)
|
||||
|
||||
self.quickSelect_selectButton = QPushButton(self.groupBox)
|
||||
self.quickSelect_selectButton.setObjectName(u"quickSelect_selectButton")
|
||||
sizePolicy.setHeightForWidth(self.quickSelect_selectButton.sizePolicy().hasHeightForWidth())
|
||||
self.quickSelect_selectButton.setSizePolicy(sizePolicy)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.quickSelect_selectButton)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.groupBox)
|
||||
self.verticalLayout_6.addWidget(self.groupBox)
|
||||
|
||||
self.groupBox_3 = QGroupBox(TabDb_RemoveDuplicateScores)
|
||||
self.groupBox_3.setObjectName(u"groupBox_3")
|
||||
self.verticalLayout_5 = QVBoxLayout(self.groupBox_3)
|
||||
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
|
||||
self.deselectAllButton = QPushButton(self.groupBox_3)
|
||||
self.deselectAllButton.setObjectName(u"deselectAllButton")
|
||||
|
||||
self.gridLayout.addLayout(self.verticalLayout, 0, 1, 1, 1)
|
||||
self.verticalLayout_5.addWidget(self.deselectAllButton)
|
||||
|
||||
self.horizontalLayout_4 = QHBoxLayout()
|
||||
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
self.reverseSelectionButton = QPushButton(self.groupBox_3)
|
||||
self.reverseSelectionButton.setObjectName(u"reverseSelectionButton")
|
||||
|
||||
self.horizontalLayout_4.addItem(self.horizontalSpacer)
|
||||
self.verticalLayout_5.addWidget(self.reverseSelectionButton)
|
||||
|
||||
self.collapseAllButton = QPushButton(TabDb_RemoveDuplicateScores)
|
||||
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.verticalLayout_5.addItem(self.verticalSpacer_3)
|
||||
|
||||
self.collapseAllButton = QPushButton(self.groupBox_3)
|
||||
self.collapseAllButton.setObjectName(u"collapseAllButton")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.collapseAllButton)
|
||||
self.verticalLayout_5.addWidget(self.collapseAllButton)
|
||||
|
||||
self.expandAllButton = QPushButton(TabDb_RemoveDuplicateScores)
|
||||
self.expandAllButton = QPushButton(self.groupBox_3)
|
||||
self.expandAllButton.setObjectName(u"expandAllButton")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.expandAllButton)
|
||||
self.verticalLayout_5.addWidget(self.expandAllButton)
|
||||
|
||||
self.resetModelButton = QPushButton(TabDb_RemoveDuplicateScores)
|
||||
self.resetModelButton = QPushButton(self.groupBox_3)
|
||||
self.resetModelButton.setObjectName(u"resetModelButton")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.resetModelButton)
|
||||
self.verticalLayout_5.addWidget(self.resetModelButton)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_4, 1, 0, 1, 1)
|
||||
self.verticalLayout_5.addItem(self.verticalSpacer)
|
||||
|
||||
self.treeView = QTreeView(TabDb_RemoveDuplicateScores)
|
||||
self.treeView.setObjectName(u"treeView")
|
||||
self.treeView.setEditTriggers(QAbstractItemView.NoEditTriggers)
|
||||
self.treeView.setSelectionMode(QAbstractItemView.NoSelection)
|
||||
self.treeView.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
|
||||
|
||||
self.gridLayout.addWidget(self.treeView, 0, 0, 1, 1)
|
||||
|
||||
self.deleteSelectedButton = QPushButton(TabDb_RemoveDuplicateScores)
|
||||
self.deleteSelectedButton.setObjectName(u"deleteSelectedButton")
|
||||
self.deleteSelectionButton = QPushButton(self.groupBox_3)
|
||||
self.deleteSelectionButton.setObjectName(u"deleteSelectionButton")
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
self.deleteSelectedButton.setFont(font)
|
||||
self.deleteSelectedButton.setStyleSheet(u"QPushButton { color: red };")
|
||||
self.deleteSelectionButton.setFont(font)
|
||||
self.deleteSelectionButton.setStyleSheet(u"QPushButton { color: red };")
|
||||
|
||||
self.gridLayout.addWidget(self.deleteSelectedButton, 1, 1, 1, 1)
|
||||
self.verticalLayout_5.addWidget(self.deleteSelectionButton)
|
||||
|
||||
|
||||
self.verticalLayout_6.addWidget(self.groupBox_3)
|
||||
|
||||
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_6)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
|
||||
QWidget.setTabOrder(self.scan_option_scoreCheckBox, self.scan_option_pureCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_pureCheckBox, self.scan_option_farCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_farCheckBox, self.scan_option_lostCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_lostCheckBox, self.scan_option_maxRecallCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_maxRecallCheckBox, self.scan_option_dateCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_dateCheckBox, self.scan_option_modifierCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_modifierCheckBox, self.scan_option_clearTypeCheckBox)
|
||||
QWidget.setTabOrder(self.scan_option_clearTypeCheckBox, self.scan_scanButton)
|
||||
QWidget.setTabOrder(self.scan_scanButton, self.treeView)
|
||||
QWidget.setTabOrder(self.treeView, self.quickSelect_comboBox)
|
||||
QWidget.setTabOrder(self.quickSelect_comboBox, self.quickSelect_selectButton)
|
||||
QWidget.setTabOrder(self.quickSelect_selectButton, self.deselectAllButton)
|
||||
QWidget.setTabOrder(self.deselectAllButton, self.reverseSelectionButton)
|
||||
QWidget.setTabOrder(self.reverseSelectionButton, self.collapseAllButton)
|
||||
QWidget.setTabOrder(self.collapseAllButton, self.expandAllButton)
|
||||
QWidget.setTabOrder(self.expandAllButton, self.resetModelButton)
|
||||
QWidget.setTabOrder(self.resetModelButton, self.deleteSelectionButton)
|
||||
|
||||
self.retranslateUi(TabDb_RemoveDuplicateScores)
|
||||
|
||||
QMetaObject.connectSlotsByName(TabDb_RemoveDuplicateScores)
|
||||
@ -175,16 +226,20 @@ class Ui_TabDb_RemoveDuplicateScores(object):
|
||||
def retranslateUi(self, TabDb_RemoveDuplicateScores):
|
||||
self.groupBox_2.setTitle(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.title", None))
|
||||
self.scan_option_scoreCheckBox.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.option.score", None))
|
||||
self.scan_option_clearTypeCheckBox.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.option.clearType", None))
|
||||
self.scan_option_dateCheckBox.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.option.date", None))
|
||||
self.scan_option_modifierCheckBox.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.option.modifier", None))
|
||||
self.scan_option_clearTypeCheckBox.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.option.clearType", None))
|
||||
self.scan_scanButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"scan.scanButton", None))
|
||||
self.groupBox.setTitle(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"quickSelect.title", None))
|
||||
self.label.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"quickSelect.keepSingleLabel", None))
|
||||
self.label.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"quickSelect.description", None))
|
||||
self.quickSelect_selectButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"quickSelect.selectButton", None))
|
||||
self.groupBox_3.setTitle("")
|
||||
self.deselectAllButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"deselectAllButton", None))
|
||||
self.reverseSelectionButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"reverseSelectionButton", None))
|
||||
self.collapseAllButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"collapseAllButton", None))
|
||||
self.expandAllButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"expandAllButton", None))
|
||||
self.resetModelButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"resetModelButton", None))
|
||||
self.deleteSelectedButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"deleteSelectedButton", None))
|
||||
self.deleteSelectionButton.setText(QCoreApplication.translate("TabDb_RemoveDuplicateScores", u"deleteSelectionButton", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
||||
|
@ -29,6 +29,11 @@
|
||||
<string>tab.chartInfoEditor</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="TabDb_RemoveDuplicateScores" name="tab_removeDuplicateScores">
|
||||
<attribute name="title">
|
||||
<string>tab.removeDuplicateScores</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -46,6 +51,12 @@
|
||||
<header>ui.implements.tabs.tabDb.tabDb_ChartInfoEditor</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TabDb_RemoveDuplicateScores</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ui.implements.tabs.tabDb.tabDb_RemoveDuplicateScores</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -20,6 +20,7 @@ from PySide6.QtWidgets import (QApplication, QSizePolicy, QTabWidget, QVBoxLayou
|
||||
|
||||
from ui.implements.tabs.tabDb.tabDb_ChartInfoEditor import TabDb_ChartInfoEditor
|
||||
from ui.implements.tabs.tabDb.tabDb_Manage import TabDb_Manage
|
||||
from ui.implements.tabs.tabDb.tabDb_RemoveDuplicateScores import TabDb_RemoveDuplicateScores
|
||||
|
||||
class Ui_TabDbEntry(object):
|
||||
def setupUi(self, TabDbEntry):
|
||||
@ -37,6 +38,9 @@ class Ui_TabDbEntry(object):
|
||||
self.tab_chartInfoEditor = TabDb_ChartInfoEditor()
|
||||
self.tab_chartInfoEditor.setObjectName(u"tab_chartInfoEditor")
|
||||
self.tabWidget.addTab(self.tab_chartInfoEditor, "")
|
||||
self.tab_removeDuplicateScores = TabDb_RemoveDuplicateScores()
|
||||
self.tab_removeDuplicateScores.setObjectName(u"tab_removeDuplicateScores")
|
||||
self.tabWidget.addTab(self.tab_removeDuplicateScores, "")
|
||||
|
||||
self.verticalLayout.addWidget(self.tabWidget)
|
||||
|
||||
@ -52,6 +56,7 @@ class Ui_TabDbEntry(object):
|
||||
def retranslateUi(self, TabDbEntry):
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_manage), QCoreApplication.translate("TabDbEntry", u"tab.manage", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_chartInfoEditor), QCoreApplication.translate("TabDbEntry", u"tab.chartInfoEditor", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_removeDuplicateScores), QCoreApplication.translate("TabDbEntry", u"tab.removeDuplicateScores", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
||||
|
@ -339,7 +339,7 @@
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string><a href="https://github.com/283375/AndrealImageGenerator">283375/AndrealImageGenerator</a><br>(forked from <a href="https://github.com/Awbugl/AndrealImageGenerator">Awbugl/AndrealImageGenerator</a>)</string>
|
||||
<string notr="true"><a href="https://github.com/283375/AndrealImageGenerator">283375/AndrealImageGenerator</a><br>(forked from <a href="https://github.com/Awbugl/AndrealImageGenerator">Awbugl/AndrealImageGenerator</a>)</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
@ -227,6 +227,7 @@ class Ui_TabTools_Andreal(object):
|
||||
|
||||
self.label_7 = QLabel(TabTools_Andreal)
|
||||
self.label_7.setObjectName(u"label_7")
|
||||
self.label_7.setText(u"<a href=\"https://github.com/283375/AndrealImageGenerator\">283375/AndrealImageGenerator</a><br>(forked from <a href=\"https://github.com/Awbugl/AndrealImageGenerator\">Awbugl/AndrealImageGenerator</a>)")
|
||||
self.label_7.setOpenExternalLinks(True)
|
||||
|
||||
self.formLayout.setWidget(9, QFormLayout.FieldRole, self.label_7)
|
||||
@ -257,7 +258,6 @@ class Ui_TabTools_Andreal(object):
|
||||
self.generatePreviewButton.setText(QCoreApplication.translate("TabTools_Andreal", u"generatePreviewButton", None))
|
||||
self.generateImageButton.setText(QCoreApplication.translate("TabTools_Andreal", u"generateImageButton", None))
|
||||
self.label_4.setText(QCoreApplication.translate("TabTools_Andreal", u"sourceCode", None))
|
||||
self.label_7.setText(QCoreApplication.translate("TabTools_Andreal", u"<a href=\"https://github.com/283375/AndrealImageGenerator\">283375/AndrealImageGenerator</a><br>(forked from <a href=\"https://github.com/Awbugl/AndrealImageGenerator\">Awbugl/AndrealImageGenerator</a>)", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
||||
|
@ -82,6 +82,7 @@ class ChartDelegate(TextSegmentDelegate):
|
||||
QColor("#809955"),
|
||||
QColor("#702d60"),
|
||||
QColor("#710f25"),
|
||||
QColor("#8b77a4"),
|
||||
]
|
||||
ChartInvalidBackgroundColor = QColor("#e6a23c")
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import logging
|
||||
from typing import Type
|
||||
|
||||
from PySide6.QtCore import Signal
|
||||
@ -6,6 +7,8 @@ from PySide6.QtWidgets import QHBoxLayout, QSizePolicy, QVBoxLayout, QWidget
|
||||
|
||||
from ui.implements.components.ratingClassRadioButton import RatingClassRadioButton
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RatingClassSelector(QWidget):
|
||||
valueChanged = Signal()
|
||||
@ -41,16 +44,30 @@ class RatingClassSelector(QWidget):
|
||||
self.bydButton.setAutoExclusive(False)
|
||||
self.preferredLayout.addWidget(self.bydButton)
|
||||
|
||||
self.buttons = [self.pstButton, self.prsButton, self.ftrButton, self.bydButton]
|
||||
self.etrButton = RatingClassRadioButton(self)
|
||||
self.etrButton.setObjectName("etrButton")
|
||||
self.etrButton.setText("ETERNAL")
|
||||
self.etrButton.setAutoExclusive(False)
|
||||
self.preferredLayout.addWidget(self.etrButton)
|
||||
|
||||
self.buttons = [
|
||||
self.pstButton,
|
||||
self.prsButton,
|
||||
self.ftrButton,
|
||||
self.bydButton,
|
||||
self.etrButton,
|
||||
]
|
||||
self.pstButton.setColors(QColor("#399bb2"), QColor("#f0f8fa"))
|
||||
self.prsButton.setColors(QColor("#809955"), QColor("#f7f9f4"))
|
||||
self.ftrButton.setColors(QColor("#702d60"), QColor("#f7ebf4"))
|
||||
self.bydButton.setColors(QColor("#710f25"), QColor("#f9ced8"))
|
||||
self.etrButton.setColors(QColor("#4f2c7a"), QColor("#e4daf1"))
|
||||
|
||||
self.pstButton.clicked.connect(self.select)
|
||||
self.prsButton.clicked.connect(self.select)
|
||||
self.ftrButton.clicked.connect(self.select)
|
||||
self.bydButton.clicked.connect(self.select)
|
||||
self.etrButton.clicked.connect(self.select)
|
||||
self.reset()
|
||||
self.setButtonsEnabled([])
|
||||
|
||||
@ -106,9 +123,10 @@ class RatingClassSelector(QWidget):
|
||||
|
||||
if ratingClass is None or isinstance(ratingClass, bool):
|
||||
button = self.sender()
|
||||
elif ratingClass in range(4):
|
||||
elif ratingClass in range(len(self.buttons)):
|
||||
button = self.buttons[ratingClass]
|
||||
else:
|
||||
logger.debug(f"Cannot select {ratingClass=}, condition check failed")
|
||||
return
|
||||
|
||||
if not button.isEnabled():
|
||||
|
@ -14,9 +14,10 @@ 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.chart_info_db import ChartInfoDbParser
|
||||
from arcaea_offline.external.smartrte import SmartRteB30CsvConverter
|
||||
from arcaea_offline.models import Difficulty, Pack, Song
|
||||
from PySide6.QtCore import QDir, Slot
|
||||
from PySide6.QtCore import QDateTime, QDir, Slot
|
||||
from PySide6.QtWidgets import QFileDialog, QMessageBox, QWidget
|
||||
|
||||
from ui.designer.tabs.tabDb.tabDb_Manage_ui import Ui_TabDb_Manage
|
||||
@ -57,6 +58,29 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
self, "Sync Error", "\n".join(traceback.format_exception(e))
|
||||
)
|
||||
|
||||
@Slot()
|
||||
def on_syncChartInfoDbButton_clicked(self):
|
||||
dbFile, filter = QFileDialog.getOpenFileName(
|
||||
self, None, "", "DB File (*.db);;*"
|
||||
)
|
||||
|
||||
if not dbFile:
|
||||
return
|
||||
|
||||
try:
|
||||
db = Database()
|
||||
parser = ChartInfoDbParser(dbFile)
|
||||
with db.sessionmaker() as session:
|
||||
parser.write_database(session)
|
||||
session.commit()
|
||||
databaseUpdateSignals.chartInfoUpdated.emit()
|
||||
QMessageBox.information(self, None, "OK")
|
||||
except Exception as e:
|
||||
logging.exception("Sync chart info database error")
|
||||
QMessageBox.critical(
|
||||
self, "Sync Error", "\n".join(traceback.format_exception(e))
|
||||
)
|
||||
|
||||
def importFromArcaeaParser(
|
||||
self, parser: ArcaeaParser, instance, logName, path
|
||||
) -> int:
|
||||
@ -208,14 +232,14 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
|
||||
@Slot()
|
||||
def on_exportScoresButton_clicked(self):
|
||||
scores = Database().export_scores()
|
||||
version = Database().version()
|
||||
scores = Database().export_scores_def_v2()
|
||||
timestamp = QDateTime.currentMSecsSinceEpoch()
|
||||
content = json.dumps(scores, ensure_ascii=False)
|
||||
|
||||
exportLocation, _filter = QFileDialog.getSaveFileName(
|
||||
self,
|
||||
"Save your scores to...",
|
||||
QDir.current().filePath(f"arcaea-offline-scores-v{version}.json"),
|
||||
QDir.current().filePath(f"arcaea-offline-def-v2-scores-{timestamp}.json"),
|
||||
"JSON (*.json);;*",
|
||||
)
|
||||
with open(exportLocation, "w", encoding="utf-8") as f:
|
||||
|
@ -1,9 +1,11 @@
|
||||
from enum import IntEnum
|
||||
|
||||
from arcaea_offline.database import Database
|
||||
from arcaea_offline.models import Chart, Difficulty, Score, Song
|
||||
from PySide6.QtCore import QModelIndex, Qt, Slot
|
||||
from PySide6.QtCore import QCoreApplication, QModelIndex, Qt, Slot
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import QStyledItemDelegate, QWidget
|
||||
from sqlalchemy import func, select
|
||||
from PySide6.QtWidgets import QMessageBox, QStyledItemDelegate, QWidget
|
||||
from sqlalchemy import delete, func, select
|
||||
from sqlalchemy.orm import InstrumentedAttribute, Session
|
||||
|
||||
from ui.designer.tabs.tabDb.tabDb_RemoveDuplicateScores_ui import (
|
||||
@ -11,6 +13,7 @@ from ui.designer.tabs.tabDb.tabDb_RemoveDuplicateScores_ui import (
|
||||
)
|
||||
from ui.extends.shared.delegates.chartDelegate import ChartDelegate
|
||||
from ui.extends.shared.delegates.scoreDelegate import ScoreDelegate
|
||||
from ui.extends.shared.language import LanguageChangeEventFilter
|
||||
|
||||
|
||||
class RemoveDuplicateScoresModel(QStandardItemModel):
|
||||
@ -25,27 +28,38 @@ class RemoveDuplicateScoresModel(QStandardItemModel):
|
||||
chart = (
|
||||
session.query(Chart)
|
||||
.where((Chart.song_id == songId) & (Chart.rating_class == ratingClass))
|
||||
.one()
|
||||
.first()
|
||||
)
|
||||
song = session.query(Song).where(Song.id == songId).one()
|
||||
song = session.query(Song).where(Song.id == songId).first()
|
||||
difficulty = (
|
||||
session.query(Difficulty)
|
||||
.where(
|
||||
(Difficulty.song_id == songId)
|
||||
& (Difficulty.rating_class == ratingClass)
|
||||
)
|
||||
.one()
|
||||
.first()
|
||||
)
|
||||
|
||||
if chart is None and song is None and difficulty is None:
|
||||
chart = Chart(song_id=songId, rating_class=ratingClass, set="unknown")
|
||||
|
||||
item.setData(chart, self.ChartRole)
|
||||
item.setData(song, self.SongRole)
|
||||
item.setData(difficulty, self.DifficultyRole)
|
||||
|
||||
def setScores(self, scores: list[Score]):
|
||||
def getGroupKey(self, score: Score, columns: list[InstrumentedAttribute]) -> str:
|
||||
baseKeys = [score.song_id, str(score.rating_class)]
|
||||
for column in columns:
|
||||
key = f"{column.key}{getattr(score,column.key)}"
|
||||
baseKeys.append(key)
|
||||
return "||".join(baseKeys)
|
||||
|
||||
def setScores(self, scores: list[Score], columns: list[InstrumentedAttribute]):
|
||||
self.clear()
|
||||
|
||||
scoreKeyMap: dict[tuple[str, int], list[Score]] = {}
|
||||
scoreKeyMap: dict[str, list[Score]] = {}
|
||||
for score in scores:
|
||||
key = (score.song_id, score.rating_class)
|
||||
key = self.getGroupKey(score, columns)
|
||||
if scoreKeyMap.get(key) is None:
|
||||
scoreKeyMap[key] = [score]
|
||||
else:
|
||||
@ -54,7 +68,8 @@ class RemoveDuplicateScoresModel(QStandardItemModel):
|
||||
db = Database()
|
||||
with db.sessionmaker() as session:
|
||||
for key, scores in scoreKeyMap.items():
|
||||
songId, ratingClass = key
|
||||
songId, ratingClass = key.split("||")[:2]
|
||||
ratingClass = int(ratingClass)
|
||||
|
||||
parentCheckBoxItem = QStandardItem(f"{len(scores)} items")
|
||||
parentChartItem = QStandardItem()
|
||||
@ -112,26 +127,52 @@ class TreeViewProxyDelegate(QStyledItemDelegate):
|
||||
QStyledItemDelegate.paint(self, painter, option, index)
|
||||
|
||||
|
||||
class QuickSelectComboBoxValues(IntEnum):
|
||||
ID_EARLIER = 0
|
||||
DATE_EARLIER = 1
|
||||
COLUMNS_INTEGRAL = 2
|
||||
|
||||
|
||||
class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.languageChangeEventFilter = LanguageChangeEventFilter(self)
|
||||
self.installEventFilter(self.languageChangeEventFilter)
|
||||
|
||||
self.db = Database()
|
||||
|
||||
self.scan_scanButton.clicked.connect(self.fillModel)
|
||||
|
||||
self.model = RemoveDuplicateScoresModel(self)
|
||||
self.treeView.setModel(self.model)
|
||||
self.removeDuplicateScoresModel = RemoveDuplicateScoresModel(self)
|
||||
self.treeView.setModel(self.removeDuplicateScoresModel)
|
||||
|
||||
self.treeViewChartDelegate = TreeViewChartDelegate(self.treeView)
|
||||
self.treeViewScoreDelegate = TreeViewScoreDelegate(self.treeView)
|
||||
self.treeViewDelegate = TreeViewProxyDelegate(
|
||||
self.treeViewProxyDelegate = TreeViewProxyDelegate(
|
||||
self.treeViewChartDelegate, self.treeViewScoreDelegate, self.treeView
|
||||
)
|
||||
self.treeView.setItemDelegateForColumn(1, self.treeViewDelegate)
|
||||
self.treeView.setItemDelegateForColumn(1, self.treeViewProxyDelegate)
|
||||
|
||||
def getGroupByColumns(self):
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.idEarlier"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.ID_EARLIER
|
||||
)
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.dateEarlier"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.DATE_EARLIER
|
||||
)
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.columnsIntegral"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.COLUMNS_INTEGRAL
|
||||
)
|
||||
|
||||
def getQueryColumns(self):
|
||||
columns: list[InstrumentedAttribute] = [Score.song_id, Score.rating_class]
|
||||
|
||||
if self.scan_option_scoreCheckBox.isChecked():
|
||||
@ -144,15 +185,17 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
columns.append(Score.lost)
|
||||
if self.scan_option_maxRecallCheckBox.isChecked():
|
||||
columns.append(Score.max_recall)
|
||||
if self.scan_option_clearTypeCheckBox.isChecked():
|
||||
columns.append(Score.clear_type)
|
||||
if self.scan_option_dateCheckBox.isChecked():
|
||||
columns.append(Score.date)
|
||||
if self.scan_option_modifierCheckBox.isChecked():
|
||||
columns.append(Score.modifier)
|
||||
if self.scan_option_clearTypeCheckBox.isChecked():
|
||||
columns.append(Score.clear_type)
|
||||
|
||||
return columns
|
||||
|
||||
def getQueryScores(self):
|
||||
columns = self.getGroupByColumns()
|
||||
columns = self.getQueryColumns()
|
||||
with self.db.sessionmaker() as session:
|
||||
groupBySubquery = (
|
||||
select(*columns).group_by(*columns).having(func.count() > 1).subquery()
|
||||
@ -162,11 +205,137 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
]
|
||||
return session.query(Score).where(*selectInClause).all()
|
||||
|
||||
def fillModel(self):
|
||||
def scan(self):
|
||||
scores = self.getQueryScores()
|
||||
self.model.setScores(scores)
|
||||
self.removeDuplicateScoresModel.setScores(scores, self.getQueryColumns())
|
||||
self.treeView.expandAll()
|
||||
|
||||
def deselectAll(self):
|
||||
for row in range(self.removeDuplicateScoresModel.rowCount()):
|
||||
parentItem = self.removeDuplicateScoresModel.item(row, 0)
|
||||
for childRow in range(parentItem.rowCount()):
|
||||
childCheckBoxItem = parentItem.child(childRow, 0)
|
||||
childCheckBoxItem.setCheckState(Qt.CheckState.Unchecked)
|
||||
|
||||
def quickSelect(self):
|
||||
mode = self.quickSelect_comboBox.currentData()
|
||||
|
||||
if mode is None:
|
||||
return
|
||||
|
||||
for row in range(self.removeDuplicateScoresModel.rowCount()):
|
||||
parentItem = self.removeDuplicateScoresModel.item(row, 0)
|
||||
|
||||
scores: list[Score] = []
|
||||
|
||||
for childRow in range(parentItem.rowCount()):
|
||||
childScoreItem = parentItem.child(childRow, 1)
|
||||
scores.append(childScoreItem.data(RemoveDuplicateScoresModel.ScoreRole))
|
||||
|
||||
if mode == QuickSelectComboBoxValues.ID_EARLIER:
|
||||
chosenRow = min(enumerate(scores), key=lambda i: i[1].id)[0]
|
||||
elif mode == QuickSelectComboBoxValues.DATE_EARLIER:
|
||||
chosenRow = min(
|
||||
enumerate(scores),
|
||||
key=lambda i: float("inf") if i[1].date is None else i[1].date,
|
||||
)[0]
|
||||
elif mode == QuickSelectComboBoxValues.COLUMNS_INTEGRAL:
|
||||
chosenRow = max(
|
||||
enumerate(scores),
|
||||
key=lambda i: sum(
|
||||
getattr(i[1], col.key) is not None
|
||||
for col in i[1].__table__.columns
|
||||
),
|
||||
)[0]
|
||||
|
||||
for childRow in range(parentItem.rowCount()):
|
||||
childCheckBoxItem = parentItem.child(childRow, 0)
|
||||
if childRow != chosenRow:
|
||||
childCheckBoxItem.setCheckState(Qt.CheckState.Checked)
|
||||
else:
|
||||
childCheckBoxItem.setCheckState(Qt.CheckState.Unchecked)
|
||||
|
||||
def reverseSelection(self):
|
||||
for row in range(self.removeDuplicateScoresModel.rowCount()):
|
||||
parentItem = self.removeDuplicateScoresModel.item(row, 0)
|
||||
# only when there's a checked item in this group, we perform a reversed selection
|
||||
# otherwise we ignore this group
|
||||
performReverse = any(
|
||||
parentItem.child(childRow, 0).checkState() == Qt.CheckState.Checked
|
||||
for childRow in range(parentItem.rowCount())
|
||||
)
|
||||
if not performReverse:
|
||||
continue
|
||||
|
||||
for childRow in range(parentItem.rowCount()):
|
||||
childCheckBoxItem = parentItem.child(childRow, 0)
|
||||
newCheckState = (
|
||||
Qt.CheckState.Unchecked
|
||||
if childCheckBoxItem.checkState() != Qt.CheckState.Unchecked
|
||||
else Qt.CheckState.Checked
|
||||
)
|
||||
childCheckBoxItem.setCheckState(newCheckState)
|
||||
|
||||
def deleteSelection(self):
|
||||
selectedScores: list[Score] = []
|
||||
for row in range(self.removeDuplicateScoresModel.rowCount()):
|
||||
parentItem = self.removeDuplicateScoresModel.item(row, 0)
|
||||
for childRow in range(parentItem.rowCount()):
|
||||
childCheckBoxItem = parentItem.child(childRow, 0)
|
||||
if childCheckBoxItem.checkState() == Qt.CheckState.Checked:
|
||||
childScoreItem = parentItem.child(childRow, 1)
|
||||
selectedScores.append(
|
||||
childScoreItem.data(RemoveDuplicateScoresModel.ScoreRole)
|
||||
)
|
||||
|
||||
confirm = QMessageBox.warning(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "deleteSelectionDialog.content {}").format(len(selectedScores)),
|
||||
# fmt: on
|
||||
QMessageBox.StandardButton.Yes,
|
||||
QMessageBox.StandardButton.No,
|
||||
)
|
||||
if confirm != QMessageBox.StandardButton.Yes:
|
||||
return
|
||||
|
||||
with self.db.sessionmaker() as session:
|
||||
ids = [s.id for s in selectedScores]
|
||||
session.execute(delete(Score).where(Score.id.in_(ids)))
|
||||
session.commit()
|
||||
|
||||
self.scan()
|
||||
|
||||
@Slot()
|
||||
def on_scan_scanButton_clicked(self):
|
||||
if len(self.getQueryColumns()) <= 2:
|
||||
result = QMessageBox.warning(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "scan_noColumnsDialog.content"),
|
||||
# fmt: on
|
||||
QMessageBox.StandardButton.Yes,
|
||||
QMessageBox.StandardButton.No,
|
||||
)
|
||||
if result != QMessageBox.StandardButton.Yes:
|
||||
return
|
||||
|
||||
self.scan()
|
||||
|
||||
@Slot()
|
||||
def on_quickSelect_selectButton_clicked(self):
|
||||
self.quickSelect()
|
||||
|
||||
@Slot()
|
||||
def on_deselectAllButton_clicked(self):
|
||||
self.deselectAll()
|
||||
|
||||
@Slot()
|
||||
def on_reverseSelectionButton_clicked(self):
|
||||
self.reverseSelection()
|
||||
|
||||
@Slot()
|
||||
def on_expandAllButton_clicked(self):
|
||||
self.treeView.expandAll()
|
||||
@ -174,3 +343,11 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
@Slot()
|
||||
def on_collapseAllButton_clicked(self):
|
||||
self.treeView.collapseAll()
|
||||
|
||||
@Slot()
|
||||
def on_resetModelButton_clicked(self):
|
||||
self.removeDuplicateScoresModel.clear()
|
||||
|
||||
@Slot()
|
||||
def on_deleteSelectionButton_clicked(self):
|
||||
self.deleteSelection()
|
||||
|
@ -5,12 +5,12 @@ from arcaea_offline.database import Database
|
||||
from arcaea_offline.models import Chart, Score
|
||||
from arcaea_offline.utils.rating import rating_class_to_text
|
||||
from PySide6.QtCore import QModelIndex, Qt, Slot
|
||||
from PySide6.QtGui import QColor, QPalette
|
||||
from PySide6.QtWidgets import QDialog, QLabel, QVBoxLayout, QWidget
|
||||
|
||||
from ui.designer.tabs.tabTools.tabTools_ChartRecommend_ui import (
|
||||
Ui_TabTools_ChartRecommend,
|
||||
)
|
||||
from ui.extends.shared.language import LanguageChangeEventFilter
|
||||
from ui.extends.tabs.tabTools.tabTools_ChartRecommend import (
|
||||
ChartsModel,
|
||||
ChartsWithScoreBestModel,
|
||||
@ -55,6 +55,9 @@ class TabTools_ChartRecommend(Ui_TabTools_ChartRecommend, QWidget):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.languageChangeEventFilter = LanguageChangeEventFilter(self)
|
||||
self.installEventFilter(self.languageChangeEventFilter)
|
||||
|
||||
self.db = Database()
|
||||
|
||||
self.chartsByConstantModel = ChartsModel(self)
|
||||
|
@ -599,6 +599,11 @@ validation</translation>
|
||||
<source>tab.chartInfoEditor</source>
|
||||
<translation>Chart Info Editor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDbEntry.ui" line="34"/>
|
||||
<source>tab.removeDuplicateScores</source>
|
||||
<translation>Remove Duplicate Scores</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDbEntry.py" line="20"/>
|
||||
<source>tab.scoreTableViewer</source>
|
||||
@ -667,96 +672,234 @@ validation</translation>
|
||||
<context>
|
||||
<name>TabDb_Manage</name>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="23"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="78"/>
|
||||
<source>syncArcSongDbButton</source>
|
||||
<translation>Sync arcsong.db</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="30"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="85"/>
|
||||
<source>syncArcSongDb.description</source>
|
||||
<translation>Update chart info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="37"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="98"/>
|
||||
<source>importScoreGroup</source>
|
||||
<translation>Import Score</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="105"/>
|
||||
<source>importSt3Button</source>
|
||||
<translation>Import from Game Save</translation>
|
||||
<translation>Game Save Database</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="44"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="112"/>
|
||||
<source>importSt3.description</source>
|
||||
<translation>Import scores from your game save</translation>
|
||||
<translation>Import scores from your game save database</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="58"/>
|
||||
<source>exportScoresButton</source>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="139"/>
|
||||
<source>exportScoreGroup</source>
|
||||
<translation>Export Scores</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="65"/>
|
||||
<source>exportScores.description</source>
|
||||
<translation>Export all your scores to a JSON file</translation>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="146"/>
|
||||
<source>exportScoresButton</source>
|
||||
<translation>D.E.F. V2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="79"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="153"/>
|
||||
<source>exportScores.description</source>
|
||||
<translation>Export all your scores in <i>Arcaea Offline Data Exchange Format V2</i> formed JSON file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="186"/>
|
||||
<source>miscGroup</source>
|
||||
<translation>Miscellaneous</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="284"/>
|
||||
<source>syncChartInfoDbButton</source>
|
||||
<translation>Sync Chart Info Database</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="291"/>
|
||||
<source>syncChartInfoDb.description</source>
|
||||
<translation>Update chart info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="23"/>
|
||||
<source>importPacklistButton</source>
|
||||
<translation>Import packlist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="86"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="37"/>
|
||||
<source>importSonglistButton</source>
|
||||
<translation>Import songlist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="93"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="30"/>
|
||||
<source>importPacklist.description</source>
|
||||
<translation>Import packlist file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="100"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="44"/>
|
||||
<source>importSonglist.description</source>
|
||||
<translation>Import songlist file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="107"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="193"/>
|
||||
<source>exportArcsongJsonButton</source>
|
||||
<translation>Export arcsong.json</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="114"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="200"/>
|
||||
<source>exportArcsongJson.description</source>
|
||||
<translation>Export arcsong.json file</translation>
|
||||
<translation>Export arcsong.json file based on the information in database</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="121"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="51"/>
|
||||
<source>importApkButton</source>
|
||||
<translation>Import from APK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="128"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="213"/>
|
||||
<source>packSongInfoGroup</source>
|
||||
<translation>Pack/Song Info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="58"/>
|
||||
<source>importApk.description</source>
|
||||
<translation>Import packlist and songlist from .apk file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="135"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="71"/>
|
||||
<source>chartInfoGroup</source>
|
||||
<translation>Chart Info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="119"/>
|
||||
<source>importOnlineButton</source>
|
||||
<translation>Import from Arcaea Online</translation>
|
||||
<translation>Arcaea Online</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="142"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="126"/>
|
||||
<source>importOnline.description</source>
|
||||
<translation>Import scores from the result of Arcaea Online API</translation>
|
||||
<translation>Import scores from the Arcaea Online API result</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="149"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="160"/>
|
||||
<source>exportSmartRteB30Button</source>
|
||||
<translation>Export Scores (CSV, SmartRTE B30)</translation>
|
||||
<translation>SmartRTE B30</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="156"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="167"/>
|
||||
<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>TabDb_RemoveDuplicateScores</name>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="20"/>
|
||||
<source>scan.title</source>
|
||||
<translation>Scan Options</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="30"/>
|
||||
<source>scan.option.score</source>
|
||||
<translation>Score</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="71"/>
|
||||
<source>scan.option.date</source>
|
||||
<translation>Date</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="78"/>
|
||||
<source>scan.option.modifier</source>
|
||||
<translation>Modifier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="85"/>
|
||||
<source>scan.option.clearType</source>
|
||||
<translation>Clear Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="94"/>
|
||||
<source>scan.scanButton</source>
|
||||
<translation>Scan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="124"/>
|
||||
<source>quickSelect.title</source>
|
||||
<translation>Quick Select</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="130"/>
|
||||
<source>quickSelect.description</source>
|
||||
<translation>Keep the first score item<br>that matches:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="166"/>
|
||||
<source>quickSelect.selectButton</source>
|
||||
<translation>Select</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="182"/>
|
||||
<source>deselectAllButton</source>
|
||||
<translation>Clear Selection</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="189"/>
|
||||
<source>reverseSelectionButton</source>
|
||||
<translation>Reverse Selection</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="209"/>
|
||||
<source>collapseAllButton</source>
|
||||
<translation>Collapse All Groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="216"/>
|
||||
<source>expandAllButton</source>
|
||||
<translation>Expand All Groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="223"/>
|
||||
<source>resetModelButton</source>
|
||||
<translation>Reset Model</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="251"/>
|
||||
<source>deleteSelectionButton</source>
|
||||
<translation>Delete Selected Scores</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="158"/>
|
||||
<source>quickSelectComboBox.idEarlier</source>
|
||||
<translation>Earlier ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="164"/>
|
||||
<source>quickSelectComboBox.dateEarlier</source>
|
||||
<translation>Earlier date</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="170"/>
|
||||
<source>quickSelectComboBox.columnsIntegral</source>
|
||||
<translation>More complete data</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="295"/>
|
||||
<source>deleteSelectionDialog.content {}</source>
|
||||
<translation>Deleting {} scores from database, this cannot be undone!<br>Confirm?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="317"/>
|
||||
<source>scan_noColumnsDialog.content</source>
|
||||
<translation>You haven't selected any column! Are you sure to continue?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabOcrDisabled</name>
|
||||
<message>
|
||||
@ -911,7 +1054,7 @@ validation</translation>
|
||||
<context>
|
||||
<name>TabOverview</name>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabOverview.py" line="43"/>
|
||||
<location filename="../../implements/tabs/tabOverview.py" line="56"/>
|
||||
<source>databaseDescribeLabel {} {} {} {} {} {}</source>
|
||||
<translation>There are {} packs, {} songs, {} difficulties, {} chart info ({} complete) and {} scores in database.</translation>
|
||||
</message>
|
||||
@ -1006,11 +1149,6 @@ validation</translation>
|
||||
<source>sourceCode</source>
|
||||
<translation>Source code</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabTools/tabTools_Andreal.ui" line="342"/>
|
||||
<source><a href="https://github.com/283375/AndrealImageGenerator">283375/AndrealImageGenerator</a><br>(forked from <a href="https://github.com/Awbugl/AndrealImageGenerator">Awbugl/AndrealImageGenerator</a>)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabTools/tabTools_Andreal.py" line="138"/>
|
||||
<source>imageWhatIsThisDialog.description</source>
|
||||
|
@ -598,6 +598,11 @@
|
||||
<source>tab.chartInfoEditor</source>
|
||||
<translation>谱面信息编辑器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDbEntry.ui" line="34"/>
|
||||
<source>tab.removeDuplicateScores</source>
|
||||
<translation>移除重复分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDbEntry.py" line="20"/>
|
||||
<source>tab.scoreTableViewer</source>
|
||||
@ -666,96 +671,234 @@
|
||||
<context>
|
||||
<name>TabDb_Manage</name>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="23"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="78"/>
|
||||
<source>syncArcSongDbButton</source>
|
||||
<translation>同步 arcsong.db</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="30"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="85"/>
|
||||
<source>syncArcSongDb.description</source>
|
||||
<translation>更新谱面信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="37"/>
|
||||
<source>importSt3Button</source>
|
||||
<translation>导入本地存档</translation>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="98"/>
|
||||
<source>importScoreGroup</source>
|
||||
<translation>导入分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="44"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="105"/>
|
||||
<source>importSt3Button</source>
|
||||
<translation>存档文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="112"/>
|
||||
<source>importSt3.description</source>
|
||||
<translation>遏卡抑五年,天降飞龙,姿容极度美艳。白衣仙女以妙法擒之,与之相恋。<br>来年,恶人携联结万邦之力来袭,仙女龙妃以根源之术,呼唤神通叁式之威,退敌千里,永护宝库安宁。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="58"/>
|
||||
<source>exportScoresButton</source>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="139"/>
|
||||
<source>exportScoreGroup</source>
|
||||
<translation>导出分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="65"/>
|
||||
<source>exportScores.description</source>
|
||||
<translation>将所有分数导出为 JSON 文件</translation>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="146"/>
|
||||
<source>exportScoresButton</source>
|
||||
<translation>数据交换格式 V2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="79"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="153"/>
|
||||
<source>exportScores.description</source>
|
||||
<translation>将所有分数导出为 <i>Arcaea Offline 数据交换格式 V2</i> JSON 文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="186"/>
|
||||
<source>miscGroup</source>
|
||||
<translation>杂项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="284"/>
|
||||
<source>syncChartInfoDbButton</source>
|
||||
<translation>同步谱面信息数据库</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="291"/>
|
||||
<source>syncChartInfoDb.description</source>
|
||||
<translation>更新谱面信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="23"/>
|
||||
<source>importPacklistButton</source>
|
||||
<translation>导入 packlist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="86"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="37"/>
|
||||
<source>importSonglistButton</source>
|
||||
<translation>导入 songlist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="93"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="30"/>
|
||||
<source>importPacklist.description</source>
|
||||
<translation>导入 packlist 文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="100"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="44"/>
|
||||
<source>importSonglist.description</source>
|
||||
<translation>导入 songlist 文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="107"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="193"/>
|
||||
<source>exportArcsongJsonButton</source>
|
||||
<translation>导出 arcsong.json</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="114"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="200"/>
|
||||
<source>exportArcsongJson.description</source>
|
||||
<translation>导出 arcsong.json 文件</translation>
|
||||
<translation>基于数据库信息导出 arcsong.json 文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="121"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="51"/>
|
||||
<source>importApkButton</source>
|
||||
<translation>从 APK 导入</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="128"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="213"/>
|
||||
<source>packSongInfoGroup</source>
|
||||
<translation>曲包、歌曲信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="58"/>
|
||||
<source>importApk.description</source>
|
||||
<translation>从 .apk 文件导入 packlist 和 songlist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="135"/>
|
||||
<source>importOnlineButton</source>
|
||||
<translation>从 Arcaea Online 导入</translation>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="71"/>
|
||||
<source>chartInfoGroup</source>
|
||||
<translation>谱面信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="142"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="119"/>
|
||||
<source>importOnlineButton</source>
|
||||
<translation>Arcaea Online</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="126"/>
|
||||
<source>importOnline.description</source>
|
||||
<translation>从 Arcaea Online 的 API 结果导入分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="149"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="160"/>
|
||||
<source>exportSmartRteB30Button</source>
|
||||
<translation>导出分数(CSV,SmartRTE B30)</translation>
|
||||
<translation>SmartRTE B30</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="156"/>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_Manage.ui" line="167"/>
|
||||
<source>exportSmartRteB30.description</source>
|
||||
<translation>将所有分数导出为兼容 <a href="https://smartrte.github.io/b30gen.html">smartrte.github.io</a> 的 CSV 文件</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabDb_RemoveDuplicateScores</name>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="20"/>
|
||||
<source>scan.title</source>
|
||||
<translation>扫描选项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="30"/>
|
||||
<source>scan.option.score</source>
|
||||
<translation>分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="71"/>
|
||||
<source>scan.option.date</source>
|
||||
<translation>时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="78"/>
|
||||
<source>scan.option.modifier</source>
|
||||
<translation>Modifier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="85"/>
|
||||
<source>scan.option.clearType</source>
|
||||
<translation>Clear Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="94"/>
|
||||
<source>scan.scanButton</source>
|
||||
<translation>扫描</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="124"/>
|
||||
<source>quickSelect.title</source>
|
||||
<translation>快速选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="130"/>
|
||||
<source>quickSelect.description</source>
|
||||
<translation>仅保留第一个<br>符合以下条件的分数:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="166"/>
|
||||
<source>quickSelect.selectButton</source>
|
||||
<translation>选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="182"/>
|
||||
<source>deselectAllButton</source>
|
||||
<translation>清空选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="189"/>
|
||||
<source>reverseSelectionButton</source>
|
||||
<translation>反选</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="209"/>
|
||||
<source>collapseAllButton</source>
|
||||
<translation>折叠所有</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="216"/>
|
||||
<source>expandAllButton</source>
|
||||
<translation>展开所有</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="223"/>
|
||||
<source>resetModelButton</source>
|
||||
<translation>重置模型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabDb/tabDb_RemoveDuplicateScores.ui" line="251"/>
|
||||
<source>deleteSelectionButton</source>
|
||||
<translation>删除已选分数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="158"/>
|
||||
<source>quickSelectComboBox.idEarlier</source>
|
||||
<translation>ID 更早</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="164"/>
|
||||
<source>quickSelectComboBox.dateEarlier</source>
|
||||
<translation>时间更早</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="170"/>
|
||||
<source>quickSelectComboBox.columnsIntegral</source>
|
||||
<translation>数据更完整</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="295"/>
|
||||
<source>deleteSelectionDialog.content {}</source>
|
||||
<translation>将从数据库中删除 {} 个分数。此操作无法撤销!<br>确认吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabDb/tabDb_RemoveDuplicateScores.py" line="317"/>
|
||||
<source>scan_noColumnsDialog.content</source>
|
||||
<translation>还未选择任何字段!确定继续吗?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabOcrDisabled</name>
|
||||
<message>
|
||||
@ -910,7 +1053,7 @@
|
||||
<context>
|
||||
<name>TabOverview</name>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabOverview.py" line="43"/>
|
||||
<location filename="../../implements/tabs/tabOverview.py" line="56"/>
|
||||
<source>databaseDescribeLabel {} {} {} {} {} {}</source>
|
||||
<translation>数据库中有 {} 个曲包,{} 首歌曲,{} 个难度,{} 个谱面信息({} 个完整),{} 个分数记录。</translation>
|
||||
</message>
|
||||
@ -1005,11 +1148,6 @@
|
||||
<source>sourceCode</source>
|
||||
<translation>源代码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../designer/tabs/tabTools/tabTools_Andreal.ui" line="342"/>
|
||||
<source><a href="https://github.com/283375/AndrealImageGenerator">283375/AndrealImageGenerator</a><br>(forked from <a href="https://github.com/Awbugl/AndrealImageGenerator">Awbugl/AndrealImageGenerator</a>)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../implements/tabs/tabTools/tabTools_Andreal.py" line="138"/>
|
||||
<source>imageWhatIsThisDialog.description</source>
|
||||
|
@ -3,7 +3,7 @@ import traceback
|
||||
from enum import IntEnum
|
||||
|
||||
from arcaea_offline.database import Database
|
||||
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, Qt, QUrl, Slot
|
||||
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, QSysInfo, Qt, QUrl, Slot
|
||||
from PySide6.QtWidgets import QDialog, QMessageBox
|
||||
|
||||
from ui.extends.shared.database import create_engine
|
||||
@ -59,8 +59,13 @@ class DatabaseChecker(Ui_DatabaseChecker, QDialog):
|
||||
return QUrl.fromLocalFile(self.dbFileInfo().filePath())
|
||||
|
||||
def dbSqliteUrl(self):
|
||||
# dbSqliteUrl.setScheme("sqlite")
|
||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite://"))
|
||||
kernelType = QSysInfo.kernelType()
|
||||
# the slash count varies depending on the kernel
|
||||
# https://docs.sqlalchemy.org/en/20/core/engines.html#sqlite
|
||||
if kernelType == "winnt":
|
||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite://"))
|
||||
else:
|
||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite:///"))
|
||||
|
||||
def confirmDb(self) -> DatabaseCheckerResult:
|
||||
flags = 0x000
|
||||
|
Reference in New Issue
Block a user