mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add custom steps back to v1 sched options
This commit is contained in:
parent
560c21c59d
commit
fc23241f0a
2 changed files with 53 additions and 3 deletions
|
@ -59,6 +59,15 @@ class DeckConf(QDialog):
|
||||||
|
|
||||||
search, limit, order = d['terms'][0]
|
search, limit, order = d['terms'][0]
|
||||||
f.search.setText(search)
|
f.search.setText(search)
|
||||||
|
|
||||||
|
if self.mw.col.schedVer() == 1:
|
||||||
|
if d['delays']:
|
||||||
|
f.steps.setText(self.listToUser(d['delays']))
|
||||||
|
f.stepsOn.setChecked(True)
|
||||||
|
else:
|
||||||
|
f.steps.setVisible(False)
|
||||||
|
f.stepsOn.setVisible(False)
|
||||||
|
|
||||||
f.order.setCurrentIndex(order)
|
f.order.setCurrentIndex(order)
|
||||||
f.limit.setValue(limit)
|
f.limit.setValue(limit)
|
||||||
f.previewDelay.setValue(d.get("previewDelay", 10))
|
f.previewDelay.setValue(d.get("previewDelay", 10))
|
||||||
|
@ -82,6 +91,13 @@ class DeckConf(QDialog):
|
||||||
d['resched'] = f.resched.isChecked()
|
d['resched'] = f.resched.isChecked()
|
||||||
d['delays'] = None
|
d['delays'] = None
|
||||||
|
|
||||||
|
if self.mw.col.schedVer() == 1 and f.stepsOn.isChecked():
|
||||||
|
steps = self.userToList(f.steps)
|
||||||
|
if steps:
|
||||||
|
d['delays'] = steps
|
||||||
|
else:
|
||||||
|
d['delays'] = None
|
||||||
|
|
||||||
terms = [[
|
terms = [[
|
||||||
f.search.text(),
|
f.search.text(),
|
||||||
f.limit.value(),
|
f.limit.value(),
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>382</width>
|
<width>392</width>
|
||||||
<height>413</height>
|
<height>472</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -164,6 +164,23 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLineEdit" name="steps">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1 10</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="stepsOn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Custom steps (in minutes)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -202,7 +219,8 @@
|
||||||
<tabstop>resched</tabstop>
|
<tabstop>resched</tabstop>
|
||||||
<tabstop>previewDelay</tabstop>
|
<tabstop>previewDelay</tabstop>
|
||||||
<tabstop>secondFilter</tabstop>
|
<tabstop>secondFilter</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>stepsOn</tabstop>
|
||||||
|
<tabstop>steps</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -254,5 +272,21 @@
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>stepsOn</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>steps</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>194</x>
|
||||||
|
<y>351</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>190</x>
|
||||||
|
<y>378</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue