Added document split dialog and associated code
This commit is contained in:
+13
-8
@@ -24,10 +24,10 @@ from PyQt5.QtWidgets import (
|
||||
)
|
||||
|
||||
from nw.gui import (
|
||||
GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor,
|
||||
GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar,
|
||||
GuiDocViewDetails, GuiConfigEditor, GuiProjectEditor, GuiExport,
|
||||
GuiItemEditor, GuiTimeLineView, GuiSessionLogView, GuiDocMerge
|
||||
GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor, GuiExport,
|
||||
GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar, GuiDocViewDetails,
|
||||
GuiConfigEditor, GuiProjectEditor, GuiItemEditor, GuiTimeLineView,
|
||||
GuiSessionLogView, GuiDocMerge, GuiDocSplit
|
||||
)
|
||||
from nw.project import NWProject, NWDoc, NWItem, NWIndex, NWBackup
|
||||
from nw.tools import countWords
|
||||
@@ -83,7 +83,7 @@ class GuiMain(QMainWindow):
|
||||
|
||||
# Assemble Main Window
|
||||
self.treePane = QFrame()
|
||||
self.treeBox = QVBoxLayout()
|
||||
self.treeBox = QVBoxLayout()
|
||||
self.treeBox.setContentsMargins(0,0,0,0)
|
||||
self.treeBox.addWidget(self.treeView)
|
||||
self.treeBox.addWidget(self.treeMeta)
|
||||
@@ -461,12 +461,17 @@ class GuiMain(QMainWindow):
|
||||
def mergeDocuments(self):
|
||||
"""Merge multiple documents to one single new document.
|
||||
"""
|
||||
|
||||
if self.mainConf.showGUI:
|
||||
dlgMerge = GuiDocMerge(self, self.theProject)
|
||||
if dlgMerge.exec_():
|
||||
pass
|
||||
dlgMerge.exec_()
|
||||
return True
|
||||
|
||||
def splitDocument(self):
|
||||
"""Split a single document into multiple documents.
|
||||
"""
|
||||
if self.mainConf.showGUI:
|
||||
dlgSplit = GuiDocSplit(self, self.theProject)
|
||||
dlgSplit.exec_()
|
||||
return True
|
||||
|
||||
def passDocumentAction(self, theAction):
|
||||
|
||||
Reference in New Issue
Block a user