示例#1
0
 def toggle_sound(self):
     """Toggle the sound effects flag."""
     if app_config['Sound']['sounds'] == 'off':
         app_config['Sound']['sounds'] = 'on'
     else:
         app_config['Sound']['sounds'] = 'off'
     save_config(app_config)
示例#2
0
 def toggle_wrap(self):
     """Toggle the line wrap flag in the text editor."""
     self.text_window.setLineWrapMode(not self.text_window.lineWrapMode())
     if self.text_window.lineWrapMode():
         app_config['Editor']['linewrap'] = 'on'
     else:
         app_config['Editor']['linewrap'] = 'off'
     save_config(app_config)
    def submit_clicked(self):
        """Process a click on the Submit button.

        If the correct answers were all selected, the user is allowed to continue."""
        if self.quiz_correct():
            app_config['License']['eulaaccepted'] = 'yes'
            save_config(app_config)
            dlg = QtWidgets.QMessageBox(self)
            dlg.setText("Correct. Thank you for using Crocpad++.")
            dlg.setIcon(QtWidgets.QMessageBox.Critical)
            dlg.show()
        self.close()
示例#4
0
 def set_quitedark_theme(self):
     """Set the text view to the Quite Dark theme for the legally blind."""
     self.app.setStyleSheet(crocpad.stylesheets.quitedark)
     app_config['Editor']['visualmode'] = 'quitedark'
     save_config(app_config)
示例#5
0
 def set_hotdogstand_theme(self):
     """Set the text view to the High Contrast theme."""
     self.app.setStyleSheet(crocpad.stylesheets.hotdogstand)
     app_config['Editor']['visualmode'] = 'hotdogstand'
     save_config(app_config)
示例#6
0
 def set_dark_theme(self):
     """Set the text view to the dark theme."""
     self.app.setStyleSheet(crocpad.stylesheets.dark)
     app_config['Editor']['visualmode'] = 'dark'
     save_config(app_config)
示例#7
0
 def set_light_theme(self):
     """Set the text view to the light theme."""
     self.app.setStyleSheet(crocpad.stylesheets.light)
     app_config['Editor']['visualmode'] = 'light'
     save_config(app_config)