+5
-2
@@ -4,8 +4,11 @@
|
||||
|
||||
**User Interface**
|
||||
|
||||
* The Export Tool has been removed and replaced by a new tool called "Build Novel Project". The new tool has the same filtering options as the Export Tool, but with more formatting options for titles. It also has a preview window to display the generated document. A Save As button provides exports to HTML, novelWriter Markdown. plain text, PDF and Open Document format. LaTeX export has not been ported over, and interfacing with Pandoc is no longer supported either. Although. as before, the HTML export can be converted with Pandoc still. The new tool also supports printing. PR #204
|
||||
* The Project Settings, Preferences, Item Editor, Merge Documents, and Split Documents dialogs have been redesigned. The ones with tabs, now have vertical tabs on the left with horizontal labels. The dialog design should be more compact, and have room for more tabs for future settings. PR #212
|
||||
* The Export Tool has been removed and replaced by a new tool called "Build Novel Project". The new tool has the same filtering options as the Export Tool, but with more formatting options for titles. It also has a preview window to display the generated document. A Save As button provides exports to HTML, novelWriter Markdown. plain text, PDF and Open Document format. LaTeX export has not been ported over, and interfacing with Pandoc is no longer supported either. Although, as before, the HTML export can be converted with Pandoc to other formats outside of novelWriter. The new tool also supports printing. PR #204
|
||||
* The Project Settings, Preferences, Item Editor, Merge Documents, and Split Documents dialogs have been redesigned. The ones with tabs now have vertical tabs on the left with horizontal labels. The dialog design should be more compact, and have room for more tabs for future settings. PR #212
|
||||
* A new icon, as well as a mimetype icon for the project files, have been designed and added to the app. PRs #213 and #214
|
||||
* The About dialog has been completely redesigned to allow more information. PR #217
|
||||
* The Open Project dialog has been cleaned up and made more readable. The project paths have been moved out of the list, and are now displayed when an item is selected instead. Icons have been added, and the New project dialog can also be triggered from this dialog. PR #218
|
||||
|
||||
## Version 0.5.2 [2020-05-21]
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class GuiDocSplit(QDialog):
|
||||
|
||||
self.headLabel = QLabel("<b>Document Headers</b>")
|
||||
self.helpLabel = QHelpLabel(
|
||||
"Select the maximum level to split into files at.", self.theParent.theTheme.helpText
|
||||
"Select the maximum level to split into files.", self.theParent.theTheme.helpText
|
||||
)
|
||||
|
||||
self.listBox = QListWidget()
|
||||
|
||||
@@ -34,7 +34,7 @@ from PyQt5.QtWidgets import (
|
||||
QDialogButtonBox
|
||||
)
|
||||
|
||||
from nw.gui.additions import QSwitch, QHelpLabel
|
||||
from nw.gui.additions import QSwitch
|
||||
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -59,13 +59,6 @@ class GuiItemEditor(QDialog):
|
||||
self.setWindowTitle("Item Settings")
|
||||
self.setLayout(self.outerBox)
|
||||
|
||||
# Labels
|
||||
self.headLabel = QLabel("<b>Edit Item Settings</b>")
|
||||
self.helpLabel = QHelpLabel(
|
||||
"Item layout and status options depend on the root folder.",
|
||||
self.theParent.theTheme.helpText
|
||||
)
|
||||
|
||||
# Item Label
|
||||
self.editName = QLineEdit()
|
||||
self.editName.setMinimumWidth(220)
|
||||
@@ -132,6 +125,7 @@ class GuiItemEditor(QDialog):
|
||||
# Assemble
|
||||
self.mainForm = QGridLayout()
|
||||
self.mainForm.setVerticalSpacing(4)
|
||||
self.mainForm.setHorizontalSpacing(16)
|
||||
self.mainForm.addWidget(QLabel("Label"), 0, 0, 1, 1)
|
||||
self.mainForm.addWidget(self.editName, 0, 1, 1, 2)
|
||||
self.mainForm.addWidget(QLabel("Status"), 1, 0, 1, 1)
|
||||
@@ -141,19 +135,13 @@ class GuiItemEditor(QDialog):
|
||||
self.mainForm.addWidget(self.textExport, 3, 0, 1, 2)
|
||||
self.mainForm.addWidget(self.editExport, 3, 2, 1, 1)
|
||||
|
||||
self.outerBox.setSpacing(0)
|
||||
self.outerBox.addWidget(self.headLabel)
|
||||
self.outerBox.addWidget(self.helpLabel)
|
||||
self.outerBox.addSpacing(8)
|
||||
self.outerBox.setSpacing(16)
|
||||
self.outerBox.addLayout(self.mainForm)
|
||||
self.outerBox.addSpacing(12)
|
||||
self.outerBox.addStretch(1)
|
||||
self.outerBox.addWidget(self.buttonBox)
|
||||
self.setLayout(self.outerBox)
|
||||
|
||||
self.rejected.connect(self._doClose)
|
||||
self.show()
|
||||
|
||||
self.editName.selectAll()
|
||||
|
||||
logger.debug("GuiItemEditor initialisation complete")
|
||||
|
||||
@@ -51,83 +51,119 @@ class GuiDocDetails(QFrame):
|
||||
self.mainBox.setHorizontalSpacing(6)
|
||||
self.setLayout(self.mainBox)
|
||||
|
||||
self.fntOne = QFont()
|
||||
self.fntOne.setPointSize(10)
|
||||
self.fntOne.setBold(True)
|
||||
self.fntLabel = QFont()
|
||||
self.fntLabel.setPointSize(10)
|
||||
self.fntLabel.setBold(True)
|
||||
|
||||
self.fntTwo = QFont()
|
||||
self.fntTwo.setFamily("Monospace")
|
||||
self.fntTwo.setPointSize(10)
|
||||
self.fntFixed = QFont()
|
||||
self.fntFixed.setFamily("Monospace")
|
||||
self.fntFixed.setPointSize(10)
|
||||
|
||||
self.fntThree = QFont()
|
||||
self.fntThree.setPointSize(10)
|
||||
self.fntValue = QFont()
|
||||
self.fntValue.setPointSize(10)
|
||||
|
||||
# Label
|
||||
self.labelName = QLabel("Label ")
|
||||
self.labelName.setFont(self.fntOne)
|
||||
self.labelName.setFont(self.fntLabel)
|
||||
self.labelName.setAlignment(Qt.AlignLeft | Qt.AlignBaseline)
|
||||
|
||||
self.labelFlag = QLabel("")
|
||||
self.labelFlag.setFont(self.fntTwo)
|
||||
self.labelFlag.setFont(self.fntFixed)
|
||||
self.labelFlag.setAlignment(Qt.AlignRight | Qt.AlignBaseline)
|
||||
|
||||
self.labelData = QLabel("")
|
||||
self.labelData.setFont(self.fntThree)
|
||||
self.labelData.setFont(self.fntValue)
|
||||
self.labelData.setAlignment(Qt.AlignLeft | Qt.AlignBaseline)
|
||||
self.labelData.setWordWrap(True)
|
||||
|
||||
# Status
|
||||
self.statusName = QLabel("Status ")
|
||||
self.statusName.setFont(self.fntOne)
|
||||
self.statusName.setFont(self.fntLabel)
|
||||
self.statusName.setAlignment(Qt.AlignLeft)
|
||||
|
||||
self.statusFlag = QLabel("")
|
||||
self.statusFlag.setFont(self.fntTwo)
|
||||
self.statusFlag.setFont(self.fntFixed)
|
||||
self.statusFlag.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
|
||||
self.statusData = QLabel("")
|
||||
self.statusData.setFont(self.fntThree)
|
||||
self.statusData.setFont(self.fntValue)
|
||||
self.statusData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Class
|
||||
self.className = QLabel("Class ")
|
||||
self.className.setFont(self.fntOne)
|
||||
self.className.setFont(self.fntLabel)
|
||||
self.className.setAlignment(Qt.AlignLeft)
|
||||
|
||||
self.classFlag = QLabel("")
|
||||
self.classFlag.setFont(self.fntTwo)
|
||||
self.classFlag.setFont(self.fntFixed)
|
||||
self.classFlag.setAlignment(Qt.AlignRight)
|
||||
|
||||
self.classData = QLabel("")
|
||||
self.classData.setFont(self.fntThree)
|
||||
self.classData.setFont(self.fntValue)
|
||||
self.classData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Layout
|
||||
self.layoutName = QLabel("Layout ")
|
||||
self.layoutName.setFont(self.fntOne)
|
||||
self.layoutName.setFont(self.fntLabel)
|
||||
self.layoutName.setAlignment(Qt.AlignLeft)
|
||||
|
||||
self.layoutFlag = QLabel("")
|
||||
self.layoutFlag.setFont(self.fntTwo)
|
||||
self.layoutFlag.setFont(self.fntFixed)
|
||||
self.layoutFlag.setAlignment(Qt.AlignRight)
|
||||
|
||||
self.layoutData = QLabel("")
|
||||
self.layoutData.setFont(self.fntThree)
|
||||
self.layoutData.setFont(self.fntValue)
|
||||
self.layoutData.setAlignment(Qt.AlignLeft)
|
||||
|
||||
# Character Count
|
||||
self.cCountName = QLabel(" Characters")
|
||||
self.cCountName.setFont(self.fntLabel)
|
||||
self.cCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
self.cCountData = QLabel("")
|
||||
self.cCountData.setFont(self.fntValue)
|
||||
self.cCountData.setAlignment(Qt.AlignRight)
|
||||
|
||||
# Word Count
|
||||
self.wCountName = QLabel(" Words")
|
||||
self.wCountName.setFont(self.fntLabel)
|
||||
self.wCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
self.wCountData = QLabel("")
|
||||
self.wCountData.setFont(self.fntValue)
|
||||
self.wCountData.setAlignment(Qt.AlignRight)
|
||||
|
||||
# Paragraph Count
|
||||
self.pCountName = QLabel(" Paragraphs")
|
||||
self.pCountName.setFont(self.fntLabel)
|
||||
self.pCountName.setAlignment(Qt.AlignRight)
|
||||
|
||||
self.pCountData = QLabel("")
|
||||
self.pCountData.setFont(self.fntValue)
|
||||
self.pCountData.setAlignment(Qt.AlignRight)
|
||||
|
||||
# Assemble
|
||||
self.mainBox.addWidget(self.labelName, 0, 0)
|
||||
self.mainBox.addWidget(self.statusName, 1, 0)
|
||||
self.mainBox.addWidget(self.className, 2, 0)
|
||||
self.mainBox.addWidget(self.layoutName, 3, 0)
|
||||
self.mainBox.addWidget(self.labelFlag, 0, 1)
|
||||
self.mainBox.addWidget(self.statusFlag, 1, 1)
|
||||
self.mainBox.addWidget(self.classFlag, 2, 1)
|
||||
self.mainBox.addWidget(self.layoutFlag, 3, 1)
|
||||
self.mainBox.addWidget(self.labelData, 0, 2)
|
||||
self.mainBox.addWidget(self.statusData, 1, 2)
|
||||
self.mainBox.addWidget(self.classData, 2, 2)
|
||||
self.mainBox.addWidget(self.layoutData, 3, 2)
|
||||
self.mainBox.addWidget(self.labelName, 0, 0, 1, 1)
|
||||
self.mainBox.addWidget(self.labelFlag, 0, 1, 1, 1)
|
||||
self.mainBox.addWidget(self.labelData, 0, 2, 1, 3)
|
||||
|
||||
self.mainBox.addWidget(self.statusName, 1, 0, 1, 1)
|
||||
self.mainBox.addWidget(self.statusFlag, 1, 1, 1, 1)
|
||||
self.mainBox.addWidget(self.statusData, 1, 2, 1, 1)
|
||||
self.mainBox.addWidget(self.cCountName, 1, 3, 1, 1)
|
||||
self.mainBox.addWidget(self.cCountData, 1, 4, 1, 1)
|
||||
|
||||
self.mainBox.addWidget(self.className, 2, 0, 1, 1)
|
||||
self.mainBox.addWidget(self.classFlag, 2, 1, 1, 1)
|
||||
self.mainBox.addWidget(self.classData, 2, 2, 1, 1)
|
||||
self.mainBox.addWidget(self.wCountName, 2, 3, 1, 1)
|
||||
self.mainBox.addWidget(self.wCountData, 2, 4, 1, 1)
|
||||
|
||||
self.mainBox.addWidget(self.layoutName, 3, 0, 1, 1)
|
||||
self.mainBox.addWidget(self.layoutFlag, 3, 1, 1, 1)
|
||||
self.mainBox.addWidget(self.layoutData, 3, 2, 1, 1)
|
||||
self.mainBox.addWidget(self.pCountName, 3, 3, 1, 1)
|
||||
self.mainBox.addWidget(self.pCountData, 3, 4, 1, 1)
|
||||
|
||||
self.mainBox.setColumnStretch(0,0)
|
||||
self.mainBox.setColumnStretch(1,0)
|
||||
@@ -149,13 +185,16 @@ class GuiDocDetails(QFrame):
|
||||
|
||||
if nwItem is None:
|
||||
self.labelFlag.setText("")
|
||||
self.statusFlag.setText("")
|
||||
self.classFlag.setText("")
|
||||
self.layoutFlag.setText("")
|
||||
self.labelData.setText("")
|
||||
self.statusFlag.setText("")
|
||||
self.statusData.setText("")
|
||||
self.classFlag.setText("")
|
||||
self.classData.setText("")
|
||||
self.layoutFlag.setText("")
|
||||
self.layoutData.setText("")
|
||||
self.cCountData.setText("–")
|
||||
self.wCountData.setText("–")
|
||||
self.pCountData.setText("–")
|
||||
|
||||
else:
|
||||
theLabel = nwItem.itemName
|
||||
@@ -176,7 +215,7 @@ class GuiDocDetails(QFrame):
|
||||
else:
|
||||
exportFlag = " "
|
||||
else:
|
||||
exportFlag = "+"
|
||||
exportFlag = "-"
|
||||
|
||||
self.labelFlag.setText(exportFlag)
|
||||
self.statusFlag.setPixmap(flagIcon.pixmap(10, 10))
|
||||
@@ -188,6 +227,15 @@ class GuiDocDetails(QFrame):
|
||||
self.classData.setText(nwLabels.CLASS_NAME[nwItem.itemClass])
|
||||
self.layoutData.setText(nwLabels.LAYOUT_NAME[nwItem.itemLayout])
|
||||
|
||||
if nwItem.itemType == nwItemType.FILE:
|
||||
self.cCountData.setText("{:n}".format(nwItem.charCount))
|
||||
self.wCountData.setText("{:n}".format(nwItem.wordCount))
|
||||
self.pCountData.setText("{:n}".format(nwItem.paraCount))
|
||||
else:
|
||||
self.cCountData.setText("–")
|
||||
self.wCountData.setText("–")
|
||||
self.pCountData.setText("–")
|
||||
|
||||
return
|
||||
|
||||
# END Class GuiDocDetails
|
||||
|
||||
@@ -421,7 +421,7 @@ class GuiDocTree(QTreeWidget):
|
||||
if nwItem.isExported:
|
||||
stExport = nwUnicode.U_CHECK
|
||||
else:
|
||||
stExport = "+"
|
||||
stExport = "-"
|
||||
|
||||
tStatus = stExport+" "+stClass+stLayout
|
||||
|
||||
|
||||
+3
-16
@@ -195,22 +195,9 @@ class GuiMainStatus(QStatusBar):
|
||||
def _updateStats(self):
|
||||
"""Update statistics.
|
||||
"""
|
||||
self.statsText.setToolTip((
|
||||
"<b>Document Stats</b><br>"
|
||||
"Characters: {cC:n}<br>"
|
||||
"Words: {wC:n}<br>"
|
||||
"Paragraphs: {pC:n}<br>"
|
||||
"<br>"
|
||||
"<b>Project Stats</b><br>"
|
||||
"Words Total: {pWC:n}<br>"
|
||||
"This Session: {sWC:n}"
|
||||
).format(
|
||||
cC = self.charCount,
|
||||
wC = self.wordCount,
|
||||
pC = self.paraCount,
|
||||
pWC = self.projWords,
|
||||
sWC = self.sessWords,
|
||||
))
|
||||
self.statsText.setToolTip(
|
||||
"D: Document word count<br>P: Project word count"
|
||||
)
|
||||
self.statsText.setText((
|
||||
"D:{wC:n} P:{pWC:n} ({sWC:+n})"
|
||||
).format(
|
||||
|
||||
Reference in New Issue
Block a user