novelWriter 2.1.1__py3-none-any.whl → 2.2rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/METADATA +3 -3
  2. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/RECORD +105 -76
  3. novelwriter/__init__.py +6 -24
  4. novelwriter/assets/i18n/project_de_DE.json +10 -0
  5. novelwriter/assets/i18n/project_en_GB.json +11 -0
  6. novelwriter/assets/i18n/project_en_US.json +10 -0
  7. novelwriter/assets/i18n/project_ja_JP.json +11 -1
  8. novelwriter/assets/i18n/project_nb_NO.json +10 -0
  9. novelwriter/assets/i18n/project_nn_NO.json +10 -0
  10. novelwriter/assets/icons/novelwriter.ico +0 -0
  11. novelwriter/assets/icons/novelwriter.svg +8 -183
  12. novelwriter/assets/icons/typicons_dark/icons.conf +17 -2
  13. novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +4 -0
  14. novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +4 -0
  15. novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +4 -0
  16. novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +4 -0
  17. novelwriter/assets/icons/typicons_dark/nw_panel.svg +4 -0
  18. novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +4 -0
  19. novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +4 -0
  20. novelwriter/assets/icons/typicons_dark/nw_tb-markdown.svg +8 -0
  21. novelwriter/assets/icons/typicons_dark/nw_tb-shortcode.svg +8 -0
  22. novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +4 -0
  23. novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +5 -0
  24. novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +5 -0
  25. novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +5 -0
  26. novelwriter/assets/icons/typicons_dark/typ_eye.svg +4 -0
  27. novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +4 -0
  28. novelwriter/assets/icons/typicons_light/icons.conf +17 -2
  29. novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +4 -0
  30. novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +4 -0
  31. novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +4 -0
  32. novelwriter/assets/icons/typicons_light/nw_deco-note.svg +4 -0
  33. novelwriter/assets/icons/typicons_light/nw_panel.svg +4 -0
  34. novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +4 -0
  35. novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +4 -0
  36. novelwriter/assets/icons/typicons_light/nw_tb-markdown.svg +8 -0
  37. novelwriter/assets/icons/typicons_light/nw_tb-shortcode.svg +8 -0
  38. novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +4 -0
  39. novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +5 -0
  40. novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +5 -0
  41. novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +5 -0
  42. novelwriter/assets/icons/typicons_light/typ_eye.svg +4 -0
  43. novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +4 -0
  44. novelwriter/assets/icons/x-novelwriter-project.ico +0 -0
  45. novelwriter/assets/icons/x-novelwriter-project.svg +7 -206
  46. novelwriter/assets/manual.pdf +0 -0
  47. novelwriter/assets/sample.zip +0 -0
  48. novelwriter/assets/syntax/default_dark.conf +1 -0
  49. novelwriter/assets/syntax/default_light.conf +1 -0
  50. novelwriter/assets/syntax/grey_dark.conf +1 -0
  51. novelwriter/assets/syntax/grey_light.conf +1 -0
  52. novelwriter/assets/syntax/light_owl.conf +1 -0
  53. novelwriter/assets/syntax/night_owl.conf +1 -0
  54. novelwriter/assets/syntax/solarized_dark.conf +1 -0
  55. novelwriter/assets/syntax/solarized_light.conf +1 -0
  56. novelwriter/assets/syntax/tomorrow.conf +1 -0
  57. novelwriter/assets/syntax/tomorrow_night.conf +1 -0
  58. novelwriter/assets/syntax/tomorrow_night_blue.conf +1 -0
  59. novelwriter/assets/syntax/tomorrow_night_bright.conf +1 -0
  60. novelwriter/assets/syntax/tomorrow_night_eighties.conf +1 -0
  61. novelwriter/assets/text/credits_en.htm +7 -0
  62. novelwriter/assets/text/release_notes.htm +7 -37
  63. novelwriter/common.py +22 -1
  64. novelwriter/config.py +27 -42
  65. novelwriter/constants.py +45 -7
  66. novelwriter/core/buildsettings.py +40 -24
  67. novelwriter/core/coretools.py +8 -1
  68. novelwriter/core/docbuild.py +2 -6
  69. novelwriter/core/index.py +264 -175
  70. novelwriter/core/options.py +8 -3
  71. novelwriter/core/project.py +2 -2
  72. novelwriter/core/projectdata.py +3 -3
  73. novelwriter/core/tohtml.py +60 -59
  74. novelwriter/core/tokenizer.py +110 -70
  75. novelwriter/core/tomd.py +51 -38
  76. novelwriter/core/toodt.py +184 -147
  77. novelwriter/dialogs/preferences.py +75 -106
  78. novelwriter/dialogs/projsettings.py +101 -110
  79. novelwriter/dialogs/updates.py +25 -14
  80. novelwriter/enum.py +28 -3
  81. novelwriter/extensions/novelselector.py +1 -1
  82. novelwriter/gui/doceditor.py +1345 -1235
  83. novelwriter/gui/dochighlight.py +98 -62
  84. novelwriter/gui/docviewer.py +151 -340
  85. novelwriter/gui/docviewerpanel.py +457 -0
  86. novelwriter/gui/editordocument.py +126 -0
  87. novelwriter/gui/mainmenu.py +350 -300
  88. novelwriter/gui/noveltree.py +101 -125
  89. novelwriter/gui/outline.py +154 -171
  90. novelwriter/gui/projtree.py +480 -380
  91. novelwriter/gui/sidebar.py +106 -75
  92. novelwriter/gui/statusbar.py +1 -1
  93. novelwriter/gui/theme.py +114 -75
  94. novelwriter/guimain.py +353 -254
  95. novelwriter/shared.py +36 -3
  96. novelwriter/tools/dictionaries.py +268 -0
  97. novelwriter/tools/manusbuild.py +17 -6
  98. novelwriter/tools/manuscript.py +11 -3
  99. novelwriter/tools/manussettings.py +0 -14
  100. novelwriter/tools/projwizard.py +16 -2
  101. novelwriter/tools/writingstats.py +1 -1
  102. novelwriter/assets/icons/typicons_dark/typ_at.svg +0 -4
  103. novelwriter/assets/icons/typicons_dark/typ_th-menu.svg +0 -4
  104. novelwriter/assets/icons/typicons_light/typ_at.svg +0 -4
  105. novelwriter/assets/icons/typicons_light/typ_th-menu.svg +0 -4
  106. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/LICENSE.md +0 -0
  107. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/WHEEL +0 -0
  108. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/entry_points.txt +0 -0
  109. {novelWriter-2.1.1.dist-info → novelWriter-2.2rc1.dist-info}/top_level.txt +0 -0
