Add a basic model for the novel view

This commit is contained in:
Veronica Berglyd Olsen
2025-02-22 20:12:50 +01:00
parent bc26d2250e
commit 9a63a84fc1
7 changed files with 497 additions and 343 deletions
+5
View File
@@ -31,6 +31,7 @@ import logging
from collections.abc import ItemsView, Sequence
from typing import TYPE_CHECKING, Literal
from novelwriter import CONFIG
from novelwriter.common import checkInt, isListInstance, isTitleTag
from novelwriter.constants import nwKeyWords, nwStyles
@@ -237,6 +238,10 @@ class IndexHeading:
def title(self) -> str:
return self._title
@property
def mainCount(self) -> int:
return self._counts[0 if CONFIG.useCharCount else 1]
@property
def charCount(self) -> int:
return self._counts[0]