Add a starting widget for the word liste ditor and connect it to the GUI

This commit is contained in:
Veronica K. B. Olsen
2021-02-12 17:01:46 +01:00
parent c06c2422a9
commit 6e64ede90b
5 changed files with 174 additions and 5 deletions
+17 -1
View File
@@ -43,7 +43,7 @@ from nw.gui import (
GuiDocViewDetails, GuiDocViewer, GuiItemDetails, GuiItemEditor,
GuiMainMenu, GuiMainStatus, GuiNovelTree, GuiOutline, GuiOutlineDetails,
GuiPreferences, GuiProjectDetails, GuiProjectLoad, GuiProjectSettings,
GuiProjectTree, GuiProjectWizard, GuiTheme, GuiWritingStats
GuiProjectTree, GuiProjectWizard, GuiTheme, GuiWordList, GuiWritingStats
)
from nw.core import NWProject, NWDoc, NWIndex
from nw.constants import nwItemType, nwItemClass, nwAlert, nwLists
@@ -1017,6 +1017,22 @@ class GuiMain(QMainWindow):
return
def showProjectWordListDialog(self):
"""Open the project word list dialog.
"""
if not self.hasProject:
logger.error("No project open")
return
dlgWords = GuiWordList(self, self.theProject)
dlgWords.exec_()
if dlgWords.result() == QDialog.Accepted:
logger.debug("Reloading word list")
# ToDo
return
def showWritingStatsDialog(self):
"""Open the session log dialog.
"""