mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
update deck properties, rename to deckopts
This commit is contained in:
parent
86c4934e31
commit
42052e6349
8 changed files with 383 additions and 1030 deletions
131
aqt/deckopts.py
Normal file
131
aqt/deckopts.py
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||||
|
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
|
||||||
|
|
||||||
|
from PyQt4.QtGui import *
|
||||||
|
from PyQt4.QtCore import *
|
||||||
|
import sys, re
|
||||||
|
import aqt
|
||||||
|
|
||||||
|
class DeckOptions(QDialog):
|
||||||
|
|
||||||
|
def __init__(self, mw):
|
||||||
|
QDialog.__init__(self, mw, Qt.Window)
|
||||||
|
self.mw = mw
|
||||||
|
self.d = mw.deck
|
||||||
|
self.form = aqt.forms.deckopts.Ui_Dialog()
|
||||||
|
self.form.setupUi(self)
|
||||||
|
self.setup()
|
||||||
|
self.exec_()
|
||||||
|
|
||||||
|
def setup(self):
|
||||||
|
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
||||||
|
self.form.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
|
||||||
|
self.connect(self.form.modelsAdd, SIGNAL("clicked()"), self.onAdd)
|
||||||
|
self.connect(self.form.modelsEdit, SIGNAL("clicked()"), self.onEdit)
|
||||||
|
self.connect(self.form.modelsDelete, SIGNAL("clicked()"), self.onDelete)
|
||||||
|
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
|
||||||
|
self.helpRequested)
|
||||||
|
# syncing
|
||||||
|
self.form.doSync.setChecked(self.d.syncingEnabled())
|
||||||
|
self.form.mediaURL.setText(self.d.conf['mediaURL'])
|
||||||
|
# latex
|
||||||
|
self.form.latexHeader.setText(self.d.conf['latexPre'])
|
||||||
|
self.form.latexFooter.setText(self.d.conf['latexPost'])
|
||||||
|
# models
|
||||||
|
self.updateModelsList()
|
||||||
|
|
||||||
|
def updateModelsList(self):
|
||||||
|
idx = self.form.modelsList.currentRow()
|
||||||
|
self.form.modelsList.clear()
|
||||||
|
self.models = []
|
||||||
|
for model in self.d.models().values():
|
||||||
|
self.models.append((model.name, model))
|
||||||
|
self.models.sort()
|
||||||
|
for (name, model) in self.models:
|
||||||
|
item = QListWidgetItem(name)
|
||||||
|
self.form.modelsList.addItem(item)
|
||||||
|
cm = self.d.currentModel
|
||||||
|
try:
|
||||||
|
if aqt.mw.currentCard:
|
||||||
|
cm = aqt.mw.currentCard.fact.model
|
||||||
|
except:
|
||||||
|
# model has been deleted
|
||||||
|
pass
|
||||||
|
if model == cm:
|
||||||
|
self.form.modelsList.setCurrentItem(item)
|
||||||
|
|
||||||
|
def onAdd(self):
|
||||||
|
m = ui.modelchooser.AddModel(self, self.parent, self.d).getModel()
|
||||||
|
if m:
|
||||||
|
self.d.addModel(m)
|
||||||
|
self.updateModelsList()
|
||||||
|
|
||||||
|
def onEdit(self):
|
||||||
|
model = self.selectedModel()
|
||||||
|
if not model:
|
||||||
|
return
|
||||||
|
# set to current
|
||||||
|
self.d.currentModel = model
|
||||||
|
ui.modelproperties.ModelProperties(self, self.d, model, self.parent,
|
||||||
|
onFinish=self.updateModelsList)
|
||||||
|
|
||||||
|
def onDelete(self):
|
||||||
|
model = self.selectedModel()
|
||||||
|
row = self.form.modelsList.currentRow()
|
||||||
|
if not model:
|
||||||
|
return
|
||||||
|
if len(self.d.models) < 2:
|
||||||
|
ui.utils.showWarning(_("Please add another model first."),
|
||||||
|
parent=self)
|
||||||
|
return
|
||||||
|
if self.d.s.scalar("select 1 from sources where id=:id",
|
||||||
|
id=model.source):
|
||||||
|
ui.utils.showWarning(_("This model is used by deck source:\n"
|
||||||
|
"%s\nYou will need to remove the source "
|
||||||
|
"first.") % hexifyID(model.source))
|
||||||
|
return
|
||||||
|
count = self.d.modelUseCount(model)
|
||||||
|
if count:
|
||||||
|
if not ui.utils.askUser(
|
||||||
|
_("This model is used by %d facts.\n"
|
||||||
|
"Are you sure you want to delete it?\n"
|
||||||
|
"If you delete it, these cards will be lost.")
|
||||||
|
% count, parent=self):
|
||||||
|
return
|
||||||
|
self.d.deleteModel(model)
|
||||||
|
self.updateModelsList()
|
||||||
|
self.form.modelsList.setCurrentRow(row)
|
||||||
|
aqt.mw.reset()
|
||||||
|
|
||||||
|
def selectedModel(self):
|
||||||
|
row = self.form.modelsList.currentRow()
|
||||||
|
if row == -1:
|
||||||
|
return None
|
||||||
|
return self.models[self.form.modelsList.currentRow()][1]
|
||||||
|
|
||||||
|
def helpRequested(self):
|
||||||
|
aqt.openHelp("DeckOptions")
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
needSync = False
|
||||||
|
# syncing
|
||||||
|
if self.form.doSync.isChecked():
|
||||||
|
old = self.d.syncName
|
||||||
|
self.d.enableSyncing()
|
||||||
|
if self.d.syncName != old:
|
||||||
|
needSync = True
|
||||||
|
else:
|
||||||
|
self.d.disableSyncing()
|
||||||
|
url = unicode(self.form.mediaURL.text())
|
||||||
|
if url:
|
||||||
|
if not re.match("^(http|https|ftp)://", url, re.I):
|
||||||
|
url = "http://" + url
|
||||||
|
if not url.endswith("/"):
|
||||||
|
url += "/"
|
||||||
|
self.d.conf['mediaURL'] = url
|
||||||
|
# latex
|
||||||
|
self.d.conf['latexPre'] = unicode(self.form.latexHeader.toPlainText())
|
||||||
|
self.d.conf['latexPost'] = unicode(self.form.latexFooter.toPlainText())
|
||||||
|
QDialog.reject(self)
|
||||||
|
if needSync:
|
||||||
|
aqt.mw.syncDeck(interactive=-1)
|
|
@ -1,240 +0,0 @@
|
||||||
# Copyright: Damien Elmes <anki@ichi2.net>
|
|
||||||
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
|
|
||||||
|
|
||||||
from PyQt4.QtGui import *
|
|
||||||
from PyQt4.QtCore import *
|
|
||||||
import sys, re, time
|
|
||||||
import aqt.forms
|
|
||||||
import anki
|
|
||||||
from aqt import ui
|
|
||||||
from anki.utils import parseTags
|
|
||||||
from anki.deck import newCardOrderLabels, newCardSchedulingLabels
|
|
||||||
from anki.deck import revCardOrderLabels
|
|
||||||
from anki.utils import hexifyID, dehexifyID
|
|
||||||
import aqt
|
|
||||||
|
|
||||||
class DeckProperties(QDialog):
|
|
||||||
|
|
||||||
def __init__(self, parent, deck, onFinish=None):
|
|
||||||
QDialog.__init__(self, parent, Qt.Window)
|
|
||||||
self.parent = parent
|
|
||||||
self.d = deck
|
|
||||||
self.onFinish = onFinish
|
|
||||||
self.origMod = self.d.modified
|
|
||||||
self.dialog = aqt.forms.deckproperties.Ui_DeckProperties()
|
|
||||||
self.dialog.setupUi(self)
|
|
||||||
self.dialog.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
|
||||||
self.dialog.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
|
|
||||||
self.readData()
|
|
||||||
self.connect(self.dialog.modelsAdd, SIGNAL("clicked()"), self.onAdd)
|
|
||||||
self.connect(self.dialog.modelsEdit, SIGNAL("clicked()"), self.onEdit)
|
|
||||||
self.connect(self.dialog.modelsDelete, SIGNAL("clicked()"), self.onDelete)
|
|
||||||
self.connect(self.dialog.buttonBox, SIGNAL("helpRequested()"), self.helpRequested)
|
|
||||||
self.show()
|
|
||||||
|
|
||||||
def readData(self):
|
|
||||||
# syncing
|
|
||||||
if self.d.syncName:
|
|
||||||
self.dialog.doSync.setCheckState(Qt.Checked)
|
|
||||||
else:
|
|
||||||
self.dialog.doSync.setCheckState(Qt.Unchecked)
|
|
||||||
self.dialog.mediaURL.setText(self.d.getVar("mediaURL") or "")
|
|
||||||
# latex
|
|
||||||
self.dialog.latexHeader.setText(self.d.getVar("latexPre"))
|
|
||||||
self.dialog.latexFooter.setText(self.d.getVar("latexPost"))
|
|
||||||
# scheduling
|
|
||||||
for type in ("hard", "mid", "easy"):
|
|
||||||
v = getattr(self.d, type + "IntervalMin")
|
|
||||||
getattr(self.dialog, type + "Min").setText(str(v))
|
|
||||||
v = getattr(self.d, type + "IntervalMax")
|
|
||||||
getattr(self.dialog, type + "Max").setText(str(v))
|
|
||||||
self.dialog.delay0.setText(unicode(self.d.delay0/60.0))
|
|
||||||
self.dialog.delay1.setText(unicode(self.d.delay1))
|
|
||||||
self.dialog.delay2.setText(unicode(int(self.d.delay2*100)))
|
|
||||||
self.dialog.collapse.setCheckState(self.d.collapseTime
|
|
||||||
and Qt.Checked or Qt.Unchecked)
|
|
||||||
self.dialog.perDay.setCheckState(self.d.getBool("perDay")
|
|
||||||
and Qt.Checked or Qt.Unchecked)
|
|
||||||
# models
|
|
||||||
self.updateModelsList()
|
|
||||||
# hour shift
|
|
||||||
self.dialog.timeOffset.setText(str(
|
|
||||||
(self.d.utcOffset - time.timezone) / 60.0 / 60.0))
|
|
||||||
# leeches
|
|
||||||
self.dialog.suspendLeeches.setChecked(self.d.getBool("suspendLeeches"))
|
|
||||||
self.dialog.leechFails.setValue(self.d.getInt("leechFails"))
|
|
||||||
# spacing
|
|
||||||
self.dialog.newSpacing.setText(unicode(self.d.getFloat("newSpacing")/60.0))
|
|
||||||
self.dialog.revSpacing.setText(unicode(self.d.getFloat("revSpacing")*100))
|
|
||||||
|
|
||||||
def updateModelsList(self):
|
|
||||||
idx = self.dialog.modelsList.currentRow()
|
|
||||||
self.dialog.modelsList.clear()
|
|
||||||
self.models = []
|
|
||||||
for model in self.d.models:
|
|
||||||
name = ngettext("%(name)s [%(facts)d fact]",
|
|
||||||
"%(name)s [%(facts)d facts]", self.d.modelUseCount(model)) % {
|
|
||||||
'name': model.name,
|
|
||||||
'facts': self.d.modelUseCount(model),
|
|
||||||
}
|
|
||||||
self.models.append((name, model))
|
|
||||||
self.models.sort()
|
|
||||||
for (name, model) in self.models:
|
|
||||||
item = QListWidgetItem(name)
|
|
||||||
self.dialog.modelsList.addItem(item)
|
|
||||||
cm = self.d.currentModel
|
|
||||||
try:
|
|
||||||
if aqt.mw.currentCard:
|
|
||||||
cm = aqt.mw.currentCard.fact.model
|
|
||||||
except:
|
|
||||||
# model has been deleted
|
|
||||||
pass
|
|
||||||
if model == cm:
|
|
||||||
self.dialog.modelsList.setCurrentItem(item)
|
|
||||||
|
|
||||||
def onAdd(self):
|
|
||||||
m = ui.modelchooser.AddModel(self, self.parent, self.d).getModel()
|
|
||||||
if m:
|
|
||||||
self.d.addModel(m)
|
|
||||||
self.updateModelsList()
|
|
||||||
|
|
||||||
def onEdit(self):
|
|
||||||
model = self.selectedModel()
|
|
||||||
if not model:
|
|
||||||
return
|
|
||||||
# set to current
|
|
||||||
self.d.currentModel = model
|
|
||||||
ui.modelproperties.ModelProperties(self, self.d, model, self.parent,
|
|
||||||
onFinish=self.updateModelsList)
|
|
||||||
|
|
||||||
def onDelete(self):
|
|
||||||
model = self.selectedModel()
|
|
||||||
row = self.dialog.modelsList.currentRow()
|
|
||||||
if not model:
|
|
||||||
return
|
|
||||||
if len(self.d.models) < 2:
|
|
||||||
ui.utils.showWarning(_("Please add another model first."),
|
|
||||||
parent=self)
|
|
||||||
return
|
|
||||||
if self.d.s.scalar("select 1 from sources where id=:id",
|
|
||||||
id=model.source):
|
|
||||||
ui.utils.showWarning(_("This model is used by deck source:\n"
|
|
||||||
"%s\nYou will need to remove the source "
|
|
||||||
"first.") % hexifyID(model.source))
|
|
||||||
return
|
|
||||||
count = self.d.modelUseCount(model)
|
|
||||||
if count:
|
|
||||||
if not ui.utils.askUser(
|
|
||||||
_("This model is used by %d facts.\n"
|
|
||||||
"Are you sure you want to delete it?\n"
|
|
||||||
"If you delete it, these cards will be lost.")
|
|
||||||
% count, parent=self):
|
|
||||||
return
|
|
||||||
self.d.deleteModel(model)
|
|
||||||
self.updateModelsList()
|
|
||||||
self.dialog.modelsList.setCurrentRow(row)
|
|
||||||
aqt.mw.reset()
|
|
||||||
|
|
||||||
def selectedModel(self):
|
|
||||||
row = self.dialog.modelsList.currentRow()
|
|
||||||
if row == -1:
|
|
||||||
return None
|
|
||||||
return self.models[self.dialog.modelsList.currentRow()][1]
|
|
||||||
|
|
||||||
def updateField(self, obj, field, value):
|
|
||||||
if getattr(obj, field) != value:
|
|
||||||
setattr(obj, field, value)
|
|
||||||
self.d.setModified()
|
|
||||||
|
|
||||||
def helpRequested(self):
|
|
||||||
aqt.openHelp("DeckProperties")
|
|
||||||
|
|
||||||
def reject(self):
|
|
||||||
n = _("Deck Properties")
|
|
||||||
self.mw.startProgress()
|
|
||||||
self.d.setUndoStart(n)
|
|
||||||
needSync = False
|
|
||||||
# syncing
|
|
||||||
if self.dialog.doSync.checkState() == Qt.Checked:
|
|
||||||
old = self.d.syncName
|
|
||||||
oldSync = self.d.lastSync
|
|
||||||
self.d.enableSyncing()
|
|
||||||
if self.d.syncName != old:
|
|
||||||
needSync = True
|
|
||||||
else:
|
|
||||||
# put it back
|
|
||||||
self.d.lastSync = oldSync
|
|
||||||
else:
|
|
||||||
self.d.disableSyncing()
|
|
||||||
url = unicode(self.dialog.mediaURL.text())
|
|
||||||
if url:
|
|
||||||
if not re.match("^(http|https|ftp)://", url, re.I):
|
|
||||||
url = "http://" + url
|
|
||||||
if not url.endswith("/"):
|
|
||||||
url += "/"
|
|
||||||
old = self.d.getVar("mediaURL") or ""
|
|
||||||
if old != url:
|
|
||||||
self.d.setVar("mediaURL", url)
|
|
||||||
# latex
|
|
||||||
self.d.setVar('latexPre', unicode(self.dialog.latexHeader.toPlainText()))
|
|
||||||
self.d.setVar('latexPost', unicode(self.dialog.latexFooter.toPlainText()))
|
|
||||||
# scheduling
|
|
||||||
minmax = ("Min", "Max")
|
|
||||||
for type in ("hard", "mid", "easy"):
|
|
||||||
v = getattr(self.dialog, type + "Min").text()
|
|
||||||
try:
|
|
||||||
v = float(v)
|
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
self.updateField(self.d, type + "IntervalMin", v)
|
|
||||||
v = getattr(self.dialog, type + "Max").text()
|
|
||||||
try:
|
|
||||||
v = float(v)
|
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
self.updateField(self.d, type + "IntervalMax", v)
|
|
||||||
try:
|
|
||||||
v = float(self.dialog.delay0.text()) * 60.0
|
|
||||||
self.updateField(self.d, 'delay0', v)
|
|
||||||
v2 = int(self.dialog.delay1.text())
|
|
||||||
v2 = max(0, v2)
|
|
||||||
self.updateField(self.d, 'delay1', v2)
|
|
||||||
v = float(self.dialog.delay2.text()) / 100.0
|
|
||||||
self.updateField(self.d, 'delay2', max(0, min(100, v)))
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
self.d.setVar("suspendLeeches",
|
|
||||||
not not self.dialog.suspendLeeches.isChecked())
|
|
||||||
self.d.setVar("leechFails",
|
|
||||||
int(self.dialog.leechFails.value()))
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
self.d.setVar("newSpacing", float(self.dialog.newSpacing.text()) * 60)
|
|
||||||
self.d.setVar("revSpacing", float(self.dialog.revSpacing.text()) / 100.0)
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
# hour shift
|
|
||||||
try:
|
|
||||||
offset = float(str(self.dialog.timeOffset.text()))
|
|
||||||
offset = max(min(offset, 24), -24)
|
|
||||||
self.updateField(self.d, 'utcOffset', offset*60*60+time.timezone)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
was = self.d.modified
|
|
||||||
self.updateField(self.d, 'collapseTime',
|
|
||||||
self.dialog.collapse.isChecked() and 1 or 0)
|
|
||||||
if self.dialog.perDay.isChecked() != self.d.getBool("perDay"):
|
|
||||||
self.d.setVar('perDay', self.dialog.perDay.isChecked())
|
|
||||||
# mark deck dirty and close
|
|
||||||
if self.origMod != self.d.modified:
|
|
||||||
aqt.mw.deck.updateCutoff()
|
|
||||||
aqt.mw.reset()
|
|
||||||
self.d.setUndoEnd(n)
|
|
||||||
self.d.finishProgress()
|
|
||||||
if self.onFinish:
|
|
||||||
self.onFinish()
|
|
||||||
QDialog.reject(self)
|
|
||||||
if needSync:
|
|
||||||
aqt.mw.syncDeck(interactive=-1)
|
|
|
@ -662,7 +662,8 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||||
card=self.currentCard)
|
card=self.currentCard)
|
||||||
|
|
||||||
def onDeckProperties(self):
|
def onDeckProperties(self):
|
||||||
self.deckProperties = aqt.deckproperties.DeckProperties(self, self.deck)
|
import aqt.deckopts
|
||||||
|
aqt.deckopts.DeckOptions(self)
|
||||||
|
|
||||||
def onPrefs(self):
|
def onPrefs(self):
|
||||||
import aqt.preferences
|
import aqt.preferences
|
||||||
|
|
|
@ -15,7 +15,6 @@ class Preferences(QDialog):
|
||||||
QDialog.__init__(self, mw, Qt.Window)
|
QDialog.__init__(self, mw, Qt.Window)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.config = mw.config
|
self.config = mw.config
|
||||||
self.origInterfaceLang = self.config['interfaceLang']
|
|
||||||
self.form = aqt.forms.preferences.Ui_Preferences()
|
self.form = aqt.forms.preferences.Ui_Preferences()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self.needDeckClose = False
|
self.needDeckClose = False
|
||||||
|
@ -23,15 +22,15 @@ class Preferences(QDialog):
|
||||||
lambda: aqt.openHelp("Preferences"))
|
lambda: aqt.openHelp("Preferences"))
|
||||||
self.setupLang()
|
self.setupLang()
|
||||||
self.setupNetwork()
|
self.setupNetwork()
|
||||||
self.setupSave()
|
self.setupBackup()
|
||||||
self.setupAdvanced()
|
self.setupOptions()
|
||||||
self.setupMedia()
|
self.setupMedia()
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self.updateNetwork()
|
self.updateNetwork()
|
||||||
self.updateSave()
|
self.updateBackup()
|
||||||
self.updateAdvanced()
|
self.updateOptions()
|
||||||
self.updateMedia()
|
self.updateMedia()
|
||||||
self.config.save()
|
self.config.save()
|
||||||
self.mw.setupLang()
|
self.mw.setupLang()
|
||||||
|
@ -111,7 +110,7 @@ class Preferences(QDialog):
|
||||||
self.config['proxyUser'] = unicode(self.form.proxyUser.text())
|
self.config['proxyUser'] = unicode(self.form.proxyUser.text())
|
||||||
self.config['proxyPass'] = unicode(self.form.proxyPass.text())
|
self.config['proxyPass'] = unicode(self.form.proxyPass.text())
|
||||||
|
|
||||||
def setupSave(self):
|
def setupBackup(self):
|
||||||
self.form.numBackups.setValue(self.config['numBackups'])
|
self.form.numBackups.setValue(self.config['numBackups'])
|
||||||
self.connect(self.form.openBackupFolder,
|
self.connect(self.form.openBackupFolder,
|
||||||
SIGNAL("linkActivated(QString)"),
|
SIGNAL("linkActivated(QString)"),
|
||||||
|
@ -137,10 +136,10 @@ class Preferences(QDialog):
|
||||||
self.config['mediaLocation'] = p
|
self.config['mediaLocation'] = p
|
||||||
self.needDeckClose = True
|
self.needDeckClose = True
|
||||||
|
|
||||||
def updateSave(self):
|
def updateBackup(self):
|
||||||
self.config['numBackups'] = self.form.numBackups.value()
|
self.config['numBackups'] = self.form.numBackups.value()
|
||||||
|
|
||||||
def setupAdvanced(self):
|
def setupOptions(self):
|
||||||
self.form.showEstimates.setChecked(not self.config['suppressEstimates'])
|
self.form.showEstimates.setChecked(not self.config['suppressEstimates'])
|
||||||
self.form.centerQA.setChecked(self.config['centerQA'])
|
self.form.centerQA.setChecked(self.config['centerQA'])
|
||||||
self.form.showProgress.setChecked(self.config['showProgress'])
|
self.form.showProgress.setChecked(self.config['showProgress'])
|
||||||
|
@ -149,7 +148,7 @@ class Preferences(QDialog):
|
||||||
self.form.stripHTML.setChecked(self.config['stripHTML'])
|
self.form.stripHTML.setChecked(self.config['stripHTML'])
|
||||||
self.form.autoplaySounds.setChecked(self.config['autoplaySounds'])
|
self.form.autoplaySounds.setChecked(self.config['autoplaySounds'])
|
||||||
|
|
||||||
def updateAdvanced(self):
|
def updateOptions(self):
|
||||||
self.config['suppressEstimates'] = not self.form.showEstimates.isChecked()
|
self.config['suppressEstimates'] = not self.form.showEstimates.isChecked()
|
||||||
self.config['centerQA'] = self.form.centerQA.isChecked()
|
self.config['centerQA'] = self.form.centerQA.isChecked()
|
||||||
self.config['showProgress'] = self.form.showProgress.isChecked()
|
self.config['showProgress'] = self.form.showProgress.isChecked()
|
||||||
|
|
239
designer/deckopts.ui
Normal file
239
designer/deckopts.ui
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="windowModality">
|
||||||
|
<enum>Qt::ApplicationModal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>353</width>
|
||||||
|
<height>363</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Deck Options</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="qtabwidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Basic</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string><b>Models</b></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="modelsList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="modelsAdd">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Add</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="modelsEdit">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Edit</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="modelsDelete">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Delete</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</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>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="doSync">
|
||||||
|
<property name="text">
|
||||||
|
<string>Synchronize this deck with AnkiWeb</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>label</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><b>Synchronization</b></string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Media URL</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="mediaURL"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>LaTeX</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Header</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="latexHeader">
|
||||||
|
<property name="tabChangesFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Footer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="latexFooter">
|
||||||
|
<property name="tabChangesFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>qtabwidget</tabstop>
|
||||||
|
<tabstop>doSync</tabstop>
|
||||||
|
<tabstop>mediaURL</tabstop>
|
||||||
|
<tabstop>modelsList</tabstop>
|
||||||
|
<tabstop>modelsAdd</tabstop>
|
||||||
|
<tabstop>modelsEdit</tabstop>
|
||||||
|
<tabstop>modelsDelete</tabstop>
|
||||||
|
<tabstop>buttonBox</tabstop>
|
||||||
|
<tabstop>latexHeader</tabstop>
|
||||||
|
<tabstop>latexFooter</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>275</x>
|
||||||
|
<y>442</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>343</x>
|
||||||
|
<y>442</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
|
@ -1,777 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>DeckProperties</class>
|
|
||||||
<widget class="QDialog" name="DeckProperties">
|
|
||||||
<property name="windowModality">
|
|
||||||
<enum>Qt::ApplicationModal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>404</width>
|
|
||||||
<height>540</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Deck Properties</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QTabWidget" name="qtabwidget">
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tab_2">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Basic</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="text">
|
|
||||||
<string><b>Models</b></string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QListWidget" name="modelsList">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="modelsAdd">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Add</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="modelsEdit">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Edit</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="modelsDelete">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Delete</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</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>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="doSync">
|
|
||||||
<property name="text">
|
|
||||||
<string>Synchronize this deck with AnkiWeb</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>label</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><b>Synchronization</b></string>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Media URL</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="mediaURL"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>LaTeX</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>Header</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="latexHeader">
|
|
||||||
<property name="tabChangesFocus">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Footer</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="latexFooter">
|
|
||||||
<property name="tabChangesFocus">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_4">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Advanced</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout">
|
|
||||||
<item row="6" column="2">
|
|
||||||
<widget class="QLineEdit" name="easyMin">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="4">
|
|
||||||
<widget class="QLineEdit" name="midMax">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Initial button 4 interval</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Initial button 3 interval</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="3">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>~</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QLineEdit" name="hardMin">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="QLineEdit" name="midMin">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="3">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>~</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="4">
|
|
||||||
<widget class="QLineEdit" name="easyMax">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="4">
|
|
||||||
<widget class="QLineEdit" name="hardMax">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="3">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>~</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Initial button 2 interval</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_20">
|
|
||||||
<property name="text">
|
|
||||||
<string>Button 1 delay</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="5">
|
|
||||||
<widget class="QLabel" name="label_30">
|
|
||||||
<property name="text">
|
|
||||||
<string>days</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="5">
|
|
||||||
<widget class="QLabel" name="label_31">
|
|
||||||
<property name="text">
|
|
||||||
<string>days</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="5">
|
|
||||||
<widget class="QLabel" name="label_32">
|
|
||||||
<property name="text">
|
|
||||||
<string>days</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_19">
|
|
||||||
<property name="text">
|
|
||||||
<string>Button 1 multiplier</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_22">
|
|
||||||
<property name="text">
|
|
||||||
<string>Mature bonus</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="6">
|
|
||||||
<widget class="Line" name="line_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLineEdit" name="delay0">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>minutes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLineEdit" name="delay2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QLineEdit" name="delay1">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_25">
|
|
||||||
<property name="text">
|
|
||||||
<string>days</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="6">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="6">
|
|
||||||
<widget class="Line" name="line_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0">
|
|
||||||
<widget class="QLabel" name="label_26">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show failed cards early</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="2">
|
|
||||||
<widget class="QCheckBox" name="collapse">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="0">
|
|
||||||
<widget class="QLabel" name="label_23">
|
|
||||||
<property name="text">
|
|
||||||
<string>Per-day scheduling</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="2">
|
|
||||||
<widget class="QCheckBox" name="perDay">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0">
|
|
||||||
<widget class="QLabel" name="label_15">
|
|
||||||
<property name="text">
|
|
||||||
<string>Leech threshold</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="2">
|
|
||||||
<widget class="QSpinBox" name="leechFails">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="label_29">
|
|
||||||
<property name="text">
|
|
||||||
<string>Shift midnight by</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="2">
|
|
||||||
<widget class="QLineEdit" name="timeOffset">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0">
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="text">
|
|
||||||
<string>Sibling delay (new cards)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="2">
|
|
||||||
<widget class="QLineEdit" name="newSpacing">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_27">
|
|
||||||
<property name="text">
|
|
||||||
<string>minutes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="text">
|
|
||||||
<string>Suspend leeches</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="2">
|
|
||||||
<widget class="QCheckBox" name="suspendLeeches">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QLabel" name="label_33">
|
|
||||||
<property name="text">
|
|
||||||
<string>%</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="3" colspan="3">
|
|
||||||
<widget class="QLabel" name="label_34">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>hours</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_35">
|
|
||||||
<property name="text">
|
|
||||||
<string>failures</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0">
|
|
||||||
<widget class="QLabel" name="label_18">
|
|
||||||
<property name="text">
|
|
||||||
<string>Sibling delay (reviews)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="2">
|
|
||||||
<widget class="QLineEdit" name="revSpacing"/>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="3" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_28">
|
|
||||||
<property name="text">
|
|
||||||
<string>%</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</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>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>qtabwidget</tabstop>
|
|
||||||
<tabstop>doSync</tabstop>
|
|
||||||
<tabstop>mediaURL</tabstop>
|
|
||||||
<tabstop>modelsList</tabstop>
|
|
||||||
<tabstop>modelsAdd</tabstop>
|
|
||||||
<tabstop>modelsEdit</tabstop>
|
|
||||||
<tabstop>modelsDelete</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
|
||||||
<tabstop>latexHeader</tabstop>
|
|
||||||
<tabstop>latexFooter</tabstop>
|
|
||||||
<tabstop>delay0</tabstop>
|
|
||||||
<tabstop>delay2</tabstop>
|
|
||||||
<tabstop>delay1</tabstop>
|
|
||||||
<tabstop>hardMin</tabstop>
|
|
||||||
<tabstop>hardMax</tabstop>
|
|
||||||
<tabstop>midMin</tabstop>
|
|
||||||
<tabstop>midMax</tabstop>
|
|
||||||
<tabstop>easyMin</tabstop>
|
|
||||||
<tabstop>easyMax</tabstop>
|
|
||||||
<tabstop>leechFails</tabstop>
|
|
||||||
<tabstop>timeOffset</tabstop>
|
|
||||||
<tabstop>newSpacing</tabstop>
|
|
||||||
<tabstop>revSpacing</tabstop>
|
|
||||||
<tabstop>collapse</tabstop>
|
|
||||||
<tabstop>suspendLeeches</tabstop>
|
|
||||||
<tabstop>perDay</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>DeckProperties</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>275</x>
|
|
||||||
<y>442</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>DeckProperties</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>343</x>
|
|
||||||
<y>442</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
|
@ -38,7 +38,7 @@
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Settings</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QPushButton" name="opts">
|
<widget class="QPushButton" name="opts">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Settings...</string>
|
<string>&Options...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -366,7 +366,7 @@
|
||||||
<normaloff>:/icons/contents.png</normaloff>:/icons/contents.png</iconset>
|
<normaloff>:/icons/contents.png</normaloff>:/icons/contents.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Deck Properties...</string>
|
<string>&Deck Options...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="statusTip">
|
||||||
<string>Customize models, syncing and scheduling</string>
|
<string>Customize models, syncing and scheduling</string>
|
||||||
|
|
Loading…
Reference in a new issue