@@ -26,7 +26,7 @@ from __future__ import annotations
26
26
  import logging
27
27
 
28
28
  from PyQt5.QtGui import QFont
29
- from PyQt5.QtCore import Qt
29
+ from PyQt5.QtCore import Qt, pyqtSlot
30
30
  from PyQt5.QtWidgets import (
31
31
  QDialog, QWidget, QComboBox, QSpinBox, QPushButton, QDialogButtonBox,
32
32
  QLineEdit, QFileDialog, QFontDialog, QDoubleSpinBox
@@ -43,12 +43,11 @@ logger = logging.getLogger(__name__)
43
43
 
44
44
  class GuiPreferences(NPagedDialog):
45
45
 
46
- def __init__(self, mainGui):
47
- super().__init__(parent=mainGui)
46
+ def __init__(self, parent: QWidget) -> None:
47
+ super().__init__(parent=parent)
48
48
 
49
49
  logger.debug("Create: GuiPreferences")
50
50
  self.setObjectName("GuiPreferences")
51
-
52
51
  self.setWindowTitle(self.tr("Preferences"))
53
52
 
54
53
  self.tabGeneral = GuiPreferencesGeneral(self)
@@ -93,26 +92,27 @@ class GuiPreferences(NPagedDialog):
93
92
  ##
94
93
 
95
94
  @property
96
- def updateTheme(self):
95
+ def updateTheme(self) -> bool:
97
96
  return self._updateTheme
98
97
 
99
98
  @property
100
- def updateSyntax(self):
99
+ def updateSyntax(self) -> bool:
101
100
  return self._updateSyntax
102
101
 
103
102
  @property
104
- def needsRestart(self):
103
+ def needsRestart(self) -> bool:
105
104
  return self._needsRestart
106
105
 
107
106
  @property
108
- def refreshTree(self):
107
+ def refreshTree(self) -> bool:
109
108
  return self._refreshTree
110
109
 
111
110
  ##
112
- # Slots
111
+ # Private Slots
113
112
  ##
114
113
 
115
- def _doSave(self):
114
+ @pyqtSlot()
115
+ def _doSave(self) -> None:
116
116
  """Trigger all the save functions in the tabs, and collect the
117
117
  status of the saves.
118
118
  """
@@ -132,9 +132,9 @@ class GuiPreferences(NPagedDialog):
132
132
 
133
133
  return
134
134
 
135
- def _doClose(self):
136
- """Close the preferences without saving the changes.
137
- """
135
+ @pyqtSlot()
136
+ def _doClose(self) -> None:
137
+ """Close the preferences without saving the changes."""
138
138
  self._saveWindowSize()
139
139
  self.reject()
140
140
  return
@@ -143,9 +143,8 @@ class GuiPreferences(NPagedDialog):
143
143
  # Internal Functions
144
144
  ##
145
145
 
146
- def _saveWindowSize(self):
147
- """Save the dialog window size.
148
- """
146
+ def _saveWindowSize(self) -> None:
147
+ """Save the dialog window size."""
149
148
  CONFIG.setPreferencesWinSize(self.width(), self.height())
150
149
  return
151
150
 
@@ -154,7 +153,7 @@ class GuiPreferences(NPagedDialog):
154
153
 
155
154
  class GuiPreferencesGeneral(QWidget):
156
155
 
157
- def __init__(self, prefsGui):
156
+ def __init__(self, prefsGui: GuiPreferences) -> None:
158
157
  super().__init__(parent=prefsGui)
159
158
 
160
159
  self.prefsGui = prefsGui
@@ -285,9 +284,8 @@ class GuiPreferencesGeneral(QWidget):
285
284
 
286
285
  return
287
286
 
288
- def saveValues(self):
289
- """Save the values set for this tab.
290
- """
287
+ def saveValues(self) -> None:
288
+ """Save the values set for this tab."""
291
289
  guiLocale = self.guiLocale.currentData()
292
290
  guiTheme = self.guiTheme.currentData()
293
291
  guiSyntax = self.guiSyntax.currentData()
@@ -316,12 +314,12 @@ class GuiPreferencesGeneral(QWidget):
316
314
  return
317
315
 
318
316
  ##
319
- # Slots
317
+ # Private Slots
320
318
  ##
321
319
 
322
- def _selectFont(self):
323
- """Open the QFontDialog and set a font for the font style.
324
- """
320
+ @pyqtSlot()
321
+ def _selectFont(self) -> None:
322
+ """Open the QFontDialog and set a font for the font style."""
325
323
  currFont = QFont()
326
324
  currFont.setFamily(CONFIG.guiFont)
327
325
  currFont.setPointSize(CONFIG.guiFontSize)
@@ -336,7 +334,7 @@ class GuiPreferencesGeneral(QWidget):
336
334
 
337
335
  class GuiPreferencesProjects(QWidget):
338
336
 
339
- def __init__(self, prefsGui):
337
+ def __init__(self, prefsGui: GuiPreferences) -> None:
340
338
  super().__init__(parent=prefsGui)
341
339
 
342
340
  # The Form
@@ -438,9 +436,8 @@ class GuiPreferencesProjects(QWidget):
438
436
 
439
437
  return
440
438
 
441
- def saveValues(self):
442
- """Save the values set for this tab.
443
- """
439
+ def saveValues(self) -> None:
440
+ """Save the values set for this tab."""
444
441
  # Automatic Save
445
442
  CONFIG.autoSaveDoc = self.autoSaveDoc.value()
446
443
  CONFIG.autoSaveProj = self.autoSaveProj.value()
@@ -457,12 +454,12 @@ class GuiPreferencesProjects(QWidget):
457
454
  return
458
455
 
459
456
  ##
460
- # Slots
457
+ # Private Slots
461
458
  ##
462
459
 
463
- def _backupFolder(self):
464
- """Open a dialog to select the backup folder.
465
- """
460
+ @pyqtSlot()
461
+ def _backupFolder(self) -> None:
462
+ """Open a dialog to select the backup folder."""
466
463
  currDir = self.backupPath or ""
467
464
  newDir = QFileDialog.getExistingDirectory(
468
465
  self, self.tr("Backup Directory"), str(currDir), options=QFileDialog.ShowDirsOnly
@@ -472,15 +469,13 @@ class GuiPreferencesProjects(QWidget):
472
469
  self.mainForm.setHelpText(
473
470
  self.backupPathRow, self.tr("Path: {0}").format(self.backupPath)
474
471
  )
475
- return True
476
-
477
- return False
472
+ return
473
+ return
478
474
 
479
- def _toggledBackupOnClose(self, theState):
480
- """Enable or disable switch that depends on the backup on close
481
- switch.
482
- """
483
- self.askBeforeBackup.setEnabled(theState)
475
+ @pyqtSlot(bool)
476
+ def _toggledBackupOnClose(self, state: bool) -> None:
477
+ """Toggle switch that depends on the backup on close switch."""
478
+ self.askBeforeBackup.setEnabled(state)
484
479
  return
485
480
 
486
481
  # END Class GuiPreferencesProjects
@@ -488,7 +483,7 @@ class GuiPreferencesProjects(QWidget):
488
483
 
489
484
  class GuiPreferencesDocuments(QWidget):
490
485
 
491
- def __init__(self, prefsGui):
486
+ def __init__(self, prefsGui: GuiPreferences) -> None:
492
487
  super().__init__(parent=prefsGui)
493
488
 
494
489
  # The Form
@@ -604,9 +599,8 @@ class GuiPreferencesDocuments(QWidget):
604
599
 
605
600
  return
606
601
 
607
- def saveValues(self):
608
- """Save the values set for this tab.
609
- """
602
+ def saveValues(self) -> None:
603
+ """Save the values set for this tab."""
610
604
  # Text Style
611
605
  CONFIG.setTextFont(self.textFont.text(), self.textSize.value())
612
606
 
@@ -621,12 +615,12 @@ class GuiPreferencesDocuments(QWidget):
621
615
  return
622
616
 
623
617
  ##
624
- # Slots
618
+ # Private Slots
625
619
  ##
626
620
 
621
+ @pyqtSlot()
627
622
  def _selectFont(self):
628
- """Open the QFontDialog and set a font for the font style.
629
- """
623
+ """Open the QFontDialog and set a font for the font style."""
630
624
  currFont = QFont()
631
625
  currFont.setFamily(CONFIG.textFont)
632
626
  currFont.setPointSize(CONFIG.textSize)
@@ -642,7 +636,7 @@ class GuiPreferencesDocuments(QWidget):
642
636
 
643
637
  class GuiPreferencesEditor(QWidget):
644
638
 
645
- def __init__(self, prefsGui):
639
+ def __init__(self, prefsGui: GuiPreferences) -> None:
646
640
  super().__init__(parent=prefsGui)
647
641
 
648
642
  # The Form
@@ -677,19 +671,6 @@ class GuiPreferencesEditor(QWidget):
677
671
  self.tr("Available languages are determined by your system.")
678
672
  )
679
673
 
680
- # Big Document Size Limit
681
- self.bigDocLimit = QSpinBox(self)
682
- self.bigDocLimit.setMinimum(10)
683
- self.bigDocLimit.setMaximum(10000)
684
- self.bigDocLimit.setSingleStep(10)
685
- self.bigDocLimit.setValue(CONFIG.bigDocLimit)
686
- self.mainForm.addRow(
687
- self.tr("Big document limit"),
688
- self.bigDocLimit,
689
- self.tr("Full spell checking is disabled above this limit."),
690
- unit=self.tr("kB")
691
- )
692
-
693
674
  # Word Count
694
675
  # ==========
695
676
  self.mainForm.addGroupLabel(self.tr("Word Count"))
@@ -740,16 +721,12 @@ class GuiPreferencesEditor(QWidget):
740
721
  self.mainForm.addGroupLabel(self.tr("Scroll Behaviour"))
741
722
 
742
723
  # Scroll Past End
743
- self.scrollPastEnd = QSpinBox(self)
744
- self.scrollPastEnd.setMinimum(0)
745
- self.scrollPastEnd.setMaximum(100)
746
- self.scrollPastEnd.setSingleStep(1)
747
- self.scrollPastEnd.setValue(int(CONFIG.scrollPastEnd))
724
+ self.scrollPastEnd = NSwitch()
725
+ self.scrollPastEnd.setChecked(CONFIG.scrollPastEnd)
748
726
  self.mainForm.addRow(
749
727
  self.tr("Scroll past end of the document"),
750
728
  self.scrollPastEnd,
751
- self.tr("Set to 0 to disable this feature."),
752
- unit=self.tr("lines")
729
+ self.tr("Also centres the cursor when scrolling.")
753
730
  )
754
731
 
755
732
  # Typewriter Scrolling
@@ -776,12 +753,10 @@ class GuiPreferencesEditor(QWidget):
776
753
 
777
754
  return
778
755
 
779
- def saveValues(self):
780
- """Save the values set for this tab.
781
- """
756
+ def saveValues(self) -> None:
757
+ """Save the values set for this tab."""
782
758
  # Spell Checking
783
759
  CONFIG.spellLanguage = self.spellLanguage.currentData()
784
- CONFIG.bigDocLimit = self.bigDocLimit.value()
785
760
 
786
761
  # Word Count
787
762
  CONFIG.wordCountTimer = self.wordCountTimer.value()
@@ -792,9 +767,9 @@ class GuiPreferencesEditor(QWidget):
792
767
  CONFIG.showLineEndings = self.showLineEndings.isChecked()
793
768
 
794
769
  # Scroll Behaviour
795
- CONFIG.scrollPastEnd = self.scrollPastEnd.value()
796
770
  CONFIG.autoScroll = self.autoScroll.isChecked()
797
771
  CONFIG.autoScrollPos = self.autoScrollPos.value()
772
+ CONFIG.scrollPastEnd = self.scrollPastEnd.isChecked()
798
773
 
799
774
  return
800
775
 
@@ -803,7 +778,7 @@ class GuiPreferencesEditor(QWidget):
803
778
 
804
779
  class GuiPreferencesSyntax(QWidget):
805
780
 
806
- def __init__(self, prefsGui):
781
+ def __init__(self, prefsGui: GuiPreferences) -> None:
807
782
  super().__init__(parent=prefsGui)
808
783
 
809
784
  self.prefsGui = prefsGui
@@ -869,9 +844,8 @@ class GuiPreferencesSyntax(QWidget):
869
844
 
870
845
  return
871
846
 
872
- def saveValues(self):
873
- """Save the values set for this tab.
874
- """
847
+ def saveValues(self) -> None:
848
+ """Save the values set for this tab."""
875
849
  highlightQuotes = self.highlightQuotes.isChecked()
876
850
  allowOpenSQuote = self.allowOpenSQuote.isChecked()
877
851
  allowOpenDQuote = self.allowOpenDQuote.isChecked()
@@ -891,15 +865,14 @@ class GuiPreferencesSyntax(QWidget):
891
865
  return
892
866
 
893
867
  ##
894
- # Slots
868
+ # Private Slots
895
869
  ##
896
870
 
897
- def _toggleHighlightQuotes(self, theState):
898
- """Enables or disables switches controlled by the highlight
899
- quotes switch.
900
- """
901
- self.allowOpenSQuote.setEnabled(theState)
902
- self.allowOpenDQuote.setEnabled(theState)
871
+ @pyqtSlot(bool)
872
+ def _toggleHighlightQuotes(self, state: bool) -> None:
873
+ """Toggle switches controlled by the highlight quotes switch."""
874
+ self.allowOpenSQuote.setEnabled(state)
875
+ self.allowOpenDQuote.setEnabled(state)
903
876
  return
904
877
 
905
878
  # END Class GuiPreferencesSyntax
@@ -907,7 +880,7 @@ class GuiPreferencesSyntax(QWidget):
907
880
 
908
881
  class GuiPreferencesAutomation(QWidget):
909
882
 
910
- def __init__(self, prefsGui):
883
+ def __init__(self, prefsGui: GuiPreferences) -> None:
911
884
  super().__init__(parent=prefsGui)
912
885
 
913
886
  # The Form
@@ -1018,9 +991,8 @@ class GuiPreferencesAutomation(QWidget):
1018
991
 
1019
992
  return
1020
993
 
1021
- def saveValues(self):
1022
- """Save the values set for this tab.
1023
- """
994
+ def saveValues(self) -> None:
995
+ """Save the values set for this tab."""
1024
996
  # Automatic Features
1025
997
  CONFIG.autoSelect = self.autoSelect.isChecked()
1026
998
  CONFIG.doReplace = self.doReplace.isChecked()
@@ -1039,18 +1011,17 @@ class GuiPreferencesAutomation(QWidget):
1039
1011
  return
1040
1012
 
1041
1013
  ##
1042
- # Slots
1014
+ # Private Slots
1043
1015
  ##
1044
1016
 
1045
- def _toggleAutoReplaceMain(self, theState):
1046
- """Enables or disables switches controlled by the main auto
1047
- replace switch.
1048
- """
1049
- self.doReplaceSQuote.setEnabled(theState)
1050
- self.doReplaceDQuote.setEnabled(theState)
1051
- self.doReplaceDash.setEnabled(theState)
1052
- self.doReplaceDots.setEnabled(theState)
1053
- self.fmtPadThin.setEnabled(theState)
1017
+ @pyqtSlot(bool)
1018
+ def _toggleAutoReplaceMain(self, state: bool) -> None:
1019
+ """Toggle switches controlled by the auto replace switch."""
1020
+ self.doReplaceSQuote.setEnabled(state)
1021
+ self.doReplaceDQuote.setEnabled(state)
1022
+ self.doReplaceDash.setEnabled(state)
1023
+ self.doReplaceDots.setEnabled(state)
1024
+ self.fmtPadThin.setEnabled(state)
1054
1025
  return
1055
1026
 
1056
1027
  # END Class GuiPreferencesAutomation
@@ -1058,7 +1029,7 @@ class GuiPreferencesAutomation(QWidget):
1058
1029
 
1059
1030
  class GuiPreferencesQuotes(QWidget):
1060
1031
 
1061
- def __init__(self, prefsGui):
1032
+ def __init__(self, prefsGui: GuiPreferences) -> None:
1062
1033
  super().__init__(parent=prefsGui)
1063
1034
 
1064
1035
  # The Form
@@ -1142,9 +1113,8 @@ class GuiPreferencesQuotes(QWidget):
1142
1113
 
1143
1114
  return
1144
1115
 
1145
- def saveValues(self):
1146
- """Save the values set for this tab.
1147
- """
1116
+ def saveValues(self) -> None:
1117
+ """Save the values set for this tab."""
1148
1118
  # Quotation Style
1149
1119
  CONFIG.fmtSQuoteOpen = self.quoteSym["SO"].text()
1150
1120
  CONFIG.fmtSQuoteClose = self.quoteSym["SC"].text()
@@ -1153,12 +1123,11 @@ class GuiPreferencesQuotes(QWidget):
1153
1123
  return
1154
1124
 
1155
1125
  ##
1156
- # Slots
1126
+ # Internal Functions
1157
1127
  ##
1158
1128
 
1159
- def _getQuote(self, qType):
1160
- """Dialog for single quote open.
1161
- """
1129
+ def _getQuote(self, qType: str) -> None:
1130
+ """Dialog for single quote open."""
1162
1131
  qtBox = GuiQuoteSelect(self, currentQuote=self.quoteSym[qType].text())
1163
1132
  if qtBox.exec_() == QDialog.Accepted:
1164
1133
  self.quoteSym[qType].setText(qtBox.selectedQuote)