mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
move to stacked widgets, fix scrollbar display
This commit is contained in:
parent
e617fe7df7
commit
e0e6979101
6 changed files with 348 additions and 201 deletions
|
@ -334,7 +334,7 @@ class EditDeck(QMainWindow):
|
|||
self.updateSearch()
|
||||
|
||||
def updateFilterLabel(self):
|
||||
self.setWindowTitle(_("Anki - Edit Items (%(cur)d "
|
||||
self.setWindowTitle(_("Editor (%(cur)d "
|
||||
"of %(tot)d cards shown)") %
|
||||
{"cur": len(self.model.cards),
|
||||
"tot": self.deck.cardCount})
|
||||
|
|
|
@ -19,11 +19,10 @@ class FactEditor(object):
|
|||
Extra widgets can be added to 'fieldsGrid' to represent card-specific
|
||||
information, etc."""
|
||||
|
||||
def __init__(self, parent, widget, deck=None, colour=""):
|
||||
def __init__(self, parent, widget, deck=None):
|
||||
self.widget = widget
|
||||
self.parent = parent
|
||||
self.deck = deck
|
||||
self.colour = colour
|
||||
self.fact = None
|
||||
self.fontChanged = False
|
||||
self.setupFields()
|
||||
|
@ -74,9 +73,6 @@ class FactEditor(object):
|
|||
# button styles for mac
|
||||
self.plastiqueStyle = QStyleFactory.create("plastique")
|
||||
self.widget.setStyle(self.plastiqueStyle)
|
||||
self.widget.setStyleSheet("""
|
||||
%s
|
||||
#fieldsArea { border: 0px; margin-top: 4px; }""" % self.colour)
|
||||
# bold
|
||||
self.bold = QPushButton()
|
||||
self.bold.setCheckable(True)
|
||||
|
@ -209,9 +205,7 @@ class FactEditor(object):
|
|||
|
||||
def _makeGrid(self):
|
||||
"Rebuild the grid to avoid trigging QT bugs."
|
||||
self.fieldsFrame = QFrame()
|
||||
self.fieldsFrame.setFrameStyle(0)
|
||||
self.fieldsFrame.setLineWidth(0)
|
||||
self.fieldsFrame = QWidget()
|
||||
self.fieldsGrid = QGridLayout(self.fieldsFrame)
|
||||
self.fieldsFrame.setLayout(self.fieldsGrid)
|
||||
self.fieldsGrid.setMargin(0)
|
||||
|
|
|
@ -77,14 +77,12 @@ class AnkiQt(QMainWindow):
|
|||
self.mainWin.mainText = ui.view.AnkiWebView(self.mainWin.mainTextFrame)
|
||||
self.mainWin.mainText.setObjectName("mainText")
|
||||
self.mainWin.mainText.setFocusPolicy(Qt.ClickFocus)
|
||||
self.mainWin.vboxlayout.addWidget(self.mainWin.mainText)
|
||||
self.mainWin.buttonWidget = QWidget(self.mainWin.mainTextFrame)
|
||||
self.mainWin.buttonWidget.setObjectName("buttonWidget")
|
||||
self.mainWin.vboxlayout.addWidget(self.mainWin.buttonWidget)
|
||||
self.mainWin.mainStack.addWidget(self.mainWin.mainText)
|
||||
self.help = ui.help.HelpArea(self.mainWin.helpFrame, self.config, self)
|
||||
self.mainWin.mainText.pageAction(QWebPage.Reload).setVisible(False)
|
||||
self.mainWin.welcomeText.hide()
|
||||
self.mainWin.mainText.hide()
|
||||
self.mainWin.mainStack.setCurrentIndex(2)
|
||||
self.mainWin.buttonStack.show()
|
||||
self.mainWin.buttonStack.setCurrentIndex(1)
|
||||
|
||||
def setupViews(self):
|
||||
self.bodyView = ui.view.View(self, self.mainWin.mainText,
|
||||
|
@ -184,19 +182,14 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
self.state = state
|
||||
self.updateTitleBar()
|
||||
if 'state' != 'noDeck' and state != 'editCurrentFact':
|
||||
self.mainWin.welcomeText.hide()
|
||||
self.mainWin.mainText.show()
|
||||
self.mainWin.buttonWidget.show()
|
||||
self.mainWin.fieldsArea.hide()
|
||||
self.showReviewScreen()
|
||||
if state == "noDeck":
|
||||
self.mainWin.welcomeText.show()
|
||||
self.mainWin.mainText.hide()
|
||||
self.showWelcomeScreen()
|
||||
self.help.hide()
|
||||
self.currentCard = None
|
||||
self.lastCard = None
|
||||
self.disableDeckMenuItems()
|
||||
self.updateRecentFilesMenu()
|
||||
self.resetButtons()
|
||||
# hide all deck-associated dialogs
|
||||
ui.dialogs.closeAll()
|
||||
elif state == "getQuestion":
|
||||
|
@ -217,14 +210,12 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
else:
|
||||
return self.moveToState("deckFinished")
|
||||
elif state == "deckEmpty":
|
||||
self.mainWin.welcomeText.show()
|
||||
self.mainWin.mainText.hide()
|
||||
self.resetButtons()
|
||||
self.showWelcomeScreen()
|
||||
self.disableCardMenuItems()
|
||||
self.mainWin.menu_Lookup.setEnabled(False)
|
||||
elif state == "deckFinished":
|
||||
self.deck.s.flush()
|
||||
self.resetButtons()
|
||||
self.hideButtons()
|
||||
self.mainWin.menu_Lookup.setEnabled(False)
|
||||
self.disableCardMenuItems()
|
||||
self.startRefreshTimer()
|
||||
|
@ -232,22 +223,16 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
elif state == "showQuestion":
|
||||
if self.deck.mediaDir():
|
||||
os.chdir(self.deck.mediaDir())
|
||||
self.resetButtons()
|
||||
self.showAnswerButton()
|
||||
self.updateMarkAction()
|
||||
self.runHook('showQuestion')
|
||||
elif state == "showAnswer":
|
||||
self.resetButtons()
|
||||
self.showEaseButtons()
|
||||
self.enableCardMenuItems()
|
||||
elif state == "editCurrentFact":
|
||||
if self.lastState == "editCurrentFact":
|
||||
return self.moveToState("saveEdit")
|
||||
self.resetButtons()
|
||||
self.showSaveEditorButton()
|
||||
self.mainWin.mainText.hide()
|
||||
self.mainWin.fieldsArea.show()
|
||||
self.editor.setFact(self.currentCard.fact)
|
||||
self.showEditor()
|
||||
elif state == "saveEdit":
|
||||
self.editor.saveFieldsNow()
|
||||
self.deck.s.flush()
|
||||
|
@ -321,27 +306,23 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
self.refreshTimer.stop()
|
||||
self.refreshTimer = None
|
||||
|
||||
# Main stack
|
||||
##########################################################################
|
||||
|
||||
def showWelcomeScreen(self):
|
||||
self.mainWin.mainStack.setCurrentIndex(0)
|
||||
self.hideButtons()
|
||||
|
||||
def showEditScreen(self):
|
||||
self.mainWin.mainStack.setCurrentIndex(1)
|
||||
|
||||
def showReviewScreen(self):
|
||||
self.mainWin.mainStack.setCurrentIndex(2)
|
||||
|
||||
# Buttons
|
||||
##########################################################################
|
||||
|
||||
def setupButtons(self):
|
||||
self.outerButtonBox = QHBoxLayout(self.mainWin.buttonWidget)
|
||||
self.outerButtonBox.setMargin(3)
|
||||
self.outerButtonBox.setSpacing(0)
|
||||
self.innerButtonWidget = None
|
||||
|
||||
def resetButtons(self):
|
||||
# this round-about process is trying to work around a bug in qt
|
||||
if self.lastState == self.state:
|
||||
return
|
||||
if self.innerButtonWidget:
|
||||
self.outerButtonBox.removeWidget(self.innerButtonWidget)
|
||||
self.innerButtonWidget.deleteLater()
|
||||
self.innerButtonWidget = QWidget()
|
||||
self.outerButtonBox.addWidget(self.innerButtonWidget)
|
||||
self.buttonBox = QVBoxLayout(self.innerButtonWidget)
|
||||
self.buttonBox.setSpacing(3)
|
||||
self.buttonBox.setMargin(3)
|
||||
if self.config['easeButtonHeight'] == "tall":
|
||||
self.easeButtonHeight = 50
|
||||
else:
|
||||
|
@ -349,77 +330,50 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
self.easeButtonHeight = 35
|
||||
else:
|
||||
self.easeButtonHeight = 25
|
||||
# ask
|
||||
self.connect(self.mainWin.showAnswerButton, SIGNAL("clicked()"),
|
||||
lambda: self.moveToState("showAnswer"))
|
||||
# answer
|
||||
for i in range(1, 5):
|
||||
b = getattr(self.mainWin, "easeButton%d" % i)
|
||||
b.setFixedHeight(self.easeButtonHeight)
|
||||
b.setFixedWidth(100)
|
||||
self.connect(b, SIGNAL("clicked()"),
|
||||
lambda i=i: self.cardAnswered(i))
|
||||
# editor
|
||||
self.connect(self.mainWin.saveEditorButton, SIGNAL("clicked()"),
|
||||
lambda: self.moveToState("saveEdit"))
|
||||
|
||||
def hideButtons(self):
|
||||
self.mainWin.buttonStack.hide()
|
||||
|
||||
def showAnswerButton(self):
|
||||
if self.lastState == self.state:
|
||||
return
|
||||
button = QPushButton(_("Show answer"))
|
||||
button.setFixedHeight(self.easeButtonHeight)
|
||||
self.buttonBox.addWidget(button)
|
||||
button.setFocus()
|
||||
button.setDefault(True)
|
||||
self.connect(button, SIGNAL("clicked()"),
|
||||
lambda: self.moveToState("showAnswer"))
|
||||
|
||||
def getSpacer(self, hpolicy=QSizePolicy.Preferred):
|
||||
return QSpacerItem(20, 20,
|
||||
hpolicy,
|
||||
QSizePolicy.Preferred)
|
||||
self.mainWin.buttonStack.setCurrentIndex(0)
|
||||
self.mainWin.buttonStack.show()
|
||||
self.mainWin.showAnswerButton.setFocus()
|
||||
|
||||
def showEaseButtons(self):
|
||||
# if the state hasn't changed, do nothing
|
||||
if self.lastState == self.state:
|
||||
return
|
||||
# gather next intervals
|
||||
nextInts = {}
|
||||
for i in range(5):
|
||||
s=self.deck.nextIntervalStr(self.currentCard, i)
|
||||
nextInts["ease%d" % i] = s
|
||||
# button grid
|
||||
grid = QGridLayout()
|
||||
grid.setSpacing(3)
|
||||
button3 = self.showCompactEaseButtons(grid, nextInts)
|
||||
hbox = QHBoxLayout()
|
||||
hbox.addStretch()
|
||||
hbox.addLayout(grid)
|
||||
hbox.addStretch()
|
||||
self.buttonBox.addLayout(hbox)
|
||||
button3.setFocus()
|
||||
self.updateEaseButtons()
|
||||
self.mainWin.buttonStack.setCurrentIndex(1)
|
||||
self.mainWin.buttonStack.show()
|
||||
self.mainWin.easeButton3.setFocus()
|
||||
|
||||
def showCompactEaseButtons(self, grid, nextInts):
|
||||
text = (
|
||||
(_("Again"),
|
||||
_("<b>%(ease1)s</b>"),
|
||||
_("<b>Relearn (1)</b><br>Mark harder and learn again.")),
|
||||
(_("Hard"),
|
||||
_("<b>%(ease2)s</b>"),
|
||||
_("<b>Hard (2)</b><br>Wait a little longer next time.")),
|
||||
(_("Good"),
|
||||
_("<b>%(ease3)s</b>"),
|
||||
_("<b>Comfortable (3)</b><br>Wait longer next time.")),
|
||||
(_("Easy"),
|
||||
_("<b>%(ease4)s</b>"),
|
||||
_("<b>Easy (4)</b><br>Wait a lot longer next time.")))
|
||||
button3 = None
|
||||
def showSaveEditorButton(self):
|
||||
self.mainWin.buttonStack.setCurrentIndex(2)
|
||||
self.mainWin.buttonStack.show()
|
||||
|
||||
def updateEaseButtons(self):
|
||||
nextInts = {}
|
||||
for i in range(1, 5):
|
||||
if not self.config['suppressEstimates']:
|
||||
if i == 1:
|
||||
label = QLabel(self.withInterfaceFont(_("Soon")))
|
||||
l = getattr(self.mainWin, "easeLabel%d" % i)
|
||||
if self.config['suppressEstimates']:
|
||||
l.hide()
|
||||
else:
|
||||
label = QLabel(self.withInterfaceFont(text[i-1][1] % nextInts))
|
||||
label.setAlignment(Qt.AlignHCenter)
|
||||
grid.addWidget(label, 0, (i*2)+1)
|
||||
button = QPushButton(text[i-1][0])
|
||||
button.setFixedHeight(self.easeButtonHeight)
|
||||
button.setFixedWidth(100)
|
||||
button.setToolTip(text[i-1][2])
|
||||
self.connect(button, SIGNAL("clicked()"),
|
||||
lambda i=i: self.cardAnswered(i))
|
||||
#button.setFixedWidth(70)
|
||||
if i == 3:
|
||||
button3 = button
|
||||
grid.addWidget(button, 1, (i*2)+1)
|
||||
return button3
|
||||
if i == 1:
|
||||
l.setText(self.withInterfaceFont(_("Soon")))
|
||||
else:
|
||||
l.setText(self.withInterfaceFont("<b>" +
|
||||
self.deck.nextIntervalStr(self.currentCard, i) + "</b>"))
|
||||
|
||||
def withInterfaceFont(self, text):
|
||||
family = self.config["interfaceFontFamily"]
|
||||
|
@ -852,31 +806,21 @@ To upgrade an old deck, download Anki 0.9.8.7."""))
|
|||
##########################################################################
|
||||
|
||||
def setupEditor(self):
|
||||
self.mainWin.fieldsArea.hide()
|
||||
self.mainWin.fieldsArea.setFlat(True)
|
||||
self.editor = ui.facteditor.FactEditor(
|
||||
self, self.mainWin.fieldsArea, self.deck,
|
||||
colour="* { background-color: #fff; }\n")
|
||||
self, self.mainWin.fieldsArea, self.deck)
|
||||
self.editor.onFactValid = self.onFactValid
|
||||
self.editor.onFactInvalid = self.onFactInvalid
|
||||
|
||||
def showSaveEditorButton(self):
|
||||
if self.lastState == self.state:
|
||||
return
|
||||
self.editFactButton = QPushButton(_("Close"))
|
||||
self.editFactButton.setToolTip("Hit Esc to return to review.")
|
||||
self.editFactButton.setFixedHeight(self.easeButtonHeight)
|
||||
self.editFactButton.setShortcut(_("Esc"))
|
||||
self.editFactButton.setDefault(False)
|
||||
self.buttonBox.addWidget(self.editFactButton)
|
||||
self.connect(self.editFactButton, SIGNAL("clicked()"),
|
||||
lambda: self.moveToState("saveEdit"))
|
||||
def showEditor(self):
|
||||
self.showSaveEditorButton()
|
||||
self.mainWin.mainStack.setCurrentIndex(1)
|
||||
self.editor.setFact(self.currentCard.fact)
|
||||
|
||||
def onFactValid(self, fact):
|
||||
self.editFactButton.setEnabled(True)
|
||||
self.mainWin.saveEditorButton.setEnabled(True)
|
||||
|
||||
def onFactInvalid(self, fact):
|
||||
self.editFactButton.setEnabled(False)
|
||||
self.mainWin.saveEditorButton.setEnabled(False)
|
||||
|
||||
# Toolbar
|
||||
##########################################################################
|
||||
|
@ -1209,9 +1153,7 @@ To upgrade an old deck, download Anki 0.9.8.7."""))
|
|||
self.connect(self.syncThread, SIGNAL("closeSyncProgress"), self.closeSyncProgress)
|
||||
self.connect(self.syncThread, SIGNAL("updateSyncProgress"), self.updateSyncProgress)
|
||||
self.syncThread.start()
|
||||
self.mainWin.buttonWidget.hide()
|
||||
self.mainWin.mainText.hide()
|
||||
self.mainWin.welcomeText.show()
|
||||
self.showWelcomeScreen()
|
||||
self.setEnabled(False)
|
||||
while not self.syncThread.isFinished():
|
||||
self.app.processEvents()
|
||||
|
@ -1221,7 +1163,7 @@ To upgrade an old deck, download Anki 0.9.8.7."""))
|
|||
|
||||
def syncFinished(self):
|
||||
"Reopen after sync finished."
|
||||
self.mainWin.buttonWidget.show()
|
||||
self.mainWin.buttonStack.show()
|
||||
if self.loadAfterSync:
|
||||
self.loadDeck(self.deckPath, sync=False)
|
||||
self.deck.syncName = self.syncName
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Anki - Add Items</string>
|
||||
<string>Add Items</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<property name="spacing" >
|
||||
|
@ -21,15 +21,24 @@
|
|||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QWidget" native="1" name="modelArea" />
|
||||
</item>
|
||||
|
@ -47,7 +56,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="fieldsArea" >
|
||||
<widget class="QWidget" native="1" name="fieldsArea" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -57,12 +66,6 @@
|
|||
<property name="autoFillBackground" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="status" >
|
||||
<property name="enabled" >
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<x>0</x>
|
||||
<y>23</y>
|
||||
<width>599</width>
|
||||
<height>559</height>
|
||||
<height>579</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
|
@ -135,19 +135,13 @@
|
|||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="fieldsArea" >
|
||||
<widget class="QWidget" native="1" name="fieldsArea" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
|
||||
<horstretch>7</horstretch>
|
||||
<verstretch>2</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
|
@ -211,16 +205,6 @@
|
|||
<addaction name="menuActions" />
|
||||
<addaction name="menuEdit" />
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>582</y>
|
||||
<width>599</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<action name="actionDelete" >
|
||||
<property name="icon" >
|
||||
<iconset resource="../icons.qrc" >
|
||||
|
|
288
designer/main.ui
288
designer/main.ui
|
@ -5,8 +5,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>454</width>
|
||||
<height>504</height>
|
||||
<width>655</width>
|
||||
<height>487</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
|
@ -27,8 +27,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>69</y>
|
||||
<width>454</width>
|
||||
<height>415</height>
|
||||
<width>655</width>
|
||||
<height>398</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
|
@ -122,35 +122,28 @@
|
|||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="fieldsArea" >
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QStackedWidget" name="mainStack" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
|
||||
<horstretch>7</horstretch>
|
||||
<verstretch>2</verstretch>
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>99</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="autoFillBackground" >
|
||||
<bool>true</bool>
|
||||
<property name="currentIndex" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string/>
|
||||
<widget class="QWidget" name="page" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<height>330</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5" >
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="welcomeText" >
|
||||
<property name="focusPolicy" >
|
||||
|
@ -163,6 +156,237 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<height>336</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" >
|
||||
<item>
|
||||
<widget class="QWidget" native="1" name="fieldsArea" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QStackedWidget" name="buttonStack" >
|
||||
<property name="currentIndex" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page1" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<height>52</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<item>
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="showAnswerButton" >
|
||||
<property name="text" >
|
||||
<string>Show Answer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="easeLabel1" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLabel" name="easeLabel2" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="easeLabel3" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QLabel" name="easeLabel4" >
|
||||
<property name="text" >
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QPushButton" name="easeButton1" >
|
||||
<property name="text" >
|
||||
<string>Again</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="easeButton2" >
|
||||
<property name="text" >
|
||||
<string>Hard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QPushButton" name="easeButton3" >
|
||||
<property name="text" >
|
||||
<string>Good</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="easeButton4" >
|
||||
<property name="text" >
|
||||
<string>Easy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page3" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<height>44</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" >
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saveEditorButton" >
|
||||
<property name="text" >
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Esc</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="helpFrame" >
|
||||
|
@ -352,7 +576,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>454</width>
|
||||
<width>655</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -489,8 +713,8 @@
|
|||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>484</y>
|
||||
<width>454</width>
|
||||
<y>467</y>
|
||||
<width>655</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -503,7 +727,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>23</y>
|
||||
<width>454</width>
|
||||
<width>655</width>
|
||||
<height>46</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue