Merge branch 'main' into dev
This commit is contained in:
+9
-9
@@ -4500,17 +4500,17 @@
|
|||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="573" />
|
<location filename="../novelwriter/tools/manuscript.py" line="571" />
|
||||||
<source>Name</source>
|
<source>Name</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="579" />
|
<location filename="../novelwriter/tools/manuscript.py" line="577" />
|
||||||
<source>Selection</source>
|
<source>Selection</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="595" />
|
<location filename="../novelwriter/tools/manuscript.py" line="593" />
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
@@ -4653,27 +4653,27 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>_PreviewWidget</name>
|
<name>_PreviewWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="659" />
|
<location filename="../novelwriter/tools/manuscript.py" line="657" />
|
||||||
<source>Press the "Build Preview" button to generate ...</source>
|
<source>Press the "Preview" button to generate ...</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="757" />
|
<location filename="../novelwriter/tools/manuscript.py" line="755" />
|
||||||
<source>Processing ...</source>
|
<source>Processing ...</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="786" />
|
<location filename="../novelwriter/tools/manuscript.py" line="784" />
|
||||||
<source>Done</source>
|
<source>Done</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="829" />
|
<location filename="../novelwriter/tools/manuscript.py" line="827" />
|
||||||
<source>Unknown</source>
|
<source>Unknown</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../novelwriter/tools/manuscript.py" line="830" />
|
<location filename="../novelwriter/tools/manuscript.py" line="828" />
|
||||||
<source>Built</source>
|
<source>Built</source>
|
||||||
<translation type="unfinished" />
|
<translation type="unfinished" />
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -655,7 +655,7 @@ class _PreviewWidget(QTextBrowser):
|
|||||||
|
|
||||||
self.document().setDocumentMargin(CONFIG.getTextMargin())
|
self.document().setDocumentMargin(CONFIG.getTextMargin())
|
||||||
self.setPlaceholderText(self.tr(
|
self.setPlaceholderText(self.tr(
|
||||||
"Press the \"Build Preview\" button to generate ..."
|
"Press the \"Preview\" button to generate ..."
|
||||||
))
|
))
|
||||||
|
|
||||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOn)
|
self.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOn)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ from datetime import datetime
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from PyQt5.QtGui import QPixmap, QCursor
|
from PyQt5.QtGui import QPixmap, QCursor
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt, pyqtSlot
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
qApp, QDialog, QTreeWidget, QTreeWidgetItem, QDialogButtonBox, QGridLayout,
|
qApp, QDialog, QTreeWidget, QTreeWidgetItem, QDialogButtonBox, QGridLayout,
|
||||||
QLabel, QGroupBox, QMenu, QAction, QFileDialog, QSpinBox, QHBoxLayout
|
QLabel, QGroupBox, QMenu, QAction, QFileDialog, QSpinBox, QHBoxLayout
|
||||||
@@ -63,7 +63,7 @@ class GuiWritingStats(QDialog):
|
|||||||
FMT_JSON = 0
|
FMT_JSON = 0
|
||||||
FMT_CSV = 1
|
FMT_CSV = 1
|
||||||
|
|
||||||
def __init__(self, mainGui: GuiMain):
|
def __init__(self, mainGui: GuiMain) -> None:
|
||||||
super().__init__(parent=mainGui)
|
super().__init__(parent=mainGui)
|
||||||
|
|
||||||
logger.debug("Create: GuiWritingStats")
|
logger.debug("Create: GuiWritingStats")
|
||||||
@@ -294,11 +294,11 @@ class GuiWritingStats(QDialog):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def __del__(self): # pragma: no cover
|
def __del__(self) -> None: # pragma: no cover
|
||||||
logger.debug("Delete: GuiWritingStats")
|
logger.debug("Delete: GuiWritingStats")
|
||||||
return
|
return
|
||||||
|
|
||||||
def populateGUI(self):
|
def populateGUI(self) -> None:
|
||||||
"""Populate list box with data from the log file."""
|
"""Populate list box with data from the log file."""
|
||||||
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||||
self._loadLogFile()
|
self._loadLogFile()
|
||||||
@@ -310,7 +310,7 @@ class GuiWritingStats(QDialog):
|
|||||||
# Slots
|
# Slots
|
||||||
##
|
##
|
||||||
|
|
||||||
def _doClose(self):
|
def _doClose(self) -> None:
|
||||||
"""Save the state of the window, clear cache, end close."""
|
"""Save the state of the window, clear cache, end close."""
|
||||||
self.logData = []
|
self.logData = []
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ class GuiWritingStats(QDialog):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def _saveData(self, dataFmt):
|
def _saveData(self, dataFmt: int) -> bool:
|
||||||
"""Save the content of the list box to a file."""
|
"""Save the content of the list box to a file."""
|
||||||
fileExt = ""
|
fileExt = ""
|
||||||
textFmt = ""
|
textFmt = ""
|
||||||
@@ -426,7 +426,7 @@ class GuiWritingStats(QDialog):
|
|||||||
# Internal Functions
|
# Internal Functions
|
||||||
##
|
##
|
||||||
|
|
||||||
def _loadLogFile(self):
|
def _loadLogFile(self) -> None:
|
||||||
"""Load the content of the log file into a buffer."""
|
"""Load the content of the log file into a buffer."""
|
||||||
logger.debug("Loading session log file")
|
logger.debug("Loading session log file")
|
||||||
|
|
||||||
@@ -473,10 +473,11 @@ class GuiWritingStats(QDialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
# Slots
|
# Private Slots
|
||||||
##
|
##
|
||||||
|
|
||||||
def _updateListBox(self):
|
@pyqtSlot()
|
||||||
|
def _updateListBox(self) -> None:
|
||||||
"""Load/reload the content of the list box."""
|
"""Load/reload the content of the list box."""
|
||||||
self.listBox.clear()
|
self.listBox.clear()
|
||||||
self.timeFilter = 0.0
|
self.timeFilter = 0.0
|
||||||
@@ -587,16 +588,13 @@ class GuiWritingStats(QDialog):
|
|||||||
newItem.setFont(self.C_TIME, SHARED.theme.guiFontFixed)
|
newItem.setFont(self.C_TIME, SHARED.theme.guiFontFixed)
|
||||||
newItem.setFont(self.C_LENGTH, SHARED.theme.guiFontFixed)
|
newItem.setFont(self.C_LENGTH, SHARED.theme.guiFontFixed)
|
||||||
newItem.setFont(self.C_COUNT, SHARED.theme.guiFontFixed)
|
newItem.setFont(self.C_COUNT, SHARED.theme.guiFontFixed)
|
||||||
if showIdleTime:
|
newItem.setFont(self.C_IDLE, SHARED.theme.guiFontFixed)
|
||||||
newItem.setFont(self.C_IDLE, SHARED.theme.guiFontFixed)
|
|
||||||
else:
|
|
||||||
newItem.setFont(self.C_IDLE, SHARED.theme.guiFont)
|
|
||||||
|
|
||||||
self.listBox.addTopLevelItem(newItem)
|
self.listBox.addTopLevelItem(newItem)
|
||||||
self.timeFilter += sDiff
|
self.timeFilter += sDiff
|
||||||
|
|
||||||
self.labelFilter.setText(formatTime(round(self.timeFilter)))
|
self.labelFilter.setText(formatTime(round(self.timeFilter)))
|
||||||
|
|
||||||
return True
|
return
|
||||||
|
|
||||||
# END Class GuiWritingStats
|
# END Class GuiWritingStats
|
||||||
|
|||||||
Reference in New Issue
Block a user