This commit is contained in:
恍兮惚兮 2024-09-20 17:10:33 +08:00
parent 1edd98e2d0
commit 852d944004
2 changed files with 12 additions and 4 deletions

View File

@ -231,7 +231,7 @@ class AnkiWindow(QWidget):
else:
collect.append(hira["orig"])
example = "".join(collect)
ruby = self.ruby
ruby = self.zhuyinedit.toPlainText()
dictionaryInfo = []
dictionaryContent = {}
for _ in dictionarys:
@ -442,6 +442,7 @@ class AnkiWindow(QWidget):
self.viewimagelabel = pixmapviewer()
self.editpath.textChanged.connect(self.wrappedpixmap)
self.example = FQPlainTextEdit()
self.zhuyinedit = FQPlainTextEdit()
self.example.hiras = None
def __():
@ -511,6 +512,11 @@ class AnkiWindow(QWidget):
),
]
),
getboxlayout(
[LLabel("注音"), self.zhuyinedit],
QVBoxLayout,
margin0=True,
),
getboxlayout(
[LLabel("例句"), self.example],
QVBoxLayout,
@ -619,9 +625,11 @@ class AnkiWindow(QWidget):
def reset(self, text):
self.currentword = text
if text and len(text):
self.ruby = self.makerubyhtml(gobject.baseobject.parsehira(text))
self.zhuyinedit.setPlainText(
self.makerubyhtml(gobject.baseobject.parsehira(text))
)
else:
self.ruby = ""
self.zhuyinedit.clear()
self.editpath.clear()
self.audiopath.clear()
self.audiopath_sentence.clear()

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 38)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)