mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
tag
This commit is contained in:
parent
7a6a39e173
commit
a35e284312
@ -18,6 +18,7 @@ from gui.usefulwidget import (
|
|||||||
getboxlayout,
|
getboxlayout,
|
||||||
getspinbox,
|
getspinbox,
|
||||||
getlineedit,
|
getlineedit,
|
||||||
|
listediterline,
|
||||||
getsimpleswitch,
|
getsimpleswitch,
|
||||||
getsimplekeyseq,
|
getsimplekeyseq,
|
||||||
getcolorbutton,
|
getcolorbutton,
|
||||||
@ -549,8 +550,16 @@ class AnkiWindow(QWidget):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.tagsedit = QLineEdit()
|
layout.addLayout(
|
||||||
layout.addLayout(getboxlayout([QLabel(_TR("Tags(split by |)")), self.tagsedit]))
|
getboxlayout(
|
||||||
|
[
|
||||||
|
QLabel(_TR("标签")),
|
||||||
|
listediterline(
|
||||||
|
_TR("标签"), _TR("标签"), globalconfig["ankiconnect"]["tags"]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
btn = QPushButton(_TR("添加"))
|
btn = QPushButton(_TR("添加"))
|
||||||
btn.clicked.connect(self.errorwrap)
|
btn.clicked.connect(self.errorwrap)
|
||||||
@ -633,10 +642,7 @@ class AnkiWindow(QWidget):
|
|||||||
ModelName = globalconfig["ankiconnect"]["ModelName5"]
|
ModelName = globalconfig["ankiconnect"]["ModelName5"]
|
||||||
DeckName = globalconfig["ankiconnect"]["DeckName"]
|
DeckName = globalconfig["ankiconnect"]["DeckName"]
|
||||||
model_htmlfront, model_htmlback, model_css = self.tryloadankitemplates()
|
model_htmlfront, model_htmlback, model_css = self.tryloadankitemplates()
|
||||||
try:
|
tags = globalconfig["ankiconnect"]["tags"]
|
||||||
tags = self.tagsedit.text().split("|")
|
|
||||||
except:
|
|
||||||
tags = []
|
|
||||||
anki.Deck.create(DeckName)
|
anki.Deck.create(DeckName)
|
||||||
try:
|
try:
|
||||||
model = anki.Model.create(
|
model = anki.Model.create(
|
||||||
|
@ -206,7 +206,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autocrop": false,
|
"autocrop": false,
|
||||||
"boldword": false
|
"boldword": false,
|
||||||
|
"tags": []
|
||||||
},
|
},
|
||||||
"imageformat": -1,
|
"imageformat": -1,
|
||||||
"ankiwindow": [
|
"ankiwindow": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user