Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change from Dialog to MainWindow

  • Loading branch information...
commit 96d222e609581811f94cb96a0f05f80d3c51231e 1 parent 6c7b9c1
@solsticedhiver authored
Showing with 470 additions and 376 deletions.
  1. +179 −176 main.ui
  2. +167 −154 mentalcalculation.py
  3. +124 −46 mentalcalculation_fr.ts
View
355 main.ui
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>544</width>
- <height>373</height>
+ <width>535</width>
+ <height>396</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,214 +17,217 @@
<iconset>
<normaloff>img/calculator.png</normaloff>img/calculator.png</iconset>
</property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QGroupBox" name="gb_number">
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="title">
- <string>#</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0" colspan="4">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>290</width>
- <height>0</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>72</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="gb_number">
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ <weight>50</weight>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="title">
+ <string>#</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0" colspan="4">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>290</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>72</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>+99999</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="l_answer">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>&amp;Your answer</string>
+ </property>
+ <property name="buddy">
+ <cstring>le_answer</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="le_answer">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>61</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ <weight>50</weight>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string>Type here your answer (the total)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <spacer name="horizontalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>181</width>
+ <height>26</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="l_total">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>The total is </string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="pb_start">
+ <property name="toolTip">
+ <string>Start a sequence</string>
</property>
<property name="text">
- <string>+99999</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
+ <string>&amp;Start</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="l_answer">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
+ <item>
+ <widget class="QPushButton" name="pb_replay">
+ <property name="enabled">
+ <bool>false</bool>
</property>
- <property name="text">
- <string>&amp;Your answer</string>
+ <property name="toolTip">
+ <string>Replay the last sequence</string>
</property>
- <property name="buddy">
- <cstring>le_answer</cstring>
+ <property name="text">
+ <string>Replay</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="le_answer">
+ <item>
+ <widget class="QPushButton" name="pb_check">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>61</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="toolTip">
+ <string>Check your answer</string>
+ </property>
+ <property name="text">
+ <string>&amp;Check</string>
</property>
- <property name="maximumSize">
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_10">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>80</width>
- <height>16777215</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
- <property name="font">
- <font>
- <pointsize>9</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pb_settings">
<property name="toolTip">
- <string>Type here your answer (the total)</string>
+ <string>Go to Setttings dialog</string>
+ </property>
+ <property name="text">
+ <string>&amp;Settings</string>
</property>
</widget>
</item>
- <item row="1" column="3">
- <spacer name="horizontalSpacer_6">
+ <item>
+ <spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>181</width>
- <height>26</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
- <item row="1" column="2">
- <widget class="QLabel" name="l_total">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
+ <item>
+ <widget class="QPushButton" name="pb_exit">
+ <property name="toolTip">
+ <string>Exit the program</string>
</property>
<property name="text">
- <string>The total is </string>
+ <string>&amp;Exit</string>
</property>
</widget>
</item>
</layout>
- </widget>
- </item>
- <item row="1" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="pb_start">
- <property name="toolTip">
- <string>Start a sequence</string>
- </property>
- <property name="text">
- <string>&amp;Start</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pb_replay">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Replay the last sequence</string>
- </property>
- <property name="text">
- <string>Replay</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pb_check">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Check your answer</string>
- </property>
- <property name="text">
- <string>&amp;Check</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_9">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pb_settings">
- <property name="toolTip">
- <string>Go to Setttings dialog</string>
- </property>
- <property name="text">
- <string>&amp;Settings</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pb_exit">
- <property name="toolTip">
- <string>Exit the program</string>
- </property>
- <property name="text">
- <string>&amp;Exit</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
View
321 mentalcalculation.py
@@ -55,7 +55,7 @@
except ImportError:
print 'Error: you need phonon support in PyQt4 to run this software'
sys.exit(1)
-import main, settings
+import settings, main
DIGIT = dict([(i,(int('1'+'0'*(i-1)), int('9'*i))) for i in range(1,10)])
@@ -78,59 +78,59 @@
class Settings(QtGui.QDialog):
def __init__(self, mysettings, parent=None):
QtGui.QDialog.__init__(self, parent)
- self.__ui = settings.Ui_Dialog()
- self.__ui.setupUi(self)
+ self.ui = settings.Ui_Dialog()
+ self.ui.setupUi(self)
self.importSettings(mysettings)
- self.__ui.sb_flash.setEnabled(not self.__ui.cb_speech.isChecked())
- self.__ui.cb_onedigit.setEnabled(self.__ui.cb_speech.isChecked())
+ self.ui.sb_flash.setEnabled(not self.ui.cb_speech.isChecked())
+ self.ui.cb_onedigit.setEnabled(self.ui.cb_speech.isChecked())
self.connect(self, QtCore.SIGNAL('accepted()'), self.exportSettings)
- self.connect(self.__ui.cb_speech, QtCore.SIGNAL('clicked()'), self.updateSound)
+ self.connect(self.ui.cb_speech, QtCore.SIGNAL('clicked()'), self.updateSound)
if IS_ESPEAK_INSTALLED:
- self.__ui.cb_speech.setEnabled(True)
- self.__ui.pm_warning.hide()
+ self.ui.cb_speech.setEnabled(True)
+ self.ui.pm_warning.hide()
self.adjustSize()
def importSettings(self, mysettings):
- self.__ui.sb_flash.setValue(mysettings['flash'])
- self.__ui.sb_timeout.setValue(mysettings['timeout'])
- self.__ui.sb_digits.setValue(mysettings['digits'])
- self.__ui.sb_rows.setValue(mysettings['rows'])
- self.__ui.cb_speech.setChecked(mysettings['speech'])
- self.__ui.cb_onedigit.setChecked(mysettings['one_digit'])
- self.__ui.cb_fullscreen.setChecked(mysettings['fullscreen'])
- self.__ui.cb_handsfree.setChecked(mysettings['hands_free'])
+ self.ui.sb_flash.setValue(mysettings['flash'])
+ self.ui.sb_timeout.setValue(mysettings['timeout'])
+ self.ui.sb_digits.setValue(mysettings['digits'])
+ self.ui.sb_rows.setValue(mysettings['rows'])
+ self.ui.cb_speech.setChecked(mysettings['speech'])
+ self.ui.cb_onedigit.setChecked(mysettings['one_digit'])
+ self.ui.cb_fullscreen.setChecked(mysettings['fullscreen'])
+ self.ui.cb_handsfree.setChecked(mysettings['hands_free'])
if not IS_ESPEAK_INSTALLED:
- self.__ui.cb_speech.setChecked(False)
- self.__ui.cb_neg.setChecked(mysettings['neg'])
+ self.ui.cb_speech.setChecked(False)
+ self.ui.cb_neg.setChecked(mysettings['neg'])
self.mysettings = mysettings
def exportSettings(self):
mysettings = {}
- mysettings['flash'] = self.__ui.sb_flash.value()
- mysettings['timeout'] = self.__ui.sb_timeout.value()
- mysettings['digits'] = self.__ui.sb_digits.value()
- mysettings['rows'] = self.__ui.sb_rows.value()
- mysettings['speech'] = self.__ui.cb_speech.isChecked()
- mysettings['fullscreen'] = self.__ui.cb_fullscreen.isChecked()
- mysettings['hands_free'] = self.__ui.cb_handsfree.isChecked()
- mysettings['one_digit'] = self.__ui.cb_onedigit.isChecked()
- mysettings['neg'] = self.__ui.cb_neg.isChecked()
+ mysettings['flash'] = self.ui.sb_flash.value()
+ mysettings['timeout'] = self.ui.sb_timeout.value()
+ mysettings['digits'] = self.ui.sb_digits.value()
+ mysettings['rows'] = self.ui.sb_rows.value()
+ mysettings['speech'] = self.ui.cb_speech.isChecked()
+ mysettings['fullscreen'] = self.ui.cb_fullscreen.isChecked()
+ mysettings['hands_free'] = self.ui.cb_handsfree.isChecked()
+ mysettings['one_digit'] = self.ui.cb_onedigit.isChecked()
+ mysettings['neg'] = self.ui.cb_neg.isChecked()
self.mysettings = mysettings
def updateSound(self):
- sound = self.__ui.sb_flash.isEnabled()
- self.__ui.sb_flash.setEnabled(not sound)
- self.__ui.cb_onedigit.setEnabled(sound)
+ sound = self.ui.sb_flash.isEnabled()
+ self.ui.sb_flash.setEnabled(not sound)
+ self.ui.cb_onedigit.setEnabled(sound)
def exec_(self):
ok = QtGui.QDialog.exec_(self)
return (ok, self.mysettings)
-class Main(QtGui.QDialog):
- def __init__(self, parent=None, flag=0):
- QtGui.QDialog.__init__(self, parent, flag)
- self.__ui = main.Ui_Dialog()
- self.__ui.setupUi(self)
+class Main(QtGui.QMainWindow):
+ def __init__(self, parent=None, flag=QtCore.Qt.Widget):
+ QtGui.QMainWindow.__init__(self, parent, flag)
+ self.ui = main.Ui_MainWindow()
+ self.ui.setupUi(self)
self.score = (0,0)
self.started = False
# default settings
@@ -151,9 +151,10 @@ def __init__(self, parent=None, flag=0):
self.background_color = None
self.annoying_sound = False
self.no_plus_sign = False
+ self.oldPointSize = 72
- self.__isLabelClearable = True
- self.__geometryLabel = None
+ self.isLabelClearable = True
+ self.geometryLabel = None
self.timerUpdateLabel = QtCore.QTimer()
self.timerUpdateLabel.setSingleShot(True)
@@ -170,21 +171,27 @@ def __init__(self, parent=None, flag=0):
else:
self.randint = randint
- self.__ui.label.clear()
- self.__ui.le_answer.setInputMask('000009')
- #self.__ui.pb_start.setFocus(QtCore.Qt.OtherFocusReason)
- self.__ui.pb_start.setDefault(True)
- #self.__ui.pb_exit.setAutoDefault(False)
- self.__ui.l_total.hide()
-
- self.connect(self.__ui.pb_check, QtCore.SIGNAL('clicked()'), self.updateAnswer)
- self.connect(self.__ui.pb_settings, QtCore.SIGNAL('clicked()'), self.changeSettings)
- self.connect(self.__ui.pb_exit, QtCore.SIGNAL('clicked()'), self.close)
- self.connect(self.__ui.pb_start, QtCore.SIGNAL('clicked()'), self.startPlay)
- self.connect(self.__ui.pb_replay, QtCore.SIGNAL('clicked()'), self.redisplaySequence)
+ self.ui.label.clear()
+ self.ui.le_answer.setInputMask('000009')
+ self.ui.l_total.hide()
+
+ self.shortcut_bigger_font = QtGui.QShortcut(QtGui.QKeySequence('CTRL++'), self)
+ self.connect(self.shortcut_bigger_font, QtCore.SIGNAL('activated()'), self.increaseFontSize)
+ self.shortcut_smaller_font = QtGui.QShortcut(QtGui.QKeySequence('CTRL+-'), self)
+ self.connect(self.shortcut_smaller_font, QtCore.SIGNAL('activated()'), self.decreaseFontSize)
+ self.shortcut_F11 = QtGui.QShortcut(QtGui.QKeySequence('F11'), self)
+ self.connect(self.shortcut_F11, QtCore.SIGNAL('activated()'), self.updateFullScreen)
+ self.shortcut_Enter = QtGui.QShortcut(QtGui.QKeySequence('Enter'), self)
+ self.connect(self.shortcut_Enter, QtCore.SIGNAL('activated()'), self.ui.pb_start.click)
+
+ self.connect(self.ui.pb_check, QtCore.SIGNAL('clicked()'), self.updateAnswer)
+ self.connect(self.ui.pb_settings, QtCore.SIGNAL('clicked()'), self.changeSettings)
+ self.connect(self.ui.pb_exit, QtCore.SIGNAL('clicked()'), self.close)
+ self.connect(self.ui.pb_start, QtCore.SIGNAL('clicked()'), self.startPlay)
+ self.connect(self.ui.pb_replay, QtCore.SIGNAL('clicked()'), self.redisplaySequence)
# TODO: add a welcome message; this would be more explicit that this
- self.__ui.label.setPixmap(QtGui.QPixmap(WELCOME))
+ self.ui.label.setPixmap(QtGui.QPixmap(WELCOME))
self.player = Phonon.createPlayer(Phonon.AccessibilityCategory, Phonon.MediaSource(''))
self.connect(self.player, QtCore.SIGNAL('finished()'), self.clearLabel)
@@ -198,9 +205,9 @@ def __init__(self, parent=None, flag=0):
if self.font_color is not None:
stylesheet.append('color: %s' % self.font_color)
if stylesheet != []:
- self.__ui.label.setStyleSheet(';'.join(stylesheet))
+ self.ui.label.setStyleSheet(';'.join(stylesheet))
- self.reDisplayWindow()
+ self.displayWindow()
def importSettings(self):
# restore settings from the settings file if the settings exist
@@ -237,7 +244,7 @@ def importSettings(self):
self.fullscreen = settings.value('GUI/fullscreen').toBool()
if settings.contains('GUI/font'):
font = str(settings.value('GUI/font').toString())
- self.__ui.label.setFont(QtGui.QFont(font, 72, QtGui.QFont.Bold))
+ self.ui.label.setFont(QtGui.QFont(font, 72, QtGui.QFont.Bold))
if settings.contains('GUI/font_color'):
self.font_color = str(settings.value('GUI/font_color').toString())
if settings.contains('GUI/background_color'):
@@ -249,39 +256,51 @@ def importSettings(self):
if settings.contains('Sound/annoying_sound'):
self.annoying_sound = settings.value('Sound/annoying_sound').toBool()
- def reDisplayWindow(self):
- if not self.isVisible():
- self.show()
- font = self.__ui.label.font()
+ def updateFullScreen(self):
+ self.fullscreen = not self.fullscreen
+ self.displayWindow()
+
+ def displayWindow(self):
+ font = self.ui.label.font()
if self.fullscreen:
- if self.__geometryLabel is None:
- self.__geometryLabel = self.__ui.label.geometry()
+ self.oldPointSize = font.pointSize()
self.showFullScreen()
# width is the size of of '+9999' in the current font
width = QtGui.QFontMetrics(font).width('+'+'9'*(self.digits+2))
# the factor to multiply by to use the max. space
- factor = float(self.__ui.gb_number.width()-10)/width
- font.setPointSize(min(int(font.pointSize()*factor), self.__ui.gb_number.height()-10))
+ factor = float(self.ui.gb_number.width()-10)/width
+ newPointSize = min(int(font.pointSize()*factor), self.ui.gb_number.height()-10)
else:
- font.setPointSize(72)
+ newPointSize = self.oldPointSize
self.showNormal()
- if self.__geometryLabel is not None:
- self.__ui.label.setGeometry(self.__geometryLabel)
- self.__geometryLabel = None
- self.__ui.label.setFont(font)
-
- def resizeEvent(self, event):
- QtGui.QDialog.resizeEvent(self, event)
- font = self.__ui.label.font()
+ font.setPointSize(newPointSize)
+ self.ui.label.setFont(font)
+
+ settings = QtCore.QSettings(QtCore.QSettings.IniFormat, QtCore.QSettings.UserScope, '%s' % appName, '%s' % appName)
+ settings.setValue('GUI/fullscreen', QtCore.QVariant(self.fullscreen))
+
+ def increaseFontSize(self):
+ font = self.ui.label.font()
+ font.setPointSize(font.pointSize()+10)
width = QtGui.QFontMetrics(font).width('+'+'9'*(self.digits+2))
- # the factor to multiply by to use the max. space
- factor = float(self.__ui.gb_number.width()-10)/width
- font.setPointSize(min(int(font.pointSize()*factor), self.__ui.gb_number.height()-10))
- self.__ui.label.setFont(font)
+ if width < self.ui.gb_number.width():
+ if self.ui.label.text() == '':
+ self.ui.label.setText('9'*self.digits)
+ self.ui.label.setFont(font)
+ QtCore.QTimer.singleShot(250, self.ui.label.clear)
+
+ def decreaseFontSize(self):
+ font = self.ui.label.font()
+ if font.pointSize()-10 >= 32:
+ font.setPointSize(font.pointSize()-10)
+ if self.ui.label.text() == '':
+ self.ui.label.setText('9'*self.digits)
+ self.ui.label.setFont(font)
+ QtCore.QTimer.singleShot(250, self.ui.label.clear)
def clearLabel(self):
- if self.__isLabelClearable:
- self.__ui.label.clear()
+ if self.isLabelClearable:
+ self.ui.label.clear()
# display the next number after timeout
self.timerUpdateLabel.setInterval(self.timeout)
self.timerUpdateLabel.start()
@@ -299,6 +318,7 @@ def changeSettings(self):
mysettings['one_digit'] = self.one_digit
mysettings['neg'] = self.neg
s = Settings(mysettings, parent=self)
+ s.connect(s.ui.cb_fullscreen, QtCore.SIGNAL('stateChanged(int)'), self.updateFullScreen)
ok, mysettings = s.exec_()
if ok:
self.flash = mysettings['flash']
@@ -307,7 +327,6 @@ def changeSettings(self):
self.rows = mysettings['rows']
self.speech = mysettings['speech']
self.one_digit = mysettings['one_digit']
- self.fullscreen = mysettings['fullscreen']
self.hands_free = mysettings['hands_free']
self.neg = mysettings['neg']
# always save settings when closing the settings dialog
@@ -321,7 +340,6 @@ def changeSettings(self):
settings.setValue('neg', QtCore.QVariant(self.neg))
settings.setValue('no_plus_sign', QtCore.QVariant(self.no_plus_sign))
- settings.setValue('GUI/fullscreen', QtCore.QVariant(self.fullscreen))
settings.setValue('GUI/font_color', QtCore.QVariant(self.font_color if self.font_color is not None else '#000000'))
settings.setValue('GUI/background_color', QtCore.QVariant(self.background_color \
if self.background_color is not None else 'transparent'))
@@ -335,9 +353,8 @@ def changeSettings(self):
settings.setValue('Sound/annoying_sound', QtCore.QVariant(self.annoying_sound))
# disable replay button
- self.__ui.pb_replay.setEnabled(False)
+ self.ui.pb_replay.setEnabled(False)
# go to full screen if needed
- self.reDisplayWindow()
def restartPlay(self):
if self.started:
@@ -348,76 +365,76 @@ def restartPlay(self):
self.player.setCurrentSource(Phonon.MediaSource(THREEBELLS))
duration = THREEBELLS_DURATION
self.player.play()
- self.__isLabelClearable = False
+ self.isLabelClearable = False
self.started = False
- self.__ui.label.clear()
- self.__ui.l_total.hide()
- self.__ui.pb_replay.setEnabled(False)
- self.__ui.label.setPixmap(QtGui.QPixmap(RESTART))
+ self.ui.label.clear()
+ self.ui.l_total.hide()
+ self.ui.pb_replay.setEnabled(False)
+ self.ui.label.setPixmap(QtGui.QPixmap(RESTART))
QtCore.QTimer.singleShot(duration, self.startPlay)
def redisplaySequence(self):
- self.__isLabelClearable = False
+ self.isLabelClearable = False
self.started = False
self.replay = True
- self.__ui.pb_replay.setEnabled(False)
+ self.ui.pb_replay.setEnabled(False)
self.timerUpdateLabel.stop()
if self.hands_free:
self.disconnect(self.player, QtCore.SIGNAL('finished()'), self.restartPlay)
self.connect(self.player, QtCore.SIGNAL('finished()'), self.clearLabel)
self.timerShowAnswer.stop()
self.timerRestartPlay.stop()
- self.__ui.l_total.hide()
+ self.ui.l_total.hide()
self.startPlay()
def startPlay(self):
if not self.started:
self.started = True
- self.__isLabelClearable = True
- self.__ui.label.clear()
- self.__ui.l_total.hide()
- #self.__ui.l_answer.setText('Your answer')
- self.__ui.le_answer.clear()
- self.__ui.le_answer.setEnabled(False)
- self.__ui.pb_check.setEnabled(False)
- self.__ui.pb_settings.setEnabled(False)
- self.__count = 0
+ self.isLabelClearable = True
+ self.ui.label.clear()
+ self.ui.l_total.hide()
+ #self.ui.l_answer.setText('Your answer')
+ self.ui.le_answer.clear()
+ self.ui.le_answer.setEnabled(False)
+ self.ui.pb_check.setEnabled(False)
+ self.ui.pb_settings.setEnabled(False)
+ self.count = 0
# generate sequence
if self.replay:
self.replay = False
else:
self.makeHistory()
self.noscore = False
- self.__ui.pb_replay.setEnabled(False)
+ self.ui.pb_replay.setEnabled(False)
# change pb_start to 'Stop' when starting display
- self.__ui.pb_start.setText(self.tr('&Stop'))
- self.__ui.pb_start.setToolTip(self.tr('Stop the sequence'))
+ self.ui.pb_start.setText(self.tr('&Stop'))
+ self.ui.pb_start.setToolTip(self.tr('Stop the sequence'))
if self.speech and IS_ESPEAK_INSTALLED:
self.player.stop()
elif self.annoying_sound:
self.disconnect(self.player, QtCore.SIGNAL('finished()'), self.clearLabel)
if self.hands_free:
- self.__ui.l_answer.setEnabled(False)
+ self.ui.l_answer.setEnabled(False)
# wait 1s before starting the display
self.timerUpdateLabel.setInterval(1000)
self.timerUpdateLabel.start()
else:
# then stop it
self.started = False
- self.__isLabelClearable = False
+ self.isLabelClearable = False
self.timerUpdateLabel.stop()
if self.hands_free:
self.disconnect(self.player, QtCore.SIGNAL('finished()'), self.restartPlay)
self.connect(self.player, QtCore.SIGNAL('finished()'), self.clearLabel)
self.timerShowAnswer.stop()
self.timerRestartPlay.stop()
- self.__ui.l_answer.setEnabled(True)
- self.__ui.l_total.hide()
- self.__ui.pb_settings.setEnabled(True)
- self.__ui.gb_number.setTitle('#')
- self.__ui.pb_start.setText(self.tr('&Start'))
- self.__ui.pb_start.setToolTip(self.tr('Start a sequence'))
- self.__ui.label.clear()
+ self.ui.l_answer.setEnabled(True)
+ self.ui.l_total.hide()
+ self.ui.pb_settings.setEnabled(True)
+ self.ui.gb_number.setTitle('#')
+ self.ui.pb_start.setText(self.tr('&Start'))
+ self.ui.pb_start.setToolTip(self.tr('Start a sequence'))
+ self.ui.label.clear()
if options.verbose:
print
if self.speech and IS_ESPEAK_INSTALLED:
@@ -449,9 +466,9 @@ def pronounceit(self, s):
self.player.play()
def updateAnswer(self):
- if self.__ui.le_answer.isEnabled():
+ if self.ui.le_answer.isEnabled():
try:
- a = int(self.__ui.le_answer.text())
+ a = int(self.ui.le_answer.text())
except ValueError:
a = -100
u,v = self.score
@@ -469,18 +486,18 @@ def updateAnswer(self):
self.score = u,v+1
if msg == ':-)':
self.noscore = True
- self.__ui.l_total.show()
- self.__ui.l_total.setText(self.tr('The correct answer is %1').arg(self.answer))
- self.__ui.le_answer.setDisabled(True)
- self.__ui.pb_check.setDisabled(True)
- self.__ui.pb_start.setFocus(QtCore.Qt.OtherFocusReason)
- self.__ui.label.setPixmap(QtGui.QPixmap(img))
+ self.ui.l_total.show()
+ self.ui.l_total.setText(self.tr('The correct answer is %1').arg(self.answer))
+ self.ui.le_answer.setDisabled(True)
+ self.ui.pb_check.setDisabled(True)
+ self.ui.pb_start.setFocus(QtCore.Qt.OtherFocusReason)
+ self.ui.label.setPixmap(QtGui.QPixmap(img))
if self.speech and IS_ESPEAK_INSTALLED:
self.player.setCurrentSource(Phonon.MediaSource(sound))
self.player.play()
self.setWindowTitle(self.tr('Mental Calculation %1/%2').arg(self.score[0]).arg(self.score[1]))
- self.__ui.pb_check.setDefault(False)
- self.__ui.pb_start.setDefault(True)
+ self.disconnect(self.shortcut_Enter, QtCore.SIGNAL('activated()'), self.ui.pb_check.click)
+ self.connect(self.shortcut_Enter, QtCore.SIGNAL('activated()'), self.ui.pb_start.click)
if options.verbose:
sys.stdout.flush()
@@ -510,9 +527,9 @@ def makeHistory(self):
def showAnswer(self):
if self.started:
- self.__ui.l_total.show()
- self.__ui.l_total.setText(self.tr('The correct answer is %1').arg(self.answer))
- self.__ui.label.setText('=%d' % self.answer)
+ self.ui.l_total.show()
+ self.ui.l_total.setText(self.tr('The correct answer is %1').arg(self.answer))
+ self.ui.label.setText('=%d' % self.answer)
if self.speech and IS_ESPEAK_INSTALLED:
# pronounce one digit at a time
t = '= %d' % self.answer
@@ -525,15 +542,15 @@ def showAnswer(self):
self.connect(self.player, QtCore.SIGNAL('finished()'), self.restartPlay)
self.pronounceit(t)
else:
- QtCore.QTimer.singleShot(2*self.flash, self.__ui.label.clear)
- QtCore.QTimer.singleShot(2*self.flash, self.__ui.l_total.hide)
+ QtCore.QTimer.singleShot(2*self.flash, self.ui.label.clear)
+ QtCore.QTimer.singleShot(2*self.flash, self.ui.l_total.hide)
self.timerRestartPlay.setInterval(2*self.flash+self.timeout)
self.timerRestartPlay.start()
def updateLabel(self):
if self.started:
- if self.__count == self.rows:
- self.__isLabelClearable = False
+ if self.count == self.rows:
+ self.isLabelClearable = False
if not self.hands_free:
self.started = False
duration = self.timeout
@@ -543,35 +560,35 @@ def updateLabel(self):
self.player.play()
duration += BELL_DURATION
- self.__ui.label.setText('?')
- self.__ui.gb_number.setTitle('#')
- self.__ui.pb_replay.setEnabled(True)
+ self.ui.label.setText('?')
+ self.ui.gb_number.setTitle('#')
+ self.ui.pb_replay.setEnabled(True)
if self.hands_free:
self.timerShowAnswer.setInterval(duration)
self.timerShowAnswer.start()
else:
- self.__ui.pb_start.setText(self.tr('&Start'))
- self.__ui.pb_start.setToolTip(self.tr('Start a sequence'))
- self.__ui.le_answer.setEnabled(True)
- self.__ui.pb_check.setEnabled(True)
- self.__ui.pb_settings.setEnabled(True)
- self.__ui.le_answer.setFocus(QtCore.Qt.OtherFocusReason)
- self.__ui.pb_check.setDefault(True)
- self.__ui.pb_start.setDefault(False)
+ self.ui.pb_start.setText(self.tr('&Start'))
+ self.ui.pb_start.setToolTip(self.tr('Start a sequence'))
+ self.ui.le_answer.setEnabled(True)
+ self.ui.pb_check.setEnabled(True)
+ self.ui.pb_settings.setEnabled(True)
+ self.ui.le_answer.setFocus(QtCore.Qt.OtherFocusReason)
+ self.disconnect(self.shortcut_Enter, QtCore.SIGNAL('activated()'), self.ui.pb_start.click)
+ self.connect(self.shortcut_Enter, QtCore.SIGNAL('activated()'), self.ui.pb_check.click)
if self.annoying_sound:
self.connect(self.player, QtCore.SIGNAL('finished()'), self.clearLabel)
if options.verbose:
print
else:
- self.__count += 1
- self.__ui.gb_number.setTitle('#%d / %s' % (self.__count, self.rows))
- n = self.history[self.__count-1]
+ self.count += 1
+ self.ui.gb_number.setTitle('#%d / %s' % (self.count, self.rows))
+ n = self.history[self.count-1]
t = '%d' % n
- if self.neg and self.__count > 1:
+ if self.neg and self.count > 1:
t = '%+d' % n
if self.no_plus_sign and t.startswith('+'):
t = t[1:]
- self.__ui.label.setText(t)
+ self.ui.label.setText(t)
# print the sequence in the console
if options.verbose:
print t,
@@ -594,9 +611,10 @@ def updateLabel(self):
def closeEvent(self, event):
# stop the player
- self.player.stop()
- self.player = None
- QtGui.QDialog.closeEvent(self, event)
+ if self.player:
+ self.player.stop()
+ self.player = None
+ QtGui.QMainWindow.closeEvent(self, event)
if __name__ == '__main__':
parser = OptionParser(usage='usage: %prog [-v]')
@@ -610,18 +628,16 @@ def closeEvent(self, event):
else:
ESPEAK_CMD_LIST = ['/usr/bin/espeak']
-
# check espeak in the default location
ESPEAK_CMD = ESPEAK_CMD_LIST[0]
- IS_ESPEAK_INSTALLED = found = False
+ IS_ESPEAK_INSTALLED = False
i = 0
- while not found and i < len(ESPEAK_CMD_LIST):
+ while not IS_ESPEAK_INSTALLED and i < len(ESPEAK_CMD_LIST):
if isfile(ESPEAK_CMD_LIST[i]):
- found = True
+ IS_ESPEAK_INSTALLED = True
ESPEAK_CMD = ESPEAK_CMD_LIST[i]
break
i += 1
- IS_ESPEAK_INSTALLED = found
app = QtGui.QApplication(sys.argv)
app.setApplicationName('Mental Calculation')
@@ -640,10 +656,7 @@ def closeEvent(self, event):
ESPEAK_SPEED = 170 # the default of espeak
# create main gui and display settings dialog
- window_flags = QtCore.Qt.Window|QtCore.Qt.WindowTitleHint|QtCore.Qt.WindowSystemMenuHint
- if WINDOWS:
- window_flags |= QtCore.Qt.WindowMinimizeButtonHint
- f = Main(flag=window_flags)
+ f = Main()
f.show()
f.raise_() # for Mac Os X
f.changeSettings()
View
170 mentalcalculation_fr.ts
@@ -6,12 +6,12 @@
<message>
<location filename="main.py" line="112"/>
<source>Mental Calculation</source>
- <translation>Calcul mental</translation>
+ <translation type="obsolete">Calcul mental</translation>
</message>
<message>
<location filename="main.py" line="113"/>
<source>#</source>
- <translation>#</translation>
+ <translation type="obsolete">#</translation>
</message>
<message>
<location filename="main.py" line="107"/>
@@ -21,17 +21,17 @@
<message>
<location filename="main.py" line="115"/>
<source>&amp;Your answer</source>
- <translation>Votre &amp;réponse</translation>
+ <translation type="obsolete">Votre &amp;réponse</translation>
</message>
<message>
<location filename="main.py" line="116"/>
<source>Type here your answer (the total)</source>
- <translation>Tapez votre réponse ici</translation>
+ <translation type="obsolete">Tapez votre réponse ici</translation>
</message>
<message>
<location filename="main.py" line="117"/>
<source>The total is </source>
- <translation>Le total est</translation>
+ <translation type="obsolete">Le total est</translation>
</message>
<message>
<location filename="main.py" line="110"/>
@@ -41,60 +41,60 @@
<message>
<location filename="main.py" line="119"/>
<source>&amp;Start</source>
- <translation>&amp;Lancer</translation>
+ <translation type="obsolete">&amp;Lancer</translation>
</message>
<message>
<location filename="main.py" line="122"/>
<source>Check your answer</source>
- <translation>Vérifier la réponse</translation>
+ <translation type="obsolete">Vérifier la réponse</translation>
</message>
<message>
<location filename="main.py" line="123"/>
<source>&amp;Check</source>
- <translation>&amp;Vérifier</translation>
+ <translation type="obsolete">&amp;Vérifier</translation>
</message>
<message>
<location filename="main.py" line="124"/>
<source>Go to Setttings dialog</source>
- <translation>Changer les préférences</translation>
+ <translation type="obsolete">Changer les préférences</translation>
</message>
<message>
<location filename="main.py" line="125"/>
<source>&amp;Settings</source>
- <translation>&amp;Préférences</translation>
+ <translation type="obsolete">&amp;Préférences</translation>
</message>
<message>
<location filename="main.py" line="126"/>
<source>Exit the program</source>
- <translation>Quitter le programme</translation>
+ <translation type="obsolete">Quitter le programme</translation>
</message>
<message>
<location filename="main.py" line="127"/>
<source>&amp;Exit</source>
- <translation>&amp;Quitter</translation>
+ <translation type="obsolete">&amp;Quitter</translation>
</message>
<message>
- <location filename="settings.py" line="160"/>
+ <location filename="settings.py" line="21"/>
<source>Settings</source>
<translation>Préférences</translation>
</message>
<message>
- <location filename="settings.py" line="161"/>
+ <location filename="settings.py" line="34"/>
<source>Number of digits for each number</source>
<translation>Nombre de chiffres pour chaque nombre</translation>
</message>
<message>
- <location filename="settings.py" line="162"/>
+ <location filename="settings.py" line="35"/>
<source>Number of &amp;digits</source>
<translation>Nombre de &amp;chiffres</translation>
</message>
<message>
- <location filename="settings.py" line="163"/>
+ <location filename="settings.py" line="54"/>
<source>How many to add ?</source>
<translation>Combien de nombres ajouter ?</translation>
</message>
<message>
- <location filename="settings.py" line="164"/>
+ <location filename="settings.py" line="55"/>
<source>Number of &amp;rows</source>
<translation>Nombre de &amp;ligne</translation>
</message>
@@ -124,37 +124,32 @@
<translation type="obsolete">Temps en ms entre la disparition du nombre et le prochain nombre</translation>
</message>
<message>
- <location filename="settings.py" line="168"/>
+ <location filename="settings.py" line="81"/>
<source>&amp;Timeout (ms)</source>
<translation>&amp;Temps mort (ms)</translation>
</message>
<message>
- <location filename="settings.py" line="169"/>
+ <location filename="settings.py" line="99"/>
<source>Time the number is displayed</source>
<translation>Durée de visibilité du nombre</translation>
</message>
<message>
- <location filename="settings.py" line="170"/>
+ <location filename="settings.py" line="100"/>
<source>&amp;Flash (ms)</source>
<translation>&amp;Flash (ms)</translation>
</message>
<message>
- <location filename="settings.py" line="166"/>
+ <location filename="settings.py" line="74"/>
<source>&amp;Subtractions</source>
<translation>&amp;Soustractions</translation>
</message>
<message>
- <location filename="main.py" line="114"/>
- <source>+99999</source>
- <translation></translation>
- </message>
- <message>
- <location filename="settings.py" line="165"/>
+ <location filename="settings.py" line="73"/>
<source>Allow/disallow subtractions</source>
<translation>Active/désactive les soustractions</translation>
</message>
<message>
- <location filename="settings.py" line="171"/>
+ <location filename="settings.py" line="130"/>
<source> &lt;p style=&apos;white-space:pre&apos;&gt;&lt;em&gt;&lt;strong&gt;espeak&lt;/strong&gt;&lt;/em&gt; is needed for speech synthesis&lt;/p&gt;</source>
<translation>&lt;p style=&apos;white-space:pre&apos;&gt;&lt;em&gt;&lt;strong&gt;espeak&lt;/strong&gt;&lt;/em&gt; est obligatoire pour la synthèse vocale&lt;/p&gt;</translation>
</message>
@@ -164,12 +159,12 @@
<translation type="obsolete">Lance une série</translation>
</message>
<message>
- <location filename="settings.py" line="172"/>
+ <location filename="settings.py" line="131"/>
<source>S&amp;peech Synthesis</source>
<translation>S&amp;ynthèse vocale</translation>
</message>
<message>
- <location filename="settings.py" line="173"/>
+ <location filename="settings.py" line="136"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
@@ -190,20 +185,20 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="main.py" line="118"/>
<source>Start a sequence</source>
- <translation>Lance une série</translation>
+ <translation type="obsolete">Lance une série</translation>
</message>
<message>
- <location filename="settings.py" line="181"/>
+ <location filename="settings.py" line="152"/>
<source>Pronounce each digit of a number</source>
<translation>Prononce un chiffre à la fois</translation>
</message>
<message>
- <location filename="settings.py" line="182"/>
+ <location filename="settings.py" line="153"/>
<source>One digit at a time</source>
<translation>Un chiffre à la fois</translation>
</message>
<message>
- <location filename="settings.py" line="183"/>
+ <location filename="settings.py" line="158"/>
<source>In this mode, you don&apos;t have to enter an answer, it&apos;s &quot;hands free&quot;;
the solution is displayed, and a new sequence begins,
and so on ...</source>
@@ -217,28 +212,28 @@ ainsi de suite ...</translation>
<translation type="obsolete">Mode &quot;pas de &amp;score&quot;</translation>
</message>
<message>
- <location filename="settings.py" line="167"/>
+ <location filename="settings.py" line="80"/>
<source>Timeout in ms between number disappearing and next number appearing</source>
<translation>Temps en ms entre le moment où le nombre disparaît et
où le prochain nombre apparaït</translation>
</message>
<message>
- <location filename="settings.py" line="186"/>
+ <location filename="settings.py" line="161"/>
<source>&amp;Continuous &quot;hands-free&quot; mode</source>
<translation>Mode &amp;continu (sans &quot;les mains&quot;)</translation>
</message>
<message>
<location filename="main.py" line="120"/>
<source>Replay the last sequence</source>
- <translation>Relance la dernière séquence</translation>
+ <translation type="obsolete">Relance la dernière séquence</translation>
</message>
<message>
<location filename="main.py" line="121"/>
<source>Replay</source>
- <translation>Relancer</translation>
+ <translation type="obsolete">Relancer</translation>
</message>
<message>
- <location filename="settings.py" line="187"/>
+ <location filename="settings.py" line="165"/>
<source>Full screen</source>
<translation>Plein écran</translation>
</message>
@@ -246,22 +241,22 @@ où le prochain nombre apparaït</translation>
<context>
<name>Main</name>
<message>
- <location filename="mentalcalculation.py" line="444"/>
+ <location filename="mentalcalculation.py" line="531"/>
<source>The correct answer is %1</source>
<translation>La réponse correcte est %1</translation>
</message>
<message>
- <location filename="mentalcalculation.py" line="330"/>
+ <location filename="mentalcalculation.py" line="410"/>
<source>&amp;Stop</source>
<translation>&amp;Stop</translation>
</message>
<message>
- <location filename="mentalcalculation.py" line="481"/>
+ <location filename="mentalcalculation.py" line="570"/>
<source>&amp;Start</source>
<translation>&amp;Lancer</translation>
</message>
<message>
- <location filename="mentalcalculation.py" line="411"/>
+ <location filename="mentalcalculation.py" line="498"/>
<source>Mental Calculation %1/%2</source>
<translation>Calcul Mental %1/%2</translation>
</message>
@@ -276,17 +271,100 @@ où le prochain nombre apparaït</translation>
<translation type="obsolete">Relance la séquence précédente</translation>
</message>
<message>
- <location filename="mentalcalculation.py" line="482"/>
+ <location filename="mentalcalculation.py" line="571"/>
<source>Start a sequence</source>
<translation>Lance une série</translation>
</message>
<message>
- <location filename="mentalcalculation.py" line="331"/>
+ <location filename="mentalcalculation.py" line="411"/>
<source>Stop the sequence</source>
<translation>Arrête la séquence</translation>
</message>
</context>
<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="main.py" line="21"/>
+ <source>Mental Calculation</source>
+ <translation>Calcul mental</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="36"/>
+ <source>#</source>
+ <translation>#</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="53"/>
+ <source>+99999</source>
+ <translation>+9999</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="61"/>
+ <source>&amp;Your answer</source>
+ <translation>Votre &amp;réponse</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="77"/>
+ <source>Type here your answer (the total)</source>
+ <translation>Tapez votre réponse ici</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="86"/>
+ <source>The total is </source>
+ <translation>Le total est</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="93"/>
+ <source>Start a sequence</source>
+ <translation>Lance une série</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="94"/>
+ <source>&amp;Start</source>
+ <translation>&amp;Lancer</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="99"/>
+ <source>Replay the last sequence</source>
+ <translation>Relance la dernière séquence</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="100"/>
+ <source>Replay</source>
+ <translation>Relancer</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="105"/>
+ <source>Check your answer</source>
+ <translation>Vérifier la réponse</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="106"/>
+ <source>&amp;Check</source>
+ <translation>&amp;Vérifier</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="112"/>
+ <source>Go to Setttings dialog</source>
+ <translation>Changer les préférences</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="113"/>
+ <source>&amp;Settings</source>
+ <translation>&amp;Préférences</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="119"/>
+ <source>Exit the program</source>
+ <translation>Quitter le programme</translation>
+ </message>
+ <message>
+ <location filename="main.py" line="120"/>
+ <source>&amp;Exit</source>
+ <translation>&amp;Quitter</translation>
+ </message>
+</context>
+<context>
<name>QDialogButtonBox</name>
<message>
<location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="561"/>
@@ -316,7 +394,7 @@ où le prochain nombre apparaït</translation>
<message>
<location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="0"/>
<source>&amp;Cancel</source>
- <translation>&amp;Annuler</translation>
+ <translation type="obsolete">&amp;Annuler</translation>
</message>
<message>
<location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="3"/>
Please sign in to comment.
Something went wrong with that request. Please try again.