novelWriter 2.6.3__py3-none-any.whl → 2.7__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/__init__.py +98 -75
- novelwriter/assets/i18n/nw_cs_CZ.qm +0 -0
- 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_nl_NL.qm +0 -0
- novelwriter/assets/i18n/nw_pl_PL.qm +0 -0
- novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
- novelwriter/assets/i18n/nw_ru_RU.qm +0 -0
- novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
- novelwriter/assets/i18n/project_de_DE.json +3 -1
- novelwriter/assets/i18n/project_en_GB.json +2 -0
- novelwriter/assets/i18n/project_en_US.json +2 -0
- novelwriter/assets/i18n/project_it_IT.json +2 -0
- novelwriter/assets/i18n/project_ja_JP.json +2 -0
- novelwriter/assets/i18n/project_nb_NO.json +2 -0
- novelwriter/assets/i18n/project_nn_NO.json +5 -0
- novelwriter/assets/i18n/project_pl_PL.json +2 -0
- novelwriter/assets/i18n/project_pt_BR.json +2 -0
- novelwriter/assets/i18n/project_ru_RU.json +2 -0
- novelwriter/assets/i18n/project_zh_CN.json +2 -0
- novelwriter/assets/icons/font_awesome.icons +109 -0
- novelwriter/assets/icons/material_filled_bold.icons +109 -0
- novelwriter/assets/icons/material_filled_normal.icons +109 -0
- novelwriter/assets/icons/material_filled_thin.icons +109 -0
- novelwriter/assets/icons/material_rounded_bold.icons +109 -0
- novelwriter/assets/icons/material_rounded_normal.icons +109 -0
- novelwriter/assets/icons/material_rounded_thin.icons +109 -0
- novelwriter/assets/icons/remix_filled.icons +109 -0
- novelwriter/assets/icons/remix_outline.icons +109 -0
- novelwriter/assets/images/splash.png +0 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/{manual_fr_FR.pdf → manual_fr.pdf} +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/assets/syntax/cyberpunk_night.conf +1 -1
- novelwriter/assets/syntax/snazzy.conf +3 -3
- novelwriter/assets/text/credits_en.htm +12 -6
- novelwriter/assets/themes/cyberpunk_night.conf +23 -7
- novelwriter/assets/themes/default_dark.conf +20 -4
- novelwriter/assets/themes/default_light.conf +21 -5
- novelwriter/assets/themes/dracula.conf +20 -4
- novelwriter/assets/themes/snazzy.conf +48 -0
- novelwriter/assets/themes/solarized_dark.conf +24 -8
- novelwriter/assets/themes/solarized_light.conf +22 -6
- novelwriter/common.py +43 -27
- novelwriter/config.py +201 -139
- novelwriter/constants.py +67 -36
- novelwriter/core/buildsettings.py +26 -17
- novelwriter/core/coretools.py +52 -41
- novelwriter/core/docbuild.py +20 -13
- novelwriter/core/document.py +2 -2
- novelwriter/core/index.py +166 -432
- novelwriter/core/indexdata.py +406 -0
- novelwriter/core/item.py +50 -32
- novelwriter/core/itemmodel.py +43 -38
- novelwriter/core/novelmodel.py +225 -0
- novelwriter/core/options.py +1 -1
- novelwriter/core/project.py +24 -25
- novelwriter/core/projectdata.py +47 -29
- novelwriter/core/projectxml.py +18 -8
- novelwriter/core/sessions.py +32 -15
- novelwriter/core/spellcheck.py +4 -3
- novelwriter/core/status.py +12 -15
- novelwriter/core/storage.py +1 -1
- novelwriter/core/tree.py +55 -13
- novelwriter/dialogs/about.py +19 -22
- novelwriter/dialogs/docmerge.py +23 -24
- novelwriter/dialogs/docsplit.py +26 -26
- novelwriter/dialogs/editlabel.py +19 -20
- novelwriter/dialogs/preferences.py +143 -69
- novelwriter/dialogs/projectsettings.py +51 -54
- novelwriter/dialogs/quotes.py +14 -19
- novelwriter/dialogs/wordlist.py +25 -30
- novelwriter/enum.py +8 -0
- novelwriter/error.py +16 -16
- novelwriter/extensions/configlayout.py +24 -20
- novelwriter/extensions/eventfilters.py +9 -5
- novelwriter/extensions/modified.py +34 -15
- novelwriter/extensions/novelselector.py +18 -5
- novelwriter/extensions/pagedsidebar.py +39 -49
- novelwriter/extensions/progressbars.py +10 -8
- novelwriter/extensions/statusled.py +6 -13
- novelwriter/extensions/switch.py +31 -41
- novelwriter/extensions/switchbox.py +8 -3
- novelwriter/extensions/versioninfo.py +4 -4
- novelwriter/formats/shared.py +1 -1
- novelwriter/formats/todocx.py +14 -10
- novelwriter/formats/tohtml.py +7 -5
- novelwriter/formats/tokenizer.py +37 -33
- novelwriter/formats/tomarkdown.py +6 -2
- novelwriter/formats/toodt.py +27 -22
- novelwriter/formats/toqdoc.py +19 -14
- novelwriter/formats/toraw.py +6 -2
- novelwriter/gui/doceditor.py +314 -305
- novelwriter/gui/dochighlight.py +46 -45
- novelwriter/gui/docviewer.py +102 -104
- novelwriter/gui/docviewerpanel.py +47 -51
- novelwriter/gui/editordocument.py +8 -5
- novelwriter/gui/itemdetails.py +11 -14
- novelwriter/gui/mainmenu.py +146 -145
- novelwriter/gui/noveltree.py +246 -406
- novelwriter/gui/outline.py +141 -72
- novelwriter/gui/projtree.py +139 -132
- novelwriter/gui/search.py +34 -31
- novelwriter/gui/sidebar.py +13 -18
- novelwriter/gui/statusbar.py +27 -21
- novelwriter/gui/theme.py +554 -436
- novelwriter/guimain.py +56 -38
- novelwriter/shared.py +32 -23
- novelwriter/splash.py +74 -0
- novelwriter/text/comments.py +70 -0
- novelwriter/text/patterns.py +4 -4
- novelwriter/tools/dictionaries.py +20 -29
- novelwriter/tools/lipsum.py +18 -18
- novelwriter/tools/manusbuild.py +39 -42
- novelwriter/tools/manuscript.py +102 -115
- novelwriter/tools/manussettings.py +129 -102
- novelwriter/tools/noveldetails.py +60 -72
- novelwriter/tools/welcome.py +57 -75
- novelwriter/tools/writingstats.py +112 -102
- novelwriter/types.py +5 -7
- {novelWriter-2.6.3.dist-info → novelwriter-2.7.dist-info}/METADATA +6 -6
- novelwriter-2.7.dist-info/RECORD +162 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7.dist-info}/WHEEL +1 -1
- novelWriter-2.6.3.dist-info/RECORD +0 -363
- novelwriter/assets/icons/typicons_dark/README.md +0 -29
- novelwriter/assets/icons/typicons_dark/icons.conf +0 -134
- novelwriter/assets/icons/typicons_dark/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_dark/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-text.svg +0 -8
- novelwriter/assets/icons/typicons_dark/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_dark/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_warning-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/README.md +0 -29
- novelwriter/assets/icons/typicons_light/icons.conf +0 -134
- novelwriter/assets/icons/typicons_light/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_light/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-text.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_light/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_warning-full.svg +0 -4
- {novelWriter-2.6.3.dist-info → novelwriter-2.7.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7.dist-info/licenses}/LICENSE.md +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7.dist-info}/top_level.txt +0 -0
novelwriter/tools/manuscript.py
CHANGED
@@ -28,13 +28,13 @@ import logging
|
|
28
28
|
from time import time
|
29
29
|
from typing import TYPE_CHECKING
|
30
30
|
|
31
|
-
from
|
32
|
-
from
|
33
|
-
QCloseEvent, QColor, QCursor, QDesktopServices, QFont,
|
34
|
-
QResizeEvent, QTextDocument
|
31
|
+
from PyQt6.QtCore import Qt, QTimer, QUrl, pyqtSignal, pyqtSlot
|
32
|
+
from PyQt6.QtGui import (
|
33
|
+
QCloseEvent, QColor, QCursor, QDesktopServices, QFont, QPageLayout,
|
34
|
+
QPalette, QResizeEvent, QTextDocument
|
35
35
|
)
|
36
|
-
from
|
37
|
-
from
|
36
|
+
from PyQt6.QtPrintSupport import QPrinter, QPrintPreviewDialog
|
37
|
+
from PyQt6.QtWidgets import (
|
38
38
|
QAbstractItemView, QApplication, QFormLayout, QGridLayout, QHBoxLayout,
|
39
39
|
QLabel, QListWidget, QListWidgetItem, QPushButton, QSplitter,
|
40
40
|
QStackedWidget, QTabWidget, QTextBrowser, QTreeWidget, QTreeWidgetItem,
|
@@ -42,7 +42,7 @@ from PyQt5.QtWidgets import (
|
|
42
42
|
)
|
43
43
|
|
44
44
|
from novelwriter import CONFIG, SHARED
|
45
|
-
from novelwriter.common import fuzzyTime
|
45
|
+
from novelwriter.common import fuzzyTime, qtLambda
|
46
46
|
from novelwriter.constants import nwLabels, nwStats, trStats
|
47
47
|
from novelwriter.core.buildsettings import BuildCollection, BuildSettings
|
48
48
|
from novelwriter.core.docbuild import NWBuildDocument
|
@@ -59,7 +59,7 @@ from novelwriter.types import (
|
|
59
59
|
QtUserRole
|
60
60
|
)
|
61
61
|
|
62
|
-
if TYPE_CHECKING:
|
62
|
+
if TYPE_CHECKING:
|
63
63
|
from novelwriter.guimain import GuiMain
|
64
64
|
|
65
65
|
logger = logging.getLogger(__name__)
|
@@ -85,18 +85,16 @@ class GuiManuscript(NToolDialog):
|
|
85
85
|
self._buildMap: dict[str, QListWidgetItem] = {}
|
86
86
|
|
87
87
|
self.setWindowTitle(self.tr("Build Manuscript"))
|
88
|
-
self.setMinimumWidth(
|
89
|
-
self.setMinimumHeight(
|
88
|
+
self.setMinimumWidth(600)
|
89
|
+
self.setMinimumHeight(500)
|
90
90
|
|
91
91
|
iPx = SHARED.theme.baseIconHeight
|
92
92
|
iSz = SHARED.theme.baseIconSize
|
93
|
-
wWin = CONFIG.pxInt(900)
|
94
|
-
hWin = CONFIG.pxInt(600)
|
95
93
|
|
96
94
|
pOptions = SHARED.project.options
|
97
95
|
self.resize(
|
98
|
-
|
99
|
-
|
96
|
+
pOptions.getInt("GuiManuscript", "winWidth", 900),
|
97
|
+
pOptions.getInt("GuiManuscript", "winHeight", 600),
|
100
98
|
)
|
101
99
|
|
102
100
|
# Build Controls
|
@@ -108,22 +106,22 @@ class GuiManuscript(NToolDialog):
|
|
108
106
|
|
109
107
|
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
|
110
108
|
|
111
|
-
self.tbAdd = NIconToolButton(self, iSz, "add")
|
109
|
+
self.tbAdd = NIconToolButton(self, iSz, "add", "green")
|
112
110
|
self.tbAdd.setToolTip(self.tr("Add New Build"))
|
113
111
|
self.tbAdd.setStyleSheet(buttonStyle)
|
114
112
|
self.tbAdd.clicked.connect(self._createNewBuild)
|
115
113
|
|
116
|
-
self.tbDel = NIconToolButton(self, iSz, "remove")
|
114
|
+
self.tbDel = NIconToolButton(self, iSz, "remove", "red")
|
117
115
|
self.tbDel.setToolTip(self.tr("Delete Selected Build"))
|
118
116
|
self.tbDel.setStyleSheet(buttonStyle)
|
119
117
|
self.tbDel.clicked.connect(self._deleteSelectedBuild)
|
120
118
|
|
121
|
-
self.tbCopy = NIconToolButton(self, iSz, "copy")
|
119
|
+
self.tbCopy = NIconToolButton(self, iSz, "copy", "blue")
|
122
120
|
self.tbCopy.setToolTip(self.tr("Duplicate Selected Build"))
|
123
121
|
self.tbCopy.setStyleSheet(buttonStyle)
|
124
122
|
self.tbCopy.clicked.connect(self._copySelectedBuild)
|
125
123
|
|
126
|
-
self.tbEdit = NIconToolButton(self, iSz, "edit")
|
124
|
+
self.tbEdit = NIconToolButton(self, iSz, "edit", "green")
|
127
125
|
self.tbEdit.setToolTip(self.tr("Edit Selected Build"))
|
128
126
|
self.tbEdit.setStyleSheet(buttonStyle)
|
129
127
|
self.tbEdit.clicked.connect(self._editSelectedBuild)
|
@@ -153,9 +151,7 @@ class GuiManuscript(NToolDialog):
|
|
153
151
|
# ============
|
154
152
|
|
155
153
|
self.buildDetails = _DetailsWidget(self)
|
156
|
-
self.buildDetails.setColumnWidth(
|
157
|
-
CONFIG.pxInt(pOptions.getInt("GuiManuscript", "detailsWidth", 100)),
|
158
|
-
)
|
154
|
+
self.buildDetails.setColumnWidth(pOptions.getInt("GuiManuscript", "detailsWidth", 100))
|
159
155
|
|
160
156
|
self.buildOutline = _OutlineWidget(self)
|
161
157
|
|
@@ -168,8 +164,8 @@ class GuiManuscript(NToolDialog):
|
|
168
164
|
self.buildSplit.addWidget(self.buildList)
|
169
165
|
self.buildSplit.addWidget(self.detailsTabs)
|
170
166
|
self.buildSplit.setSizes([
|
171
|
-
|
172
|
-
|
167
|
+
pOptions.getInt("GuiManuscript", "listHeight", 50),
|
168
|
+
pOptions.getInt("GuiManuscript", "detailsHeight", 50),
|
173
169
|
])
|
174
170
|
|
175
171
|
# Process Controls
|
@@ -185,7 +181,7 @@ class GuiManuscript(NToolDialog):
|
|
185
181
|
self.btnBuild.clicked.connect(self._buildManuscript)
|
186
182
|
|
187
183
|
self.btnClose = QPushButton(self.tr("Close"), self)
|
188
|
-
self.btnClose.clicked.connect(self.close)
|
184
|
+
self.btnClose.clicked.connect(qtLambda(self.close))
|
189
185
|
|
190
186
|
self.processBox = QGridLayout()
|
191
187
|
self.processBox.addWidget(self.btnPreview, 0, 0)
|
@@ -240,8 +236,8 @@ class GuiManuscript(NToolDialog):
|
|
240
236
|
self.mainSplit.setStretchFactor(0, 0)
|
241
237
|
self.mainSplit.setStretchFactor(1, 1)
|
242
238
|
self.mainSplit.setSizes([
|
243
|
-
|
244
|
-
|
239
|
+
pOptions.getInt("GuiManuscript", "optsWidth", 225),
|
240
|
+
pOptions.getInt("GuiManuscript", "viewWidth", 675),
|
245
241
|
])
|
246
242
|
|
247
243
|
self.outerBox = QVBoxLayout()
|
@@ -337,7 +333,7 @@ class GuiManuscript(NToolDialog):
|
|
337
333
|
def _deleteSelectedBuild(self) -> None:
|
338
334
|
"""Delete the currently selected build settings entry."""
|
339
335
|
if build := self._getSelectedBuild():
|
340
|
-
if SHARED.question(self.tr("Delete build '{0}'?".format(build.name))
|
336
|
+
if SHARED.question(self.tr("Delete build '{0}'?").format(build.name)):
|
341
337
|
if dialog := self._findSettingsDialog(build.buildID):
|
342
338
|
dialog.close()
|
343
339
|
self._builds.removeBuild(build.buildID)
|
@@ -431,38 +427,30 @@ class GuiManuscript(NToolDialog):
|
|
431
427
|
|
432
428
|
def _saveSettings(self) -> None:
|
433
429
|
"""Save the user GUI settings."""
|
434
|
-
buildOrder = [
|
435
|
-
|
436
|
-
if item := self.buildList.item(i)
|
437
|
-
|
430
|
+
buildOrder = [
|
431
|
+
item.data(self.D_KEY) for i in range(self.buildList.count())
|
432
|
+
if (item := self.buildList.item(i))
|
433
|
+
]
|
438
434
|
|
439
435
|
current = self.buildList.currentItem()
|
440
436
|
lastBuild = current.data(self.D_KEY) if isinstance(current, QListWidgetItem) else ""
|
441
437
|
|
442
438
|
self._builds.setBuildsState(lastBuild, buildOrder)
|
443
439
|
|
444
|
-
winWidth = CONFIG.rpxInt(self.width())
|
445
|
-
winHeight = CONFIG.rpxInt(self.height())
|
446
|
-
|
447
440
|
mainSplit = self.mainSplit.sizes()
|
448
|
-
optsWidth = CONFIG.rpxInt(mainSplit[0])
|
449
|
-
viewWidth = CONFIG.rpxInt(mainSplit[1])
|
450
|
-
|
451
441
|
buildSplit = self.buildSplit.sizes()
|
452
|
-
|
453
|
-
detailsHeight = CONFIG.rpxInt(buildSplit[1])
|
454
|
-
detailsWidth = CONFIG.rpxInt(self.buildDetails.getColumnWidth())
|
442
|
+
detailsWidth = self.buildDetails.getColumnWidth()
|
455
443
|
detailsExpanded = self.buildDetails.getExpandedState()
|
456
444
|
showNewPage = self.swtNewPage.isChecked()
|
457
445
|
|
458
446
|
logger.debug("Saving State: GuiManuscript")
|
459
447
|
pOptions = SHARED.project.options
|
460
|
-
pOptions.setValue("GuiManuscript", "winWidth",
|
461
|
-
pOptions.setValue("GuiManuscript", "winHeight",
|
462
|
-
pOptions.setValue("GuiManuscript", "optsWidth",
|
463
|
-
pOptions.setValue("GuiManuscript", "viewWidth",
|
464
|
-
pOptions.setValue("GuiManuscript", "listHeight",
|
465
|
-
pOptions.setValue("GuiManuscript", "detailsHeight",
|
448
|
+
pOptions.setValue("GuiManuscript", "winWidth", self.width())
|
449
|
+
pOptions.setValue("GuiManuscript", "winHeight", self.height())
|
450
|
+
pOptions.setValue("GuiManuscript", "optsWidth", mainSplit[0])
|
451
|
+
pOptions.setValue("GuiManuscript", "viewWidth", mainSplit[1])
|
452
|
+
pOptions.setValue("GuiManuscript", "listHeight", buildSplit[0])
|
453
|
+
pOptions.setValue("GuiManuscript", "detailsHeight", buildSplit[1])
|
466
454
|
pOptions.setValue("GuiManuscript", "detailsWidth", detailsWidth)
|
467
455
|
pOptions.setValue("GuiManuscript", "detailsExpanded", detailsExpanded)
|
468
456
|
pOptions.setValue("GuiManuscript", "showNewPage", showNewPage)
|
@@ -490,7 +478,7 @@ class GuiManuscript(NToolDialog):
|
|
490
478
|
for key, name in self._builds.builds():
|
491
479
|
bItem = QListWidgetItem()
|
492
480
|
bItem.setText(name)
|
493
|
-
bItem.setIcon(SHARED.theme.getIcon("
|
481
|
+
bItem.setIcon(SHARED.theme.getIcon("build_settings", "blue"))
|
494
482
|
bItem.setData(self.D_KEY, key)
|
495
483
|
self.buildList.addItem(bItem)
|
496
484
|
self._buildMap[key] = bItem
|
@@ -585,8 +573,8 @@ class _DetailsWidget(QWidget):
|
|
585
573
|
|
586
574
|
self.listView.clear()
|
587
575
|
|
588
|
-
on = SHARED.theme.getIcon("bullet-on")
|
589
|
-
off = SHARED.theme.getIcon("bullet-off")
|
576
|
+
on = SHARED.theme.getIcon("bullet-on", "blue")
|
577
|
+
off = SHARED.theme.getIcon("bullet-off", "blue")
|
590
578
|
|
591
579
|
# Name
|
592
580
|
item = QTreeWidgetItem()
|
@@ -641,8 +629,8 @@ class _DetailsWidget(QWidget):
|
|
641
629
|
item.setText(1, "")
|
642
630
|
self.listView.addTopLevelItem(item)
|
643
631
|
for key in [
|
644
|
-
"text.includeSynopsis", "text.includeComments",
|
645
|
-
"text.includeKeywords", "text.includeBodyText",
|
632
|
+
"text.includeSynopsis", "text.includeComments", "text.includeStory",
|
633
|
+
"text.includeNotes", "text.includeKeywords", "text.includeBodyText",
|
646
634
|
]:
|
647
635
|
sub = QTreeWidgetItem()
|
648
636
|
sub.setText(0, build.getLabel(key))
|
@@ -693,33 +681,31 @@ class _OutlineWidget(QWidget):
|
|
693
681
|
hFont.setBold(True)
|
694
682
|
hFont.setUnderline(True)
|
695
683
|
|
696
|
-
root = self.listView.invisibleRootItem()
|
697
|
-
parent = root
|
698
684
|
indent = False
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
item.
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
)
|
685
|
+
if root := self.listView.invisibleRootItem():
|
686
|
+
parent = root
|
687
|
+
for anchor, entry in data.items():
|
688
|
+
prefix, _, text = entry.partition("|")
|
689
|
+
if prefix in ("TT", "PT", "CH", "SC", "H1", "H2"):
|
690
|
+
item = QTreeWidgetItem([text])
|
691
|
+
item.setData(0, self.D_LINE, anchor)
|
692
|
+
if prefix == "TT":
|
693
|
+
item.setFont(0, tFont)
|
694
|
+
item.setForeground(0, tBrush)
|
695
|
+
root.addChild(item)
|
696
|
+
parent = root
|
697
|
+
elif prefix == "PT":
|
698
|
+
item.setFont(0, hFont)
|
699
|
+
root.addChild(item)
|
700
|
+
parent = root
|
701
|
+
elif prefix in ("CH", "H1"):
|
702
|
+
root.addChild(item)
|
703
|
+
parent = item
|
704
|
+
elif prefix in ("SC", "H2"):
|
705
|
+
parent.addChild(item)
|
706
|
+
indent = True
|
707
|
+
|
708
|
+
self.listView.setIndentation(SHARED.theme.baseIconHeight if indent else 4)
|
723
709
|
self._outline = data
|
724
710
|
|
725
711
|
return
|
@@ -750,13 +736,15 @@ class _PreviewWidget(QTextBrowser):
|
|
750
736
|
self.setPalette(dPalette)
|
751
737
|
|
752
738
|
self.setMinimumWidth(40*SHARED.theme.textNWidth)
|
753
|
-
self.setTabStopDistance(CONFIG.
|
739
|
+
self.setTabStopDistance(CONFIG.tabWidth)
|
754
740
|
self.setOpenExternalLinks(False)
|
755
741
|
self.setOpenLinks(False)
|
756
742
|
|
757
|
-
self.document()
|
743
|
+
if document := self.document():
|
744
|
+
document.setDocumentMargin(CONFIG.textMargin)
|
745
|
+
|
758
746
|
self.setPlaceholderText(self.tr(
|
759
|
-
|
747
|
+
'Press the "Preview" button to generate ...'
|
760
748
|
))
|
761
749
|
|
762
750
|
self.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOn)
|
@@ -781,11 +769,11 @@ class _PreviewWidget(QTextBrowser):
|
|
781
769
|
self.ageLabel.setFixedHeight(int(2.1*SHARED.theme.fontPixelSize))
|
782
770
|
|
783
771
|
# Progress
|
784
|
-
self.buildProgress = NProgressCircle(self,
|
772
|
+
self.buildProgress = NProgressCircle(self, 160, 16)
|
785
773
|
self.buildProgress.setVisible(False)
|
786
774
|
self.buildProgress.setMaximum(1)
|
787
775
|
self.buildProgress.setValue(0)
|
788
|
-
self.buildProgress.
|
776
|
+
self.buildProgress.setColors(
|
789
777
|
back=QColor(255, 255, 255, 224),
|
790
778
|
track=QColor(196, 196, 196, 128),
|
791
779
|
text=QColor(0, 0, 0)
|
@@ -834,7 +822,8 @@ class _PreviewWidget(QTextBrowser):
|
|
834
822
|
self.buildProgress.setValue(0)
|
835
823
|
self.buildProgress.setCentreText(None)
|
836
824
|
self.buildProgress.setVisible(True)
|
837
|
-
|
825
|
+
if vBar := self.verticalScrollBar():
|
826
|
+
self._scrollPos = vBar.value()
|
838
827
|
self.setPlaceholderText("")
|
839
828
|
self.clear()
|
840
829
|
return
|
@@ -852,9 +841,9 @@ class _PreviewWidget(QTextBrowser):
|
|
852
841
|
self.buildProgress.setCentreText(self.tr("Processing ..."))
|
853
842
|
QApplication.processEvents()
|
854
843
|
|
855
|
-
document.setDocumentMargin(CONFIG.
|
844
|
+
document.setDocumentMargin(CONFIG.textMargin)
|
856
845
|
self.setDocument(document)
|
857
|
-
self.setTabStopDistance(CONFIG.
|
846
|
+
self.setTabStopDistance(CONFIG.tabWidth)
|
858
847
|
|
859
848
|
self._docTime = int(time())
|
860
849
|
self._updateBuildAge()
|
@@ -883,10 +872,11 @@ class _PreviewWidget(QTextBrowser):
|
|
883
872
|
@pyqtSlot("QPrinter*")
|
884
873
|
def printPreview(self, printer: QPrinter) -> None:
|
885
874
|
"""Connect the print preview painter to the document viewer."""
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
875
|
+
if document := self.document():
|
876
|
+
QApplication.setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor))
|
877
|
+
printer.setPageOrientation(QPageLayout.Orientation.Portrait)
|
878
|
+
document.print(printer)
|
879
|
+
QApplication.restoreOverrideCursor()
|
890
880
|
return
|
891
881
|
|
892
882
|
@pyqtSlot(str)
|
@@ -928,7 +918,8 @@ class _PreviewWidget(QTextBrowser):
|
|
928
918
|
def _postUpdate(self) -> None:
|
929
919
|
"""Run tasks after content update."""
|
930
920
|
self.buildProgress.setVisible(False)
|
931
|
-
self.verticalScrollBar()
|
921
|
+
if vBar := self.verticalScrollBar():
|
922
|
+
vBar.setValue(self._scrollPos)
|
932
923
|
return
|
933
924
|
|
934
925
|
##
|
@@ -941,7 +932,7 @@ class _PreviewWidget(QTextBrowser):
|
|
941
932
|
"""
|
942
933
|
vBar = self.verticalScrollBar()
|
943
934
|
tB = self.frameWidth()
|
944
|
-
vW = self.width() - 2*tB - vBar.width()
|
935
|
+
vW = self.width() - 2*tB - (vBar.width() if vBar else 0)
|
945
936
|
vH = self.height() - 2*tB
|
946
937
|
tH = self.ageLabel.height()
|
947
938
|
pS = self.buildProgress.width()
|
@@ -986,23 +977,23 @@ class _StatsWidget(QWidget):
|
|
986
977
|
def updateStats(self, data: dict[str, int]) -> None:
|
987
978
|
"""Update the stats values from a Tokenizer stats dict."""
|
988
979
|
# Minimal
|
989
|
-
self.minWordCount.setText("{
|
990
|
-
self.minCharCount.setText("{
|
980
|
+
self.minWordCount.setText(f"{data.get(nwStats.WORDS, 0):n}")
|
981
|
+
self.minCharCount.setText(f"{data.get(nwStats.CHARS, 0):n}")
|
991
982
|
|
992
983
|
# Maximal
|
993
|
-
self.maxTotalWords.setText("{
|
994
|
-
self.maxHeadWords.setText("{
|
995
|
-
self.maxTextWords.setText("{
|
996
|
-
self.maxTitleCount.setText("{
|
997
|
-
self.maxParCount.setText("{
|
984
|
+
self.maxTotalWords.setText(f"{data.get(nwStats.WORDS, 0):n}")
|
985
|
+
self.maxHeadWords.setText(f"{data.get(nwStats.WORDS_TITLE, 0):n}")
|
986
|
+
self.maxTextWords.setText(f"{data.get(nwStats.WORDS_TEXT, 0):n}")
|
987
|
+
self.maxTitleCount.setText(f"{data.get(nwStats.TITLES, 0):n}")
|
988
|
+
self.maxParCount.setText(f"{data.get(nwStats.PARAGRAPHS, 0):n}")
|
998
989
|
|
999
|
-
self.maxTotalChars.setText("{
|
1000
|
-
self.maxHeaderChars.setText("{
|
1001
|
-
self.maxTextChars.setText("{
|
990
|
+
self.maxTotalChars.setText(f"{data.get(nwStats.CHARS, 0):n}")
|
991
|
+
self.maxHeaderChars.setText(f"{data.get(nwStats.CHARS_TITLE, 0):n}")
|
992
|
+
self.maxTextChars.setText(f"{data.get(nwStats.CHARS_TEXT, 0):n}")
|
1002
993
|
|
1003
|
-
self.maxTotalWordChars.setText("{
|
1004
|
-
self.maxHeadWordChars.setText("{
|
1005
|
-
self.maxTextWordChars.setText("{
|
994
|
+
self.maxTotalWordChars.setText(f"{data.get(nwStats.WCHARS_ALL, 0):n}")
|
995
|
+
self.maxHeadWordChars.setText(f"{data.get(nwStats.WCHARS_TITLE, 0):n}")
|
996
|
+
self.maxTextWordChars.setText(f"{data.get(nwStats.WCHARS_TEXT, 0):n}")
|
1006
997
|
|
1007
998
|
return
|
1008
999
|
|
@@ -1033,10 +1024,6 @@ class _StatsWidget(QWidget):
|
|
1033
1024
|
|
1034
1025
|
def _buildBottomPanel(self) -> None:
|
1035
1026
|
"""Build the bottom page."""
|
1036
|
-
mPx = CONFIG.pxInt(8)
|
1037
|
-
hPx = CONFIG.pxInt(12)
|
1038
|
-
vPx = CONFIG.pxInt(4)
|
1039
|
-
|
1040
1027
|
trAllChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS])
|
1041
1028
|
trTextChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS_TEXT])
|
1042
1029
|
trTitleChars = trStats(nwLabels.STATS_NAME[nwStats.CHARS_TITLE])
|
@@ -1073,8 +1060,8 @@ class _StatsWidget(QWidget):
|
|
1073
1060
|
self.leftForm.addRow("", QLabel(self))
|
1074
1061
|
self.leftForm.addRow(trTitleCount, self.maxTitleCount)
|
1075
1062
|
self.leftForm.addRow(trParagraphCount, self.maxParCount)
|
1076
|
-
self.leftForm.setHorizontalSpacing(
|
1077
|
-
self.leftForm.setVerticalSpacing(
|
1063
|
+
self.leftForm.setHorizontalSpacing(12)
|
1064
|
+
self.leftForm.setVerticalSpacing(4)
|
1078
1065
|
|
1079
1066
|
# Maximal Form, Right Column
|
1080
1067
|
self.maxTotalChars = QLabel(self)
|
@@ -1098,25 +1085,25 @@ class _StatsWidget(QWidget):
|
|
1098
1085
|
self.rightForm.addRow(trAllWordChars, self.maxTotalWordChars)
|
1099
1086
|
self.rightForm.addRow(trTitleWordChars, self.maxHeadWordChars)
|
1100
1087
|
self.rightForm.addRow(trTextWordChars, self.maxTextWordChars)
|
1101
|
-
self.rightForm.setHorizontalSpacing(
|
1102
|
-
self.rightForm.setVerticalSpacing(
|
1088
|
+
self.rightForm.setHorizontalSpacing(12)
|
1089
|
+
self.rightForm.setVerticalSpacing(4)
|
1103
1090
|
|
1104
1091
|
# Assemble
|
1105
1092
|
self.minLayout = QHBoxLayout()
|
1106
1093
|
self.minLayout.addWidget(QLabel(trAllWords, self))
|
1107
1094
|
self.minLayout.addWidget(self.minWordCount)
|
1108
|
-
self.minLayout.addSpacing(
|
1095
|
+
self.minLayout.addSpacing(8)
|
1109
1096
|
self.minLayout.addWidget(QLabel(trAllChars, self))
|
1110
1097
|
self.minLayout.addWidget(self.minCharCount)
|
1111
1098
|
self.minLayout.addStretch(1)
|
1112
|
-
self.minLayout.setSpacing(
|
1099
|
+
self.minLayout.setSpacing(8)
|
1113
1100
|
self.minLayout.setContentsMargins(0, 0, 0, 0)
|
1114
1101
|
|
1115
1102
|
self.maxLayout = QHBoxLayout()
|
1116
1103
|
self.maxLayout.addLayout(self.leftForm)
|
1117
1104
|
self.maxLayout.addLayout(self.rightForm)
|
1118
1105
|
self.maxLayout.addStretch(1)
|
1119
|
-
self.maxLayout.setSpacing(
|
1106
|
+
self.maxLayout.setSpacing(32)
|
1120
1107
|
self.maxLayout.setContentsMargins(0, 0, 0, 0)
|
1121
1108
|
|
1122
1109
|
self.minWidget.setLayout(self.minLayout)
|