novelWriter 2.2rc1__py3-none-any.whl → 2.3b1__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.2rc1.dist-info → novelWriter-2.3b1.dist-info}/METADATA +1 -1
- {novelWriter-2.2rc1.dist-info → novelWriter-2.3b1.dist-info}/RECORD +141 -129
- {novelWriter-2.2rc1.dist-info → novelWriter-2.3b1.dist-info}/WHEEL +1 -1
- novelwriter/__init__.py +11 -6
- novelwriter/assets/i18n/nw_de_DE.qm +0 -0
- novelwriter/assets/i18n/nw_en_US.qm +0 -0
- novelwriter/assets/i18n/nw_es_419.qm +0 -0
- novelwriter/assets/i18n/nw_fr_FR.qm +0 -0
- novelwriter/assets/i18n/nw_it_IT.qm +0 -0
- novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
- novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
- novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
- novelwriter/assets/i18n/project_de_DE.json +1 -0
- novelwriter/assets/i18n/project_en_US.json +1 -0
- novelwriter/assets/i18n/project_es_419.json +11 -0
- novelwriter/assets/i18n/project_fr_FR.json +11 -0
- novelwriter/assets/i18n/project_it_IT.json +11 -0
- novelwriter/assets/i18n/project_ja_JP.json +2 -1
- novelwriter/assets/i18n/project_nb_NO.json +1 -0
- novelwriter/assets/i18n/project_zh_CN.json +11 -0
- novelwriter/assets/icons/typicons_dark/icons.conf +9 -2
- novelwriter/assets/icons/typicons_dark/mixed_import.svg +5 -0
- novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +4 -0
- novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +3 -1
- novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +4 -0
- novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +3 -1
- novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +4 -0
- novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +3 -1
- novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +4 -2
- novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +4 -2
- novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +4 -2
- novelwriter/assets/icons/typicons_dark/typ_document-add-col.svg +8 -0
- novelwriter/assets/icons/typicons_dark/typ_document-add.svg +4 -0
- novelwriter/assets/icons/typicons_dark/typ_document.svg +4 -0
- novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +4 -0
- novelwriter/assets/icons/typicons_light/icons.conf +9 -2
- novelwriter/assets/icons/typicons_light/mixed_import.svg +5 -0
- novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +4 -0
- novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +3 -1
- novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +4 -0
- novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +3 -1
- novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +4 -0
- novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +3 -1
- novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +4 -2
- novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +4 -2
- novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +4 -2
- novelwriter/assets/icons/typicons_light/typ_document-add-col.svg +8 -0
- novelwriter/assets/icons/typicons_light/typ_document-add.svg +4 -0
- novelwriter/assets/icons/typicons_light/typ_document.svg +4 -0
- novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +4 -0
- novelwriter/assets/images/novelwriter-text-dark.svg +4 -0
- novelwriter/assets/images/novelwriter-text-light.svg +4 -0
- novelwriter/assets/images/welcome-dark.jpg +0 -0
- novelwriter/assets/images/welcome-light.jpg +0 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/assets/syntax/default_dark.conf +1 -0
- novelwriter/assets/syntax/default_light.conf +1 -0
- novelwriter/assets/syntax/grey_dark.conf +1 -0
- novelwriter/assets/syntax/grey_light.conf +1 -0
- novelwriter/assets/syntax/light_owl.conf +1 -0
- novelwriter/assets/syntax/night_owl.conf +1 -0
- novelwriter/assets/syntax/solarized_dark.conf +1 -0
- novelwriter/assets/syntax/solarized_light.conf +1 -0
- novelwriter/assets/syntax/tomorrow.conf +1 -0
- novelwriter/assets/syntax/tomorrow_night.conf +1 -0
- novelwriter/assets/syntax/tomorrow_night_blue.conf +1 -0
- novelwriter/assets/syntax/tomorrow_night_bright.conf +1 -0
- novelwriter/assets/syntax/tomorrow_night_eighties.conf +1 -0
- novelwriter/assets/text/credits_en.htm +4 -2
- novelwriter/assets/themes/default_dark.conf +2 -2
- novelwriter/assets/themes/default_light.conf +2 -2
- novelwriter/common.py +64 -66
- novelwriter/config.py +39 -44
- novelwriter/constants.py +39 -17
- novelwriter/core/buildsettings.py +8 -8
- novelwriter/core/coretools.py +194 -155
- novelwriter/core/docbuild.py +7 -4
- novelwriter/core/document.py +7 -7
- novelwriter/core/index.py +90 -57
- novelwriter/core/item.py +23 -5
- novelwriter/core/options.py +11 -10
- novelwriter/core/project.py +72 -47
- novelwriter/core/projectdata.py +3 -16
- novelwriter/core/projectxml.py +14 -42
- novelwriter/core/sessions.py +4 -3
- novelwriter/core/spellcheck.py +6 -4
- novelwriter/core/status.py +5 -4
- novelwriter/core/storage.py +179 -141
- novelwriter/core/tohtml.py +6 -4
- novelwriter/core/tokenizer.py +74 -46
- novelwriter/core/tomd.py +2 -2
- novelwriter/core/toodt.py +41 -31
- novelwriter/core/tree.py +5 -4
- novelwriter/dialogs/about.py +88 -179
- novelwriter/dialogs/docmerge.py +30 -20
- novelwriter/dialogs/docsplit.py +33 -22
- novelwriter/dialogs/editlabel.py +20 -8
- novelwriter/dialogs/preferences.py +562 -725
- novelwriter/dialogs/{projsettings.py → projectsettings.py} +301 -270
- novelwriter/dialogs/quotes.py +47 -36
- novelwriter/dialogs/wordlist.py +128 -59
- novelwriter/enum.py +25 -22
- novelwriter/error.py +2 -2
- novelwriter/extensions/circularprogress.py +12 -12
- novelwriter/extensions/configlayout.py +185 -146
- novelwriter/extensions/{wheeleventfilter.py → eventfilters.py} +15 -5
- novelwriter/extensions/modified.py +81 -0
- novelwriter/extensions/novelselector.py +27 -13
- novelwriter/extensions/pagedsidebar.py +15 -20
- novelwriter/extensions/simpleprogress.py +8 -9
- novelwriter/extensions/statusled.py +9 -9
- novelwriter/extensions/switch.py +32 -64
- novelwriter/extensions/switchbox.py +2 -7
- novelwriter/extensions/versioninfo.py +153 -0
- novelwriter/gui/doceditor.py +250 -214
- novelwriter/gui/dochighlight.py +66 -94
- novelwriter/gui/docviewer.py +71 -98
- novelwriter/gui/docviewerpanel.py +140 -47
- novelwriter/gui/editordocument.py +3 -3
- novelwriter/gui/itemdetails.py +9 -9
- novelwriter/gui/mainmenu.py +47 -46
- novelwriter/gui/noveltree.py +53 -61
- novelwriter/gui/outline.py +100 -76
- novelwriter/gui/projtree.py +193 -67
- novelwriter/gui/sidebar.py +9 -8
- novelwriter/gui/statusbar.py +49 -7
- novelwriter/gui/theme.py +65 -74
- novelwriter/guimain.py +173 -330
- novelwriter/shared.py +68 -30
- novelwriter/tools/dictionaries.py +7 -8
- novelwriter/tools/lipsum.py +34 -28
- novelwriter/tools/manusbuild.py +3 -4
- novelwriter/tools/manuscript.py +25 -32
- novelwriter/tools/manussettings.py +194 -225
- novelwriter/tools/noveldetails.py +525 -0
- novelwriter/tools/welcome.py +802 -0
- novelwriter/tools/writingstats.py +26 -13
- novelwriter/assets/icons/typicons_dark/nw_tb-markdown.svg +0 -8
- novelwriter/assets/icons/typicons_dark/nw_tb-shortcode.svg +0 -8
- novelwriter/assets/icons/typicons_light/nw_tb-markdown.svg +0 -8
- novelwriter/assets/icons/typicons_light/nw_tb-shortcode.svg +0 -8
- novelwriter/assets/images/wizard-back.jpg +0 -0
- novelwriter/assets/text/gplv3_en.htm +0 -641
- novelwriter/assets/text/release_notes.htm +0 -17
- novelwriter/dialogs/projdetails.py +0 -525
- novelwriter/dialogs/projload.py +0 -298
- novelwriter/dialogs/updates.py +0 -182
- novelwriter/extensions/pageddialog.py +0 -130
- novelwriter/tools/projwizard.py +0 -478
- {novelWriter-2.2rc1.dist-info → novelWriter-2.3b1.dist-info}/LICENSE.md +0 -0
- {novelWriter-2.2rc1.dist-info → novelWriter-2.3b1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.2rc1.dist-info → novelWriter-2.3b1.dist-info}/top_level.txt +0 -0
@@ -3,10 +3,10 @@ novelWriter – GUI Writing Statistics
|
|
3
3
|
====================================
|
4
4
|
|
5
5
|
File History:
|
6
|
-
Created: 2019-10-20 [0.3]
|
6
|
+
Created: 2019-10-20 [0.3.0] GuiWritingStats
|
7
7
|
|
8
8
|
This file is a part of novelWriter
|
9
|
-
Copyright 2018–
|
9
|
+
Copyright 2018–2024, Veronica Berglyd Olsen
|
10
10
|
|
11
11
|
This program is free software: you can redistribute it and/or modify
|
12
12
|
it under the terms of the GNU General Public License as published by
|
@@ -29,7 +29,7 @@ import logging
|
|
29
29
|
from datetime import datetime
|
30
30
|
from typing import TYPE_CHECKING
|
31
31
|
|
32
|
-
from PyQt5.QtGui import QPixmap, QCursor
|
32
|
+
from PyQt5.QtGui import QCloseEvent, QPixmap, QCursor
|
33
33
|
from PyQt5.QtCore import Qt, pyqtSlot
|
34
34
|
from PyQt5.QtWidgets import (
|
35
35
|
qApp, QDialog, QTreeWidget, QTreeWidgetItem, QDialogButtonBox, QGridLayout,
|
@@ -193,37 +193,37 @@ class GuiWritingStats(QDialog):
|
|
193
193
|
self.filterForm = QGridLayout(self)
|
194
194
|
self.filterBox.setLayout(self.filterForm)
|
195
195
|
|
196
|
-
self.incNovel = NSwitch(
|
196
|
+
self.incNovel = NSwitch(self, height=sPx)
|
197
197
|
self.incNovel.setChecked(
|
198
198
|
pOptions.getBool("GuiWritingStats", "incNovel", True)
|
199
199
|
)
|
200
200
|
self.incNovel.clicked.connect(self._updateListBox)
|
201
201
|
|
202
|
-
self.incNotes = NSwitch(
|
202
|
+
self.incNotes = NSwitch(self, height=sPx)
|
203
203
|
self.incNotes.setChecked(
|
204
204
|
pOptions.getBool("GuiWritingStats", "incNotes", True)
|
205
205
|
)
|
206
206
|
self.incNotes.clicked.connect(self._updateListBox)
|
207
207
|
|
208
|
-
self.hideZeros = NSwitch(
|
208
|
+
self.hideZeros = NSwitch(self, height=sPx)
|
209
209
|
self.hideZeros.setChecked(
|
210
210
|
pOptions.getBool("GuiWritingStats", "hideZeros", True)
|
211
211
|
)
|
212
212
|
self.hideZeros.clicked.connect(self._updateListBox)
|
213
213
|
|
214
|
-
self.hideNegative = NSwitch(
|
214
|
+
self.hideNegative = NSwitch(self, height=sPx)
|
215
215
|
self.hideNegative.setChecked(
|
216
216
|
pOptions.getBool("GuiWritingStats", "hideNegative", False)
|
217
217
|
)
|
218
218
|
self.hideNegative.clicked.connect(self._updateListBox)
|
219
219
|
|
220
|
-
self.groupByDay = NSwitch(
|
220
|
+
self.groupByDay = NSwitch(self, height=sPx)
|
221
221
|
self.groupByDay.setChecked(
|
222
222
|
pOptions.getBool("GuiWritingStats", "groupByDay", False)
|
223
223
|
)
|
224
224
|
self.groupByDay.clicked.connect(self._updateListBox)
|
225
225
|
|
226
|
-
self.showIdleTime = NSwitch(
|
226
|
+
self.showIdleTime = NSwitch(self, height=sPx)
|
227
227
|
self.showIdleTime.setChecked(
|
228
228
|
pOptions.getBool("GuiWritingStats", "showIdleTime", False)
|
229
229
|
)
|
@@ -307,9 +307,20 @@ class GuiWritingStats(QDialog):
|
|
307
307
|
return
|
308
308
|
|
309
309
|
##
|
310
|
-
#
|
310
|
+
# Events
|
311
311
|
##
|
312
312
|
|
313
|
+
def closeEvent(self, event: QCloseEvent) -> None:
|
314
|
+
"""Capture the user closing the window."""
|
315
|
+
event.accept()
|
316
|
+
self.deleteLater()
|
317
|
+
return
|
318
|
+
|
319
|
+
##
|
320
|
+
# Private Slots
|
321
|
+
##
|
322
|
+
|
323
|
+
@pyqtSlot()
|
313
324
|
def _doClose(self) -> None:
|
314
325
|
"""Save the state of the window, clear cache, end close."""
|
315
326
|
self.logData = []
|
@@ -330,6 +341,7 @@ class GuiWritingStats(QDialog):
|
|
330
341
|
showIdleTime = self.showIdleTime.isChecked()
|
331
342
|
histMax = self.histMax.value()
|
332
343
|
|
344
|
+
logger.debug("Saving State: GuiWritingStats")
|
333
345
|
pOptions = SHARED.project.options
|
334
346
|
pOptions.setValue("GuiWritingStats", "winWidth", winWidth)
|
335
347
|
pOptions.setValue("GuiWritingStats", "winHeight", winHeight)
|
@@ -347,6 +359,7 @@ class GuiWritingStats(QDialog):
|
|
347
359
|
pOptions.setValue("GuiWritingStats", "showIdleTime", showIdleTime)
|
348
360
|
pOptions.setValue("GuiWritingStats", "histMax", histMax)
|
349
361
|
pOptions.saveSettings()
|
362
|
+
|
350
363
|
self.close()
|
351
364
|
|
352
365
|
return
|
@@ -368,7 +381,7 @@ class GuiWritingStats(QDialog):
|
|
368
381
|
# Generate the file name
|
369
382
|
savePath = CONFIG.lastPath() / f"sessionStats.{fileExt}"
|
370
383
|
savePath, _ = QFileDialog.getSaveFileName(
|
371
|
-
self, self.tr("Save Data As"), str(savePath), "
|
384
|
+
self, self.tr("Save Data As"), str(savePath), f"{textFmt} (*.{fileExt})"
|
372
385
|
)
|
373
386
|
if not savePath:
|
374
387
|
return False
|
@@ -572,13 +585,13 @@ class GuiWritingStats(QDialog):
|
|
572
585
|
newItem.setText(self.C_COUNT, f"{nWords:n}")
|
573
586
|
|
574
587
|
if nWords > 0 and listMax > 0:
|
575
|
-
|
588
|
+
wBar = self.barImage.scaled(
|
576
589
|
int(200*min(nWords, histMax)/listMax),
|
577
590
|
self.barHeight,
|
578
591
|
Qt.IgnoreAspectRatio,
|
579
592
|
Qt.FastTransformation
|
580
593
|
)
|
581
|
-
newItem.setData(self.C_BAR, Qt.DecorationRole,
|
594
|
+
newItem.setData(self.C_BAR, Qt.DecorationRole, wBar)
|
582
595
|
|
583
596
|
newItem.setTextAlignment(self.C_LENGTH, Qt.AlignRight)
|
584
597
|
newItem.setTextAlignment(self.C_IDLE, Qt.AlignRight)
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">
|
3
|
-
<g fill="#aeaeae" stroke-width="1.1">
|
4
|
-
<path d="m0.79397 2.8846-0.29357-0.21175 0.28393-0.5005-0.51975-0.23582 0.11068-0.3465 0.55825 0.1155 0.062562-0.56787h0.37057l0.062562 0.57268 0.55343-0.12032 0.1155 0.3465-0.51975 0.23582 0.28393 0.5005-0.29356 0.21175-0.385-0.42832z"/>
|
5
|
-
<path d="m2.8219 3.15-0.09999 0.37496h0.86866l-0.09374-0.37496q-0.08749-0.30622-0.16873-0.64993-0.081241-0.34372-0.16248-0.66243h-0.024997q-0.074992 0.32496-0.15623 0.66868-0.074992 0.33747-0.16248 0.64369zm-1.4749 2.0623 1.2749-4.0746h1.1062l1.2749 4.0746h-0.97489l-0.24997-0.96865h-1.2437l-0.24997 0.96865z"/>
|
6
|
-
<path d="m4.7812 2.8846-0.29357-0.21175 0.28394-0.5005-0.51975-0.23582 0.11069-0.3465 0.55825 0.1155 0.062562-0.56787h0.37056l0.062562 0.57268 0.55343-0.12032 0.1155 0.3465-0.51975 0.23582 0.28393 0.5005-0.29356 0.21175-0.385-0.42832z"/>
|
7
|
-
</g>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">
|
3
|
-
<g fill="#aeaeae" stroke-width="1.3799">
|
4
|
-
<path d="m0.52917 5.2683v-4.1866h1.0272v0.37972h-0.49167v3.4272h0.49167v0.37972z"/>
|
5
|
-
<path d="m2.9 2.9219-0.077889 0.29209h0.67667l-0.073022-0.29209q-0.068154-0.23854-0.13144-0.50628-0.063285-0.26775-0.12657-0.51601h-0.019472q-0.058417 0.25314-0.1217 0.52088-0.058417 0.26288-0.12657 0.50141zm-1.1489 1.6065 0.9931-3.174h0.86166l0.9931 3.174h-0.75942l-0.19472-0.75455h-0.96876l-0.19472 0.75455z"/>
|
6
|
-
<path d="m4.7937 5.2683v-0.37972h0.49654v-3.4272h-0.49654v-0.37972h1.0272v4.1866z"/>
|
7
|
-
</g>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">
|
3
|
-
<g fill-opacity=".78039" stroke-width="1.1">
|
4
|
-
<path d="m0.79397 2.8846-0.29357-0.21175 0.28393-0.5005-0.51975-0.23582 0.11068-0.3465 0.55825 0.1155 0.062562-0.56787h0.37057l0.062562 0.57268 0.55343-0.12032 0.1155 0.3465-0.51975 0.23582 0.28393 0.5005-0.29356 0.21175-0.385-0.42832z"/>
|
5
|
-
<path d="m2.8219 3.15-0.09999 0.37496h0.86866l-0.09374-0.37496q-0.08749-0.30622-0.16873-0.64993-0.081241-0.34372-0.16248-0.66243h-0.024997q-0.074992 0.32496-0.15623 0.66868-0.074992 0.33747-0.16248 0.64369zm-1.4749 2.0623 1.2749-4.0746h1.1062l1.2749 4.0746h-0.97489l-0.24997-0.96865h-1.2437l-0.24997 0.96865z"/>
|
6
|
-
<path d="m4.7812 2.8846-0.29357-0.21175 0.28394-0.5005-0.51975-0.23582 0.11069-0.3465 0.55825 0.1155 0.062562-0.56787h0.37056l0.062562 0.57268 0.55343-0.12032 0.1155 0.3465-0.51975 0.23582 0.28393 0.5005-0.29356 0.21175-0.385-0.42832z"/>
|
7
|
-
</g>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">
|
3
|
-
<g fill-opacity=".78039" stroke-width="1.3799">
|
4
|
-
<path d="m0.52917 5.2683v-4.1866h1.0272v0.37972h-0.49167v3.4272h0.49167v0.37972z"/>
|
5
|
-
<path d="m2.9 2.9219-0.077889 0.29209h0.67667l-0.073022-0.29209q-0.068154-0.23854-0.13144-0.50628-0.063285-0.26775-0.12657-0.51601h-0.019472q-0.058417 0.25314-0.1217 0.52088-0.058417 0.26288-0.12657 0.50141zm-1.1489 1.6065 0.9931-3.174h0.86166l0.9931 3.174h-0.75942l-0.19472-0.75455h-0.96876l-0.19472 0.75455z"/>
|
6
|
-
<path d="m4.7937 5.2683v-0.37972h0.49654v-3.4272h-0.49654v-0.37972h1.0272v4.1866z"/>
|
7
|
-
</g>
|
8
|
-
</svg>
|
Binary file
|