novelWriter 2.4b1__py3-none-any.whl → 2.4rc1__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.
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/METADATA +5 -6
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/RECORD +62 -66
- novelwriter/__init__.py +5 -5
- novelwriter/assets/icons/none.svg +4 -0
- novelwriter/assets/icons/typicons_dark/icons.conf +2 -2
- novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +4 -0
- novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +4 -0
- novelwriter/assets/icons/typicons_light/icons.conf +2 -2
- novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +4 -0
- novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +4 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/common.py +6 -1
- novelwriter/config.py +8 -4
- novelwriter/core/coretools.py +21 -22
- novelwriter/core/status.py +3 -2
- novelwriter/core/toodt.py +332 -355
- novelwriter/dialogs/about.py +9 -11
- novelwriter/dialogs/docmerge.py +17 -14
- novelwriter/dialogs/docsplit.py +14 -12
- novelwriter/dialogs/editlabel.py +5 -4
- novelwriter/dialogs/preferences.py +28 -33
- novelwriter/dialogs/projectsettings.py +29 -26
- novelwriter/dialogs/quotes.py +10 -9
- novelwriter/dialogs/wordlist.py +15 -12
- novelwriter/error.py +13 -11
- novelwriter/extensions/circularprogress.py +12 -8
- novelwriter/extensions/configlayout.py +1 -3
- novelwriter/extensions/modified.py +33 -2
- novelwriter/extensions/pagedsidebar.py +16 -14
- novelwriter/extensions/simpleprogress.py +3 -1
- novelwriter/extensions/statusled.py +3 -1
- novelwriter/extensions/switch.py +10 -9
- novelwriter/extensions/switchbox.py +14 -13
- novelwriter/gui/doceditor.py +182 -225
- novelwriter/gui/dochighlight.py +4 -4
- novelwriter/gui/docviewer.py +53 -57
- novelwriter/gui/docviewerpanel.py +16 -13
- novelwriter/gui/editordocument.py +4 -4
- novelwriter/gui/itemdetails.py +45 -48
- novelwriter/gui/noveltree.py +22 -20
- novelwriter/gui/outline.py +87 -88
- novelwriter/gui/projtree.py +31 -29
- novelwriter/gui/search.py +75 -29
- novelwriter/gui/sidebar.py +24 -28
- novelwriter/gui/statusbar.py +14 -14
- novelwriter/gui/theme.py +47 -35
- novelwriter/guimain.py +35 -31
- novelwriter/shared.py +5 -5
- novelwriter/tools/dictionaries.py +13 -12
- novelwriter/tools/lipsum.py +20 -17
- novelwriter/tools/manusbuild.py +35 -27
- novelwriter/tools/manuscript.py +68 -73
- novelwriter/tools/manussettings.py +68 -73
- novelwriter/tools/noveldetails.py +20 -18
- novelwriter/tools/welcome.py +47 -43
- novelwriter/tools/writingstats.py +61 -55
- novelwriter/types.py +90 -0
- novelwriter/assets/icons/typicons_dark/typ_arrow-down.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-right.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-down.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-right.svg +0 -4
- novelwriter/core/__init__.py +0 -3
- novelwriter/dialogs/__init__.py +0 -3
- novelwriter/extensions/__init__.py +0 -3
- novelwriter/gui/__init__.py +0 -3
- novelwriter/text/__init__.py +0 -3
- novelwriter/tools/__init__.py +0 -3
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/LICENSE.md +0 -0
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/WHEEL +0 -0
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.4b1.dist-info → novelWriter-2.4rc1.dist-info}/top_level.txt +0 -0
novelwriter/tools/manuscript.py
CHANGED
@@ -26,19 +26,19 @@ from __future__ import annotations
|
|
26
26
|
import json
|
27
27
|
import logging
|
28
28
|
|
29
|
+
from datetime import datetime
|
29
30
|
from time import time
|
30
31
|
from typing import TYPE_CHECKING
|
31
|
-
from datetime import datetime
|
32
32
|
|
33
|
+
from PyQt5.QtCore import QTimer, QUrl, Qt, pyqtSignal, pyqtSlot
|
33
34
|
from PyQt5.QtGui import QCloseEvent, QColor, QCursor, QFont, QPalette, QResizeEvent
|
34
|
-
from PyQt5.
|
35
|
+
from PyQt5.QtPrintSupport import QPrintPreviewDialog, QPrinter
|
35
36
|
from PyQt5.QtWidgets import (
|
36
|
-
QAbstractItemView, QDialog, QFormLayout, QGridLayout,
|
37
|
-
|
38
|
-
|
39
|
-
QVBoxLayout, QWidget
|
37
|
+
QAbstractItemView, QApplication, QDialog, QFormLayout, QGridLayout,
|
38
|
+
QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QPushButton,
|
39
|
+
QSizePolicy, QSplitter, QStackedWidget, QTabWidget, QTextBrowser,
|
40
|
+
QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
|
40
41
|
)
|
41
|
-
from PyQt5.QtPrintSupport import QPrintPreviewDialog, QPrinter
|
42
42
|
|
43
43
|
from novelwriter import CONFIG, SHARED
|
44
44
|
from novelwriter.common import checkInt, fuzzyTime
|
@@ -48,10 +48,14 @@ from novelwriter.core.tohtml import ToHtml
|
|
48
48
|
from novelwriter.core.tokenizer import HeadingFormatter
|
49
49
|
from novelwriter.error import logException
|
50
50
|
from novelwriter.extensions.circularprogress import NProgressCircle
|
51
|
-
from novelwriter.extensions.modified import NIconToolButton
|
51
|
+
from novelwriter.extensions.modified import NIconToggleButton, NIconToolButton
|
52
52
|
from novelwriter.gui.theme import STYLES_FLAT_TABS, STYLES_MIN_TOOLBUTTON
|
53
53
|
from novelwriter.tools.manusbuild import GuiManuscriptBuild
|
54
54
|
from novelwriter.tools.manussettings import GuiBuildSettings
|
55
|
+
from novelwriter.types import (
|
56
|
+
QtAlignAbsolute, QtAlignCenter, QtAlignJustify, QtAlignRight, QtAlignTop,
|
57
|
+
QtUserRole
|
58
|
+
)
|
55
59
|
|
56
60
|
if TYPE_CHECKING: # pragma: no cover
|
57
61
|
from novelwriter.guimain import GuiMain
|
@@ -67,7 +71,7 @@ class GuiManuscript(QDialog):
|
|
67
71
|
a document directly to disk.
|
68
72
|
"""
|
69
73
|
|
70
|
-
D_KEY =
|
74
|
+
D_KEY = QtUserRole
|
71
75
|
|
72
76
|
def __init__(self, mainGui: GuiMain) -> None:
|
73
77
|
super().__init__(parent=mainGui)
|
@@ -86,7 +90,7 @@ class GuiManuscript(QDialog):
|
|
86
90
|
self.setMinimumWidth(CONFIG.pxInt(600))
|
87
91
|
self.setMinimumHeight(CONFIG.pxInt(500))
|
88
92
|
|
89
|
-
|
93
|
+
iSz = SHARED.theme.baseIconSize
|
90
94
|
wWin = CONFIG.pxInt(900)
|
91
95
|
hWin = CONFIG.pxInt(600)
|
92
96
|
|
@@ -100,30 +104,27 @@ class GuiManuscript(QDialog):
|
|
100
104
|
# ==============
|
101
105
|
|
102
106
|
qPalette = self.palette()
|
103
|
-
qPalette.setBrush(QPalette.Window, qPalette.base())
|
107
|
+
qPalette.setBrush(QPalette.ColorRole.Window, qPalette.base())
|
104
108
|
self.setPalette(qPalette)
|
105
109
|
|
106
110
|
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
|
107
111
|
|
108
|
-
self.tbAdd = NIconToolButton(self,
|
109
|
-
self.tbAdd.setIcon(SHARED.theme.getIcon("add"))
|
112
|
+
self.tbAdd = NIconToolButton(self, iSz, "add")
|
110
113
|
self.tbAdd.setToolTip(self.tr("Add New Build"))
|
111
114
|
self.tbAdd.setStyleSheet(buttonStyle)
|
112
115
|
self.tbAdd.clicked.connect(self._createNewBuild)
|
113
116
|
|
114
|
-
self.tbDel = NIconToolButton(self,
|
115
|
-
self.tbDel.setIcon(SHARED.theme.getIcon("remove"))
|
117
|
+
self.tbDel = NIconToolButton(self, iSz, "remove")
|
116
118
|
self.tbDel.setToolTip(self.tr("Delete Selected Build"))
|
117
119
|
self.tbDel.setStyleSheet(buttonStyle)
|
118
120
|
self.tbDel.clicked.connect(self._deleteSelectedBuild)
|
119
121
|
|
120
|
-
self.tbEdit = NIconToolButton(self,
|
121
|
-
self.tbEdit.setIcon(SHARED.theme.getIcon("edit"))
|
122
|
+
self.tbEdit = NIconToolButton(self, iSz, "edit")
|
122
123
|
self.tbEdit.setToolTip(self.tr("Edit Selected Build"))
|
123
124
|
self.tbEdit.setStyleSheet(buttonStyle)
|
124
125
|
self.tbEdit.clicked.connect(self._editSelectedBuild)
|
125
126
|
|
126
|
-
self.lblBuilds = QLabel("<b>{0}</b>".format(self.tr("Builds")))
|
127
|
+
self.lblBuilds = QLabel("<b>{0}</b>".format(self.tr("Builds")), self)
|
127
128
|
|
128
129
|
self.listToolBox = QHBoxLayout()
|
129
130
|
self.listToolBox.addWidget(self.lblBuilds)
|
@@ -137,11 +138,11 @@ class GuiManuscript(QDialog):
|
|
137
138
|
# ======
|
138
139
|
|
139
140
|
self.buildList = QListWidget(self)
|
140
|
-
self.buildList.setIconSize(
|
141
|
+
self.buildList.setIconSize(iSz)
|
141
142
|
self.buildList.doubleClicked.connect(self._editSelectedBuild)
|
142
143
|
self.buildList.currentItemChanged.connect(self._updateBuildDetails)
|
143
|
-
self.buildList.setSelectionMode(QAbstractItemView.SingleSelection)
|
144
|
-
self.buildList.setDragDropMode(QAbstractItemView.InternalMove)
|
144
|
+
self.buildList.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection)
|
145
|
+
self.buildList.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
|
145
146
|
|
146
147
|
# Details Tabs
|
147
148
|
# ============
|
@@ -169,16 +170,16 @@ class GuiManuscript(QDialog):
|
|
169
170
|
# Process Controls
|
170
171
|
# ================
|
171
172
|
|
172
|
-
self.btnPreview = QPushButton(self.tr("Preview"))
|
173
|
+
self.btnPreview = QPushButton(self.tr("Preview"), self)
|
173
174
|
self.btnPreview.clicked.connect(self._generatePreview)
|
174
175
|
|
175
|
-
self.btnPrint = QPushButton(self.tr("Print"))
|
176
|
+
self.btnPrint = QPushButton(self.tr("Print"), self)
|
176
177
|
self.btnPrint.clicked.connect(self._printDocument)
|
177
178
|
|
178
|
-
self.btnBuild = QPushButton(self.tr("Build"))
|
179
|
+
self.btnBuild = QPushButton(self.tr("Build"), self)
|
179
180
|
self.btnBuild.clicked.connect(self._buildManuscript)
|
180
181
|
|
181
|
-
self.btnClose = QPushButton(self.tr("Close"))
|
182
|
+
self.btnClose = QPushButton(self.tr("Close"), self)
|
182
183
|
self.btnClose.clicked.connect(self.close)
|
183
184
|
|
184
185
|
self.processBox = QGridLayout()
|
@@ -210,7 +211,7 @@ class GuiManuscript(QDialog):
|
|
210
211
|
self.optsWidget = QWidget(self)
|
211
212
|
self.optsWidget.setLayout(self.controlBox)
|
212
213
|
|
213
|
-
self.mainSplit = QSplitter()
|
214
|
+
self.mainSplit = QSplitter(self)
|
214
215
|
self.mainSplit.addWidget(self.optsWidget)
|
215
216
|
self.mainSplit.addWidget(self.docWdiget)
|
216
217
|
self.mainSplit.setCollapsible(0, False)
|
@@ -352,7 +353,7 @@ class GuiManuscript(QDialog):
|
|
352
353
|
self.docPreview.beginNewBuild(len(docBuild))
|
353
354
|
for step, _ in docBuild.iterBuildHTML(None):
|
354
355
|
self.docPreview.buildStep(step + 1)
|
355
|
-
|
356
|
+
QApplication.processEvents()
|
356
357
|
|
357
358
|
buildObj = docBuild.lastBuild
|
358
359
|
assert isinstance(buildObj, ToHtml)
|
@@ -385,7 +386,7 @@ class GuiManuscript(QDialog):
|
|
385
386
|
build = self._getSelectedBuild()
|
386
387
|
if isinstance(build, BuildSettings):
|
387
388
|
dlgBuild = GuiManuscriptBuild(self, build)
|
388
|
-
dlgBuild.
|
389
|
+
dlgBuild.exec()
|
389
390
|
|
390
391
|
# After the build is done, save build settings changes
|
391
392
|
if build.changed:
|
@@ -398,7 +399,7 @@ class GuiManuscript(QDialog):
|
|
398
399
|
"""Open the print preview dialog."""
|
399
400
|
preview = QPrintPreviewDialog(self)
|
400
401
|
preview.paintRequested.connect(self.docPreview.printPreview)
|
401
|
-
preview.
|
402
|
+
preview.exec()
|
402
403
|
return
|
403
404
|
|
404
405
|
##
|
@@ -486,7 +487,7 @@ class GuiManuscript(QDialog):
|
|
486
487
|
dlgSettings.setModal(False)
|
487
488
|
dlgSettings.show()
|
488
489
|
dlgSettings.raise_()
|
489
|
-
|
490
|
+
QApplication.processEvents()
|
490
491
|
dlgSettings.loadContent()
|
491
492
|
dlgSettings.newSettingsReady.connect(self._processNewSettings)
|
492
493
|
|
@@ -526,7 +527,7 @@ class _DetailsWidget(QWidget):
|
|
526
527
|
# Tree Widget
|
527
528
|
self.listView = QTreeWidget(self)
|
528
529
|
self.listView.setHeaderLabels([self.tr("Setting"), self.tr("Value")])
|
529
|
-
self.listView.setIndentation(SHARED.theme.
|
530
|
+
self.listView.setIndentation(SHARED.theme.baseIconHeight)
|
530
531
|
self.listView.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection)
|
531
532
|
|
532
533
|
# Assemble
|
@@ -661,7 +662,7 @@ class _DetailsWidget(QWidget):
|
|
661
662
|
|
662
663
|
class _OutlineWidget(QWidget):
|
663
664
|
|
664
|
-
D_LINE =
|
665
|
+
D_LINE = QtUserRole
|
665
666
|
|
666
667
|
outlineEntryClicked = pyqtSignal(str)
|
667
668
|
|
@@ -721,7 +722,9 @@ class _OutlineWidget(QWidget):
|
|
721
722
|
parent.addChild(item)
|
722
723
|
indent = True
|
723
724
|
|
724
|
-
self.listView.setIndentation(
|
725
|
+
self.listView.setIndentation(
|
726
|
+
SHARED.theme.baseIconHeight if indent else CONFIG.pxInt(4)
|
727
|
+
)
|
725
728
|
self._outline = data
|
726
729
|
|
727
730
|
return
|
@@ -748,8 +751,8 @@ class _PreviewWidget(QTextBrowser):
|
|
748
751
|
|
749
752
|
# Document Setup
|
750
753
|
dPalette = self.palette()
|
751
|
-
dPalette.setColor(QPalette.Base, QColor(255, 255, 255))
|
752
|
-
dPalette.setColor(QPalette.Text, QColor(0, 0, 0))
|
754
|
+
dPalette.setColor(QPalette.ColorRole.Base, QColor(255, 255, 255))
|
755
|
+
dPalette.setColor(QPalette.ColorRole.Text, QColor(0, 0, 0))
|
753
756
|
self.setPalette(dPalette)
|
754
757
|
|
755
758
|
self.setMinimumWidth(40*SHARED.theme.textNWidth)
|
@@ -766,8 +769,8 @@ class _PreviewWidget(QTextBrowser):
|
|
766
769
|
|
767
770
|
# Document Age
|
768
771
|
aPalette = self.palette()
|
769
|
-
aPalette.setColor(QPalette.
|
770
|
-
aPalette.setColor(QPalette.
|
772
|
+
aPalette.setColor(QPalette.ColorRole.Window, aPalette.toolTipBase().color())
|
773
|
+
aPalette.setColor(QPalette.ColorRole.WindowText, aPalette.toolTipText().color())
|
771
774
|
|
772
775
|
aFont = self.font()
|
773
776
|
aFont.setPointSizeF(0.9*SHARED.theme.fontPointSize)
|
@@ -777,7 +780,7 @@ class _PreviewWidget(QTextBrowser):
|
|
777
780
|
self.ageLabel.setFont(aFont)
|
778
781
|
self.ageLabel.setPalette(aPalette)
|
779
782
|
self.ageLabel.setAutoFillBackground(True)
|
780
|
-
self.ageLabel.setAlignment(
|
783
|
+
self.ageLabel.setAlignment(QtAlignCenter)
|
781
784
|
self.ageLabel.setFixedHeight(int(2.1*SHARED.theme.fontPixelSize))
|
782
785
|
|
783
786
|
# Progress
|
@@ -816,9 +819,9 @@ class _PreviewWidget(QTextBrowser):
|
|
816
819
|
"""Enable/disable the justify text option."""
|
817
820
|
pOptions = self.document().defaultTextOption()
|
818
821
|
if state:
|
819
|
-
pOptions.setAlignment(
|
822
|
+
pOptions.setAlignment(QtAlignJustify)
|
820
823
|
else:
|
821
|
-
pOptions.setAlignment(
|
824
|
+
pOptions.setAlignment(QtAlignAbsolute)
|
822
825
|
self.document().setDefaultTextOption(pOptions)
|
823
826
|
return
|
824
827
|
|
@@ -848,16 +851,16 @@ class _PreviewWidget(QTextBrowser):
|
|
848
851
|
def buildStep(self, value: int) -> None:
|
849
852
|
"""Update the progress bar value."""
|
850
853
|
self.buildProgress.setValue(value)
|
851
|
-
|
854
|
+
QApplication.processEvents()
|
852
855
|
return
|
853
856
|
|
854
857
|
def setContent(self, data: dict) -> None:
|
855
858
|
"""Set the content of the preview widget."""
|
856
859
|
sPos = self.verticalScrollBar().value()
|
857
|
-
|
860
|
+
QApplication.setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor))
|
858
861
|
|
859
862
|
self.buildProgress.setCentreText(self.tr("Processing ..."))
|
860
|
-
|
863
|
+
QApplication.processEvents()
|
861
864
|
|
862
865
|
styles = "\n".join(data.get("styles", []))
|
863
866
|
self.document().setDefaultStyleSheet(styles)
|
@@ -865,7 +868,7 @@ class _PreviewWidget(QTextBrowser):
|
|
865
868
|
html = "".join(data.get("html", []))
|
866
869
|
html = html.replace("\t", "!!tab!!")
|
867
870
|
self.setHtml(html)
|
868
|
-
|
871
|
+
QApplication.processEvents()
|
869
872
|
while self.find("!!tab!!"):
|
870
873
|
cursor = self.textCursor()
|
871
874
|
cursor.insertText("\t")
|
@@ -879,8 +882,8 @@ class _PreviewWidget(QTextBrowser):
|
|
879
882
|
self.document().markContentsDirty(0, self.document().characterCount())
|
880
883
|
|
881
884
|
self.buildProgress.setCentreText(self.tr("Done"))
|
882
|
-
|
883
|
-
|
885
|
+
QApplication.restoreOverrideCursor()
|
886
|
+
QApplication.processEvents()
|
884
887
|
QTimer.singleShot(300, self._hideProgress)
|
885
888
|
|
886
889
|
return
|
@@ -902,10 +905,10 @@ class _PreviewWidget(QTextBrowser):
|
|
902
905
|
@pyqtSlot("QPrinter*")
|
903
906
|
def printPreview(self, printer: QPrinter) -> None:
|
904
907
|
"""Connect the print preview painter to the document viewer."""
|
905
|
-
|
906
|
-
printer.setOrientation(QPrinter.Portrait)
|
908
|
+
QApplication.setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor))
|
909
|
+
printer.setOrientation(QPrinter.Orientation.Portrait)
|
907
910
|
self.document().print(printer)
|
908
|
-
|
911
|
+
QApplication.restoreOverrideCursor()
|
909
912
|
return
|
910
913
|
|
911
914
|
@pyqtSlot(str)
|
@@ -976,13 +979,7 @@ class _StatsWidget(QWidget):
|
|
976
979
|
self.minWidget = QWidget(self)
|
977
980
|
self.maxWidget = QWidget(self)
|
978
981
|
|
979
|
-
|
980
|
-
toggleIcon = SHARED.theme.getToggleIcon("unfold", (iPx, iPx))
|
981
|
-
|
982
|
-
self.toggleButton = NIconToolButton(self, iPx)
|
983
|
-
self.toggleButton.setCheckable(True)
|
984
|
-
self.toggleButton.setIcon(toggleIcon)
|
985
|
-
self.toggleButton.setStyleSheet(SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON))
|
982
|
+
self.toggleButton = NIconToggleButton(self, SHARED.theme.baseIconSize, "unfold")
|
986
983
|
self.toggleButton.toggled.connect(self._toggleView)
|
987
984
|
|
988
985
|
self._buildMinimal()
|
@@ -993,8 +990,8 @@ class _StatsWidget(QWidget):
|
|
993
990
|
self.mainStack.addWidget(self.maxWidget)
|
994
991
|
|
995
992
|
self.outerBox = QHBoxLayout()
|
996
|
-
self.outerBox.addWidget(self.toggleButton, 0,
|
997
|
-
self.outerBox.addWidget(self.mainStack, 1,
|
993
|
+
self.outerBox.addWidget(self.toggleButton, 0, QtAlignTop)
|
994
|
+
self.outerBox.addWidget(self.mainStack, 1, QtAlignTop)
|
998
995
|
self.outerBox.setContentsMargins(0, 0, 0, 0)
|
999
996
|
|
1000
997
|
self.setLayout(self.outerBox)
|
@@ -1057,10 +1054,10 @@ class _StatsWidget(QWidget):
|
|
1057
1054
|
"""Build the minimal stats page."""
|
1058
1055
|
mPx = CONFIG.pxInt(8)
|
1059
1056
|
|
1060
|
-
self.lblWordCount = QLabel(self.tr("Words"))
|
1057
|
+
self.lblWordCount = QLabel(self.tr("Words"), self)
|
1061
1058
|
self.minWordCount = QLabel(self)
|
1062
1059
|
|
1063
|
-
self.lblCharCount = QLabel(self.tr("Characters"))
|
1060
|
+
self.lblCharCount = QLabel(self.tr("Characters"), self)
|
1064
1061
|
self.minCharCount = QLabel(self)
|
1065
1062
|
|
1066
1063
|
# Assemble
|
@@ -1083,8 +1080,6 @@ class _StatsWidget(QWidget):
|
|
1083
1080
|
hPx = CONFIG.pxInt(12)
|
1084
1081
|
vPx = CONFIG.pxInt(4)
|
1085
1082
|
|
1086
|
-
alignRight = Qt.AlignmentFlag.AlignRight
|
1087
|
-
|
1088
1083
|
# Left Column
|
1089
1084
|
self.maxTotalWords = QLabel(self)
|
1090
1085
|
self.maxHeaderWords = QLabel(self)
|
@@ -1092,11 +1087,11 @@ class _StatsWidget(QWidget):
|
|
1092
1087
|
self.maxTitleCount = QLabel(self)
|
1093
1088
|
self.maxParCount = QLabel(self)
|
1094
1089
|
|
1095
|
-
self.maxTotalWords.setAlignment(
|
1096
|
-
self.maxHeaderWords.setAlignment(
|
1097
|
-
self.maxTextWords.setAlignment(
|
1098
|
-
self.maxTitleCount.setAlignment(
|
1099
|
-
self.maxParCount.setAlignment(
|
1090
|
+
self.maxTotalWords.setAlignment(QtAlignRight)
|
1091
|
+
self.maxHeaderWords.setAlignment(QtAlignRight)
|
1092
|
+
self.maxTextWords.setAlignment(QtAlignRight)
|
1093
|
+
self.maxTitleCount.setAlignment(QtAlignRight)
|
1094
|
+
self.maxParCount.setAlignment(QtAlignRight)
|
1100
1095
|
|
1101
1096
|
self.leftForm = QFormLayout()
|
1102
1097
|
self.leftForm.addRow(self.tr("Words"), self.maxTotalWords)
|
@@ -1117,13 +1112,13 @@ class _StatsWidget(QWidget):
|
|
1117
1112
|
self.maxHeaderWordChars = QLabel(self)
|
1118
1113
|
self.maxTextWordChars = QLabel(self)
|
1119
1114
|
|
1120
|
-
self.maxTotalChars.setAlignment(
|
1121
|
-
self.maxHeaderChars.setAlignment(
|
1122
|
-
self.maxTextChars.setAlignment(
|
1115
|
+
self.maxTotalChars.setAlignment(QtAlignRight)
|
1116
|
+
self.maxHeaderChars.setAlignment(QtAlignRight)
|
1117
|
+
self.maxTextChars.setAlignment(QtAlignRight)
|
1123
1118
|
|
1124
|
-
self.maxTotalWordChars.setAlignment(
|
1125
|
-
self.maxHeaderWordChars.setAlignment(
|
1126
|
-
self.maxTextWordChars.setAlignment(
|
1119
|
+
self.maxTotalWordChars.setAlignment(QtAlignRight)
|
1120
|
+
self.maxHeaderWordChars.setAlignment(QtAlignRight)
|
1121
|
+
self.maxTextWordChars.setAlignment(QtAlignRight)
|
1127
1122
|
|
1128
1123
|
self.rightForm = QFormLayout()
|
1129
1124
|
self.rightForm.addRow(self.tr("Characters"), self.maxTotalChars)
|