mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-11 05:30:17 +00:00
Compare commits
5 Commits
a9d7681ee7
...
29eb135752
Author | SHA1 | Date | |
---|---|---|---|
29eb135752 | |||
b2a10d02ce | |||
0c88302053 | |||
fe3f610878 | |||
09063cc987 |
10
core/color.py
Normal file
10
core/color.py
Normal file
@ -0,0 +1,10 @@
|
||||
from PySide6.QtGui import QColor
|
||||
|
||||
|
||||
def mixColor(source: QColor, mix: QColor, ratio: float = 0.5):
|
||||
r = round((mix.red() - source.red()) * ratio + source.red())
|
||||
g = round((mix.green() - source.green()) * ratio + source.green())
|
||||
b = round((mix.blue() - source.blue()) * ratio + source.blue())
|
||||
a = round((mix.alpha() - source.alpha()) * ratio + source.alpha())
|
||||
|
||||
return QColor(r, g, b, a)
|
15
index.py
15
index.py
@ -18,16 +18,12 @@ from ui.startup.databaseChecker import DatabaseChecker, DatabaseCheckerResult
|
||||
rootLogger = logging.getLogger("root")
|
||||
rootLogger.setLevel(logging.DEBUG)
|
||||
|
||||
rootLoggerFormatter = logging.Formatter(
|
||||
"[{levelname}]{asctime}|{name}: {msg}", "%m-%d %H:%M:%S", "{"
|
||||
)
|
||||
|
||||
|
||||
def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
if issubclass(exc_type, KeyboardInterrupt):
|
||||
sys.__excepthook__(exc_type, exc_value, exc_traceback)
|
||||
return
|
||||
sys.__excepthook__(exc_type, exc_value, exc_traceback)
|
||||
|
||||
if issubclass(exc_type, KeyboardInterrupt):
|
||||
return
|
||||
rootLogger.critical(
|
||||
"Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)
|
||||
)
|
||||
@ -46,6 +42,11 @@ if __name__ == "__main__":
|
||||
ymd = now.strftime("%Y%m%d")
|
||||
hms = now.strftime("%H%M%S")
|
||||
|
||||
rootLoggerFormatter = logging.Formatter(
|
||||
"[%(asctime)s/%(levelname)s] %(name)s (%(tag)s): %(message)s",
|
||||
"%m-%d %H:%M:%S",
|
||||
defaults={"tag": "/"},
|
||||
)
|
||||
rootLoggerFileHandler = logging.FileHandler(
|
||||
str(logFolder / f"arcaea-offline-pyside-ui-{ymd}-{hms}_debug.log"),
|
||||
encoding="utf-8",
|
||||
|
@ -36,7 +36,6 @@ select = [
|
||||
"I", # isort
|
||||
"PL", # pylint
|
||||
"N", # pep8-naming
|
||||
"FBT", # flake8-boolean-trap
|
||||
"A", # flake8-builtins
|
||||
"DTZ", # flake8-datetimez
|
||||
"LOG", # flake8-logging
|
||||
|
@ -5,7 +5,6 @@ from typing import Any, Callable, Optional, overload
|
||||
from arcaea_offline.calculate import calculate_score_range
|
||||
from arcaea_offline.database import Database
|
||||
from arcaea_offline.models import Chart, Score
|
||||
from arcaea_offline_ocr.b30.shared import B30OcrResultItem
|
||||
from arcaea_offline_ocr.device.common import DeviceOcrResult
|
||||
from PIL import Image
|
||||
from PIL.ImageQt import ImageQt
|
||||
@ -140,7 +139,11 @@ class OcrQueueModel(QAbstractListModel):
|
||||
return True
|
||||
else:
|
||||
logger.warning(
|
||||
f"{repr(self)} setData at row {index.row()} with role {role} and value {value} rejected."
|
||||
"%r setData at row %d with role %d and value %s rejected!",
|
||||
self,
|
||||
index.row(),
|
||||
role,
|
||||
value,
|
||||
)
|
||||
return False
|
||||
|
||||
@ -150,7 +153,7 @@ class OcrQueueModel(QAbstractListModel):
|
||||
|
||||
@iccOption.setter
|
||||
def iccOption(self, opt: IccOption):
|
||||
logger.debug(f"ICC option changed to {opt}")
|
||||
logger.debug("ICC option changed to %s", opt)
|
||||
self.__iccOption = opt
|
||||
|
||||
@overload
|
||||
@ -159,8 +162,7 @@ class OcrQueueModel(QAbstractListModel):
|
||||
image: str,
|
||||
runnable: OcrRunnable = None,
|
||||
process_func: Callable[[Optional[str], QImage, Any], Score] = None,
|
||||
):
|
||||
...
|
||||
): ...
|
||||
|
||||
@overload
|
||||
def addItem(
|
||||
@ -168,8 +170,7 @@ class OcrQueueModel(QAbstractListModel):
|
||||
image: QImage,
|
||||
runnable: OcrRunnable = None,
|
||||
process_func: Callable[[Optional[str], QImage, Any], Score] = None,
|
||||
):
|
||||
...
|
||||
): ...
|
||||
|
||||
def addItem(
|
||||
self,
|
||||
@ -179,7 +180,7 @@ class OcrQueueModel(QAbstractListModel):
|
||||
):
|
||||
if isinstance(image, str):
|
||||
if image in self.imagePaths or not QFileInfo(image).exists():
|
||||
logger.warning(f"Attempting to add an invalid file {image}")
|
||||
logger.warning("Attempting to add an invalid file %s", image)
|
||||
return
|
||||
imagePath = image
|
||||
if self.iccOption == IccOption.TryFix:
|
||||
@ -223,7 +224,7 @@ class OcrQueueModel(QAbstractListModel):
|
||||
index = self.index(row, 0)
|
||||
imagePath: str = index.data(self.ImagePathRole)
|
||||
qImage: QImage = index.data(self.ImageQImageRole)
|
||||
logger.debug(f"update request: {result}@row{row}")
|
||||
logger.debug("update request: %r@row%d", result, row)
|
||||
processOcrResultFunc = index.data(self.ProcessOcrResultFuncRole)
|
||||
|
||||
chart, scoreInsert = processOcrResultFunc(imagePath, qImage, result)
|
||||
@ -294,8 +295,8 @@ class OcrQueueModel(QAbstractListModel):
|
||||
self.__items.pop(row)
|
||||
self.endRemoveRows()
|
||||
return
|
||||
except Exception as e:
|
||||
logger.exception(f"Error accepting {repr(item)}")
|
||||
except Exception:
|
||||
logger.exception("Error accepting %r", item)
|
||||
return
|
||||
|
||||
def acceptItems(self, __rows: list[int], ignoreValidate: bool = False):
|
||||
@ -344,17 +345,11 @@ class OcrQueueTableProxyModel(QAbstractTableModel):
|
||||
|
||||
def retranslateHeaders(self):
|
||||
self.__horizontalHeaders = [
|
||||
# fmt: off
|
||||
QCoreApplication.translate(
|
||||
"OcrTableModel", "horizontalHeader.title.select"
|
||||
),
|
||||
QCoreApplication.translate(
|
||||
"OcrTableModel", "horizontalHeader.title.imagePreview"
|
||||
),
|
||||
QCoreApplication.translate("OcrTableModel", "horizontalHeader.title.select"),
|
||||
QCoreApplication.translate("OcrTableModel", "horizontalHeader.title.imagePreview"),
|
||||
QCoreApplication.translate("OcrTableModel", "horizontalHeader.title.chart"),
|
||||
QCoreApplication.translate("OcrTableModel", "horizontalHeader.title.score"),
|
||||
# fmt: on
|
||||
]
|
||||
] # fmt: skip
|
||||
|
||||
def sourceModel(self) -> OcrQueueModel:
|
||||
return self.__sourceModel
|
||||
|
@ -1,16 +0,0 @@
|
||||
from PySide6.QtGui import QColor
|
||||
|
||||
|
||||
def mix_color(source_color: QColor, mix_color: QColor, mix_ratio: float = 0.5):
|
||||
r = round((mix_color.red() - source_color.red()) * mix_ratio + source_color.red())
|
||||
g = round(
|
||||
(mix_color.green() - source_color.green()) * mix_ratio + source_color.green()
|
||||
)
|
||||
b = round(
|
||||
(mix_color.blue() - source_color.blue()) * mix_ratio + source_color.blue()
|
||||
)
|
||||
a = round(
|
||||
(mix_color.alpha() - source_color.alpha()) * mix_ratio + source_color.alpha()
|
||||
)
|
||||
|
||||
return QColor(r, g, b, a)
|
@ -16,13 +16,11 @@ class DbB30TableModel(DbTableModel):
|
||||
|
||||
def retranslateHeaders(self):
|
||||
self._horizontalHeaders = [
|
||||
# fmt: off
|
||||
QCoreApplication.translate("DbB30TableModel", "horizontalHeader.id"),
|
||||
QCoreApplication.translate("DbB30TableModel", "horizontalHeader.chart"),
|
||||
QCoreApplication.translate("DbB30TableModel", "horizontalHeader.score"),
|
||||
QCoreApplication.translate("DbB30TableModel", "horizontalHeader.potential"),
|
||||
# fmt: on
|
||||
]
|
||||
] # fmt: skip
|
||||
|
||||
def syncDb(self):
|
||||
self.beginResetModel()
|
||||
|
@ -24,13 +24,11 @@ class DbScoreTableModel(DbTableModel):
|
||||
|
||||
def retranslateHeaders(self):
|
||||
self._horizontalHeaders = [
|
||||
# fmt: off
|
||||
QCoreApplication.translate("DbScoreTableModel", "horizontalHeader.id"),
|
||||
QCoreApplication.translate("DbScoreTableModel", "horizontalHeader.chart"),
|
||||
QCoreApplication.translate("DbScoreTableModel", "horizontalHeader.score"),
|
||||
QCoreApplication.translate("DbScoreTableModel", "horizontalHeader.potential"),
|
||||
# fmt: on
|
||||
]
|
||||
] # fmt: skip
|
||||
|
||||
def syncDb(self):
|
||||
self.beginResetModel()
|
||||
@ -154,7 +152,7 @@ class DbScoreTableModel(DbTableModel):
|
||||
self.syncDb()
|
||||
return True
|
||||
except Exception:
|
||||
logger.exception(f"Table[Score]: Cannot remove row {row}")
|
||||
logger.exception("Table[Score]: Cannot remove row %s", row)
|
||||
return False
|
||||
|
||||
def removeRow(self, row: int, parent=...):
|
||||
|
@ -6,10 +6,10 @@ from arcaea_offline_ocr.b30.chieri.v4.ocr import ChieriBotV4Ocr
|
||||
from arcaea_offline_ocr.b30.shared import B30OcrResultItem
|
||||
from PySide6.QtGui import QImage
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from ui.extends.components.ocrQueue import OcrRunnable
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ChieriV4OcrRunnable(OcrRunnable):
|
||||
def __init__(self, ocr: ChieriBotV4Ocr, component):
|
||||
|
@ -41,7 +41,7 @@ class AndrealExecuteRunnable(QRunnable):
|
||||
self.signals.completed.emit(self.jsonPath, imageBytes)
|
||||
except Exception as e:
|
||||
imageBytes = None
|
||||
logger.exception(f"{self.__class__.__name__} error")
|
||||
logger.exception("%s error", self.__class__.__name__)
|
||||
self.signals.error.emit(self.jsonPath, str(e))
|
||||
finally:
|
||||
os.unlink(self.jsonPath)
|
||||
@ -84,7 +84,10 @@ class AndrealHelper(QObject):
|
||||
|
||||
def request(self, jsonPath: str, arguments: list[str]):
|
||||
logger.debug(
|
||||
f"{self.__class__.__name__} received request {jsonPath=} {arguments=}"
|
||||
"%s received request jsonPath=%r arguments=%r",
|
||||
self.__class__.__name__,
|
||||
jsonPath,
|
||||
arguments,
|
||||
)
|
||||
runnable = AndrealExecuteRunnable(self.andrealExecutable, jsonPath, arguments)
|
||||
runnable.signals.error.connect(self.error)
|
||||
|
@ -2,7 +2,7 @@ from PySide6.QtCore import Slot
|
||||
from PySide6.QtGui import QColor
|
||||
from PySide6.QtWidgets import QGraphicsColorizeEffect, QRadioButton
|
||||
|
||||
from ui.extends.shared.color import mix_color
|
||||
from core.color import mixColor
|
||||
|
||||
STYLESHEET = """
|
||||
QRadioButton {{
|
||||
@ -40,7 +40,7 @@ class RatingClassRadioButton(QRadioButton):
|
||||
def setColors(self, dark_color: QColor, text_color: QColor):
|
||||
self._dark_color = dark_color
|
||||
self._text_color = text_color
|
||||
self._mid_color = mix_color(dark_color, text_color, 0.616)
|
||||
self._mid_color = mixColor(dark_color, text_color, 0.616)
|
||||
self.updateEffects()
|
||||
|
||||
def isColorsSet(self) -> bool:
|
||||
|
@ -126,7 +126,7 @@ class RatingClassSelector(QWidget):
|
||||
elif ratingClass in range(len(self.buttons)):
|
||||
button = self.buttons[ratingClass]
|
||||
else:
|
||||
logger.debug(f"Cannot select {ratingClass=}, condition check failed")
|
||||
logger.debug("Cannot select ratingClass=%s, condition check failed", ratingClass)
|
||||
return
|
||||
|
||||
if not button.isEnabled():
|
||||
|
@ -61,30 +61,22 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
||||
|
||||
VALIDATION_ITEMS_TEXT = [
|
||||
[
|
||||
# fmt: off
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.chartIncomplete.title"),
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.chartIncomplete.text"),
|
||||
# fmt: on
|
||||
],
|
||||
[
|
||||
# fmt: off
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreMismatch.title"),
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreMismatch.text"),
|
||||
# fmt: on
|
||||
],
|
||||
[
|
||||
# fmt: off
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.emptyScore.title"),
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.emptyScore.text"),
|
||||
# fmt: on
|
||||
],
|
||||
[
|
||||
# fmt: off
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreIncompleteForValidate.title"),
|
||||
lambda: QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreIncompleteForValidate.text"),
|
||||
# fmt: on,
|
||||
],
|
||||
]
|
||||
] # fmt: skip
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
@ -208,20 +200,16 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
||||
if validate & ScoreValidateResult.ChartNotSet:
|
||||
self.__triggerMessageBox(
|
||||
"critical",
|
||||
# fmt: off
|
||||
QCoreApplication.translate("ScoreEditor", "confirmDialog.chartNotSet.title"),
|
||||
QCoreApplication.translate("ScoreEditor", "confirmDialog.chartNotSet.text"),
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
return False
|
||||
if validate & ScoreValidateResult.ScoreIncomplete:
|
||||
self.__triggerMessageBox(
|
||||
"critical",
|
||||
# fmt: off
|
||||
QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreIncomplete.title"),
|
||||
QCoreApplication.translate("ScoreEditor", "confirmDialog.scoreIncomplete.text"),
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
return False
|
||||
|
||||
# since validate may have multiple results
|
||||
@ -347,10 +335,8 @@ class ScoreEditor(Ui_ScoreEditor, QWidget):
|
||||
)
|
||||
if validate & ScoreValidateResult.ScoreIncompleteForValidate:
|
||||
texts.append(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("ScoreEditor", "validate.scoreIncompleteForValidate")
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
|
||||
if not texts:
|
||||
texts.append(
|
||||
|
@ -192,7 +192,7 @@ class SongIdSelector(Ui_SongIdSelector, QWidget):
|
||||
self.fillSongIdComboBox()
|
||||
return True
|
||||
else:
|
||||
logger.warning(f'Attempting to select an unknown pack "{packId}"')
|
||||
logger.warning("Attempting to select an unknown pack [%s]", packId)
|
||||
return False
|
||||
|
||||
def selectSongId(self, songId: str) -> bool:
|
||||
@ -202,7 +202,8 @@ class SongIdSelector(Ui_SongIdSelector, QWidget):
|
||||
return True
|
||||
else:
|
||||
logger.warning(
|
||||
f'Attempting to select an unknown song "{songId}", maybe try selecting a pack first?'
|
||||
"Attempting to select an unknown song [%s], maybe try selecting a pack first?",
|
||||
songId,
|
||||
)
|
||||
return False
|
||||
|
||||
|
@ -163,19 +163,15 @@ class TabDb_ChartInfoEditor(Ui_TabDb_ChartInfoEditor, QWidget):
|
||||
QMessageBox.critical(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_ChartInfoEditor", "commit.chartNotSelected"),
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
return
|
||||
if not self.constantLineEdit.hasAcceptableInput():
|
||||
QMessageBox.critical(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_ChartInfoEditor", "commit.constantRequired"),
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
return
|
||||
|
||||
constant = int(self.constantLineEdit.text())
|
||||
@ -202,10 +198,8 @@ class TabDb_ChartInfoEditor(Ui_TabDb_ChartInfoEditor, QWidget):
|
||||
QMessageBox.critical(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_ChartInfoEditor", "commit.chartNotSelected"),
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
return
|
||||
|
||||
chartInfo = self.db.get_chart_info(chart.song_id, chart.rating_class)
|
||||
@ -213,12 +207,10 @@ class TabDb_ChartInfoEditor(Ui_TabDb_ChartInfoEditor, QWidget):
|
||||
result = QMessageBox.warning(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_ChartInfoEditor", "deleteConfirm"),
|
||||
# fmt: on
|
||||
QMessageBox.StandardButton.Yes,
|
||||
QMessageBox.StandardButton.No,
|
||||
)
|
||||
) # fmt: skip
|
||||
if result == QMessageBox.StandardButton.Yes:
|
||||
with self.db.sessionmaker() as session:
|
||||
session.delete(chartInfo)
|
||||
|
@ -91,7 +91,7 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
session.commit()
|
||||
databaseUpdateSignals.songAddOrDelete.emit()
|
||||
itemNum = len([item for item in parser.parse() if isinstance(item, instance)])
|
||||
logger.info(f"updated {itemNum} {logName} from {path}")
|
||||
logger.info("updated %d %s from %s", itemNum, logName, path)
|
||||
return itemNum
|
||||
|
||||
def importPacklist(self, packlistPath):
|
||||
@ -161,7 +161,7 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
return
|
||||
|
||||
try:
|
||||
logger.info(f"Importing {apkFile}")
|
||||
logger.info("Importing %s", apkFile)
|
||||
|
||||
with zipfile.ZipFile(apkFile) as zf:
|
||||
packlistPath = zipfile.Path(zf) / "assets" / "songs" / "packlist"
|
||||
@ -193,7 +193,9 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
db = Database()
|
||||
parser = St3ScoreParser(dbFile)
|
||||
logger.info(
|
||||
f"Got {len(parser.parse())} items from {dbFile}, writing into database..."
|
||||
"Got %d items from %s, writing into database...",
|
||||
len(parser.parse()),
|
||||
dbFile,
|
||||
)
|
||||
with db.sessionmaker() as session:
|
||||
parser.write_database(session)
|
||||
@ -218,7 +220,9 @@ class TabDb_Manage(Ui_TabDb_Manage, QWidget):
|
||||
db = Database()
|
||||
parser = ArcaeaOnlineParser(apiResultFile)
|
||||
logger.info(
|
||||
f"Got {len(parser.parse())} items from {apiResultFile}, writing into database..."
|
||||
"Got %d items from %s, writing into database...",
|
||||
len(parser.parse()),
|
||||
apiResultFile,
|
||||
)
|
||||
with db.sessionmaker() as session:
|
||||
parser.write_database(session)
|
||||
|
@ -154,23 +154,17 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
self.treeView.setItemDelegateForColumn(1, self.treeViewProxyDelegate)
|
||||
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.idEarlier"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.ID_EARLIER
|
||||
)
|
||||
) # fmt: skip
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.dateEarlier"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.DATE_EARLIER
|
||||
)
|
||||
) # fmt: skip
|
||||
self.quickSelect_comboBox.addItem(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "quickSelectComboBox.columnsIntegral"),
|
||||
# fmt: on
|
||||
QuickSelectComboBoxValues.COLUMNS_INTEGRAL
|
||||
)
|
||||
) # fmt: skip
|
||||
|
||||
def getQueryColumns(self):
|
||||
columns: list[InstrumentedAttribute] = [Score.song_id, Score.rating_class]
|
||||
@ -291,12 +285,12 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
confirm = QMessageBox.warning(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "deleteSelectionDialog.content {}").format(len(selectedScores)),
|
||||
# fmt: on
|
||||
QCoreApplication.translate(
|
||||
"TabDb_RemoveDuplicateScores", "deleteSelectionDialog.content {}"
|
||||
).format(len(selectedScores)),
|
||||
QMessageBox.StandardButton.Yes,
|
||||
QMessageBox.StandardButton.No,
|
||||
)
|
||||
) # fmt: skip
|
||||
if confirm != QMessageBox.StandardButton.Yes:
|
||||
return
|
||||
|
||||
@ -310,12 +304,11 @@ class TabDb_RemoveDuplicateScores(Ui_TabDb_RemoveDuplicateScores, QWidget):
|
||||
@Slot()
|
||||
def on_scan_scanButton_clicked(self):
|
||||
if len(self.getQueryColumns()) <= 2:
|
||||
message = QCoreApplication.translate("TabDb_RemoveDuplicateScores", "scan_noColumnsDialog.content") # fmt: skip
|
||||
result = QMessageBox.warning(
|
||||
self,
|
||||
None,
|
||||
# fmt: off
|
||||
QCoreApplication.translate("TabDb_RemoveDuplicateScores", "scan_noColumnsDialog.content"),
|
||||
# fmt: on
|
||||
message,
|
||||
QMessageBox.StandardButton.Yes,
|
||||
QMessageBox.StandardButton.No,
|
||||
)
|
||||
|
@ -50,6 +50,4 @@ class TabOverview(Ui_TabOverview, QWidget):
|
||||
|
||||
def retranslateUi(self, *args):
|
||||
super().retranslateUi(self)
|
||||
# fmt: off
|
||||
self.describeFormatString = QCoreApplication.translate("TabOverview", "databaseDescribeLabel {} {} {} {} {} {}")
|
||||
# fmt: on
|
||||
self.describeFormatString = QCoreApplication.translate("TabOverview", "databaseDescribeLabel {} {} {} {} {} {}") # fmt: skip
|
||||
|
@ -131,11 +131,8 @@ class TabTools_Andreal(Ui_TabTools_Andreal, QWidget):
|
||||
|
||||
@Slot()
|
||||
def on_imageTypeWhatIsThisButton_clicked(self):
|
||||
QMessageBox.information(
|
||||
self,
|
||||
None,
|
||||
QCoreApplication.translate("TabTools_Andreal", "imageWhatIsThisDialog.description"),
|
||||
) # fmt: skip
|
||||
message = QCoreApplication.translate("TabTools_Andreal", "imageWhatIsThisDialog.description") # fmt: skip
|
||||
QMessageBox.information(self, None, message)
|
||||
|
||||
def imageFormat(self):
|
||||
buttonId = self.imageFormatButtonGroup.checkedId()
|
||||
|
@ -90,10 +90,8 @@ class PlayRatingCalculatorDialog(QDialog):
|
||||
|
||||
self.acceptButton = QPushButton(self)
|
||||
self.acceptButton.setText(
|
||||
# fmt: off
|
||||
QCoreApplication.translate("StepCalculator", "playRatingCalculatorDialog.acceptButton")
|
||||
# fmt: on
|
||||
)
|
||||
) # fmt: skip
|
||||
self.acceptButton.setEnabled(False)
|
||||
self.verticalLayout.addWidget(self.acceptButton)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user