wip: arcaea-offline==0.2.0

- fix imports
This commit is contained in:
2023-08-28 22:45:50 +08:00
parent a9941e9c87
commit 2e6ca98f7d
17 changed files with 227 additions and 155 deletions

View File

@ -1,7 +1,7 @@
from PySide6.QtCore import QDir, QSettings
from PySide6.QtCore import QDir, QSettings, QUrl
__all__ = [
"DATABASE_PATH",
"DATABASE_URL",
"DEVICES_JSON_FILE",
"DEVICE_UUID",
"TESSERACT_FILE",
@ -10,7 +10,7 @@ __all__ = [
"Settings",
]
DATABASE_PATH = "General/DatabasePath"
DATABASE_URL = "General/DatabaseUrl"
DEVICES_JSON_FILE = "Ocr/DevicesJsonFile"
DEVICE_UUID = "Ocr/DeviceUuid"
@ -27,6 +27,13 @@ class Settings(QSettings):
parent,
)
def databaseUrl(self) -> str | None:
return self.value(DATABASE_URL, None, str)
def setDatabaseUrl(self, value: str):
self.setValue(DATABASE_URL, value)
self.sync()
def devicesJsonFile(self) -> str | None:
return self.value(DEVICES_JSON_FILE, None, str)