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