mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
add help to display properties
This commit is contained in:
parent
03ee833026
commit
1313cca356
2 changed files with 77 additions and 83 deletions
|
@ -31,7 +31,7 @@ class DisplayProperties(QDialog):
|
||||||
self.setupChooser()
|
self.setupChooser()
|
||||||
self.setupCards()
|
self.setupCards()
|
||||||
self.setupFields()
|
self.setupFields()
|
||||||
self.setupPreview()
|
self.setupButtons()
|
||||||
self.show()
|
self.show()
|
||||||
ui.dialogs.open("DisplayProperties", self)
|
ui.dialogs.open("DisplayProperties", self)
|
||||||
|
|
||||||
|
@ -48,9 +48,11 @@ class DisplayProperties(QDialog):
|
||||||
self.drawCards()
|
self.drawCards()
|
||||||
self.drawFields()
|
self.drawFields()
|
||||||
|
|
||||||
def setupPreview(self):
|
def setupButtons(self):
|
||||||
self.connect(self.dialog.preview, SIGNAL("clicked()"),
|
self.connect(self.dialog.preview, SIGNAL("clicked()"),
|
||||||
self.previewClicked)
|
self.previewClicked)
|
||||||
|
self.connect(self.dialog.helpButton, SIGNAL("clicked()"),
|
||||||
|
self.onHelp)
|
||||||
if self.main.config['showFontPreview']:
|
if self.main.config['showFontPreview']:
|
||||||
self.dialog.preview.setChecked(True)
|
self.dialog.preview.setChecked(True)
|
||||||
else:
|
else:
|
||||||
|
@ -286,3 +288,7 @@ class DisplayProperties(QDialog):
|
||||||
def reject(self):
|
def reject(self):
|
||||||
ui.dialogs.close("DisplayProperties")
|
ui.dialogs.close("DisplayProperties")
|
||||||
QDialog.reject(self)
|
QDialog.reject(self)
|
||||||
|
|
||||||
|
def onHelp(self):
|
||||||
|
QDesktopServices.openUrl(QUrl(ankiqt.appWiki +
|
||||||
|
"DisplayProperties"))
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>3</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -24,18 +22,19 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Fonts and colours</string>
|
<string>Fonts & Colours</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon" >
|
<property name="windowIcon" >
|
||||||
<iconset resource="../icons.qrc" >:/icons/fonts.png</iconset>
|
<iconset>
|
||||||
|
<normaloff>:/icons/fonts.png</normaloff>:/icons/fonts.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
|
@ -47,9 +46,7 @@
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QFrame" name="frame" >
|
<widget class="QFrame" name="frame" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
|
||||||
<hsizetype>0</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -73,28 +70,28 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>7</number>
|
<number>7</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -111,9 +108,7 @@
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QLabel" name="label_3" >
|
<widget class="QLabel" name="label_3" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
|
||||||
<hsizetype>0</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -134,12 +129,12 @@
|
||||||
<string>Card properties</string>
|
<string>Card properties</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
|
@ -250,9 +245,7 @@
|
||||||
<item row="7" column="1" >
|
<item row="7" column="1" >
|
||||||
<widget class="QComboBox" name="answerAlign" >
|
<widget class="QComboBox" name="answerAlign" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -270,18 +263,16 @@
|
||||||
<string>Fields</string>
|
<string>Fields</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="fieldList" >
|
<widget class="QListWidget" name="fieldList" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>3</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -312,9 +303,7 @@
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QCheckBox" name="useSize" >
|
<widget class="QCheckBox" name="useSize" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>1</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -343,9 +332,7 @@
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QCheckBox" name="useFamily" >
|
<widget class="QCheckBox" name="useFamily" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>1</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -363,20 +350,18 @@
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1" >
|
||||||
<widget class="QSpinBox" name="fontSize" >
|
<widget class="QSpinBox" name="fontSize" >
|
||||||
<property name="maximum" >
|
|
||||||
<number>300</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" >
|
<property name="minimum" >
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum" >
|
||||||
|
<number>300</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
<widget class="QCheckBox" name="useColour" >
|
<widget class="QCheckBox" name="useColour" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>1</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -424,20 +409,18 @@
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1" >
|
||||||
<widget class="QSpinBox" name="fontSizeEdit" >
|
<widget class="QSpinBox" name="fontSizeEdit" >
|
||||||
<property name="maximum" >
|
|
||||||
<number>300</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" >
|
<property name="minimum" >
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum" >
|
||||||
|
<number>300</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QCheckBox" name="useSizeEdit" >
|
<widget class="QCheckBox" name="useSizeEdit" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -456,9 +439,7 @@
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QFontComboBox" name="fontFamilyEdit" >
|
<widget class="QFontComboBox" name="fontFamilyEdit" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -468,9 +449,7 @@
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QCheckBox" name="useFamilyEdit" >
|
<widget class="QCheckBox" name="useFamilyEdit" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -488,7 +467,16 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="helpButton" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Help</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -509,24 +497,27 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QGroupBox" name="previewGroup" >
|
<widget class="QGroupBox" name="previewGroup" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Preview</string>
|
<string>Preview</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing" >
|
<property name="margin" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="question" >
|
<widget class="QTextEdit" name="question" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>3</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -545,9 +536,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="answer" >
|
<widget class="QTextEdit" name="answer" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>3</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -585,7 +574,6 @@
|
||||||
<tabstop>fontFamilyEdit</tabstop>
|
<tabstop>fontFamilyEdit</tabstop>
|
||||||
<tabstop>useSizeEdit</tabstop>
|
<tabstop>useSizeEdit</tabstop>
|
||||||
<tabstop>fontSizeEdit</tabstop>
|
<tabstop>fontSizeEdit</tabstop>
|
||||||
<tabstop>preview</tabstop>
|
|
||||||
<tabstop>question</tabstop>
|
<tabstop>question</tabstop>
|
||||||
<tabstop>answer</tabstop>
|
<tabstop>answer</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
|
Loading…
Reference in a new issue