Finish the build tool pages and add feature to set selected button
This commit is contained in:
@@ -98,6 +98,12 @@ class NPagedSideBar(QToolBar):
|
|||||||
|
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
def setSelected(self, buttonId):
|
||||||
|
"""Set the selected button.
|
||||||
|
"""
|
||||||
|
self._group.button(buttonId).setChecked(True)
|
||||||
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
# Private Slots
|
# Private Slots
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -89,13 +89,23 @@ class GuiBuildManuscript(QDialog):
|
|||||||
# ============
|
# ============
|
||||||
|
|
||||||
# Create Tabs
|
# Create Tabs
|
||||||
self.optTabSelect = GuiBuildSelectionTab(self)
|
self.optTabSelect = GuiBuildFilterTab(self)
|
||||||
self.optTabFormat = GuiBuildFormattingTab(self)
|
self.optTabHeadings = GuiBuildHeadingsTab(self)
|
||||||
|
self.optTabFormat = GuiBuildFormatTab(self)
|
||||||
|
self.optTabContent = GuiBuildContentTab(self)
|
||||||
|
self.buildTabHTML = GuiBuildHTMLTab(self)
|
||||||
|
self.buildTabMarkdown = GuiBuildMarkdownTab(self)
|
||||||
|
self.buildTabODT = GuiBuildODTTab(self)
|
||||||
|
|
||||||
# Add Tabs
|
# Add Tabs
|
||||||
self.toolStack = QStackedWidget(self)
|
self.toolStack = QStackedWidget(self)
|
||||||
self.toolStack.addWidget(self.optTabSelect)
|
self.toolStack.addWidget(self.optTabSelect)
|
||||||
|
self.toolStack.addWidget(self.optTabHeadings)
|
||||||
self.toolStack.addWidget(self.optTabFormat)
|
self.toolStack.addWidget(self.optTabFormat)
|
||||||
|
self.toolStack.addWidget(self.optTabContent)
|
||||||
|
self.toolStack.addWidget(self.buildTabHTML)
|
||||||
|
self.toolStack.addWidget(self.buildTabMarkdown)
|
||||||
|
self.toolStack.addWidget(self.buildTabODT)
|
||||||
|
|
||||||
# Assemble
|
# Assemble
|
||||||
self.outerBox = QHBoxLayout()
|
self.outerBox = QHBoxLayout()
|
||||||
@@ -104,6 +114,9 @@ class GuiBuildManuscript(QDialog):
|
|||||||
|
|
||||||
self.setLayout(self.outerBox)
|
self.setLayout(self.outerBox)
|
||||||
|
|
||||||
|
# Set Default Tab
|
||||||
|
self.optSideBar.setSelected(self.OPT_FILTERS)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -116,14 +129,24 @@ class GuiBuildManuscript(QDialog):
|
|||||||
"""
|
"""
|
||||||
if pageId == self.OPT_FILTERS:
|
if pageId == self.OPT_FILTERS:
|
||||||
self.toolStack.setCurrentWidget(self.optTabSelect)
|
self.toolStack.setCurrentWidget(self.optTabSelect)
|
||||||
|
elif pageId == self.OPT_HEADINGS:
|
||||||
|
self.toolStack.setCurrentWidget(self.optTabHeadings)
|
||||||
elif pageId == self.OPT_FORMAT:
|
elif pageId == self.OPT_FORMAT:
|
||||||
self.toolStack.setCurrentWidget(self.optTabFormat)
|
self.toolStack.setCurrentWidget(self.optTabFormat)
|
||||||
|
elif pageId == self.OPT_CONTENT:
|
||||||
|
self.toolStack.setCurrentWidget(self.optTabContent)
|
||||||
|
elif pageId == self.BLD_HTML:
|
||||||
|
self.toolStack.setCurrentWidget(self.buildTabHTML)
|
||||||
|
elif pageId == self.BLD_MARKDOWN:
|
||||||
|
self.toolStack.setCurrentWidget(self.buildTabMarkdown)
|
||||||
|
elif pageId == self.BLD_ODT:
|
||||||
|
self.toolStack.setCurrentWidget(self.buildTabODT)
|
||||||
return
|
return
|
||||||
|
|
||||||
# END Class GuiBuildManuscript
|
# END Class GuiBuildManuscript
|
||||||
|
|
||||||
|
|
||||||
class GuiBuildSelectionTab(QWidget):
|
class GuiBuildFilterTab(QWidget):
|
||||||
|
|
||||||
def __init__(self, buildMain):
|
def __init__(self, buildMain):
|
||||||
super().__init__(parent=buildMain)
|
super().__init__(parent=buildMain)
|
||||||
@@ -145,14 +168,64 @@ class GuiBuildSelectionTab(QWidget):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# END Class GuiBuildSelectionTab
|
# END Class GuiBuildFilterTab
|
||||||
|
|
||||||
|
|
||||||
class GuiBuildFormattingTab(QWidget):
|
class GuiBuildHeadingsTab(QWidget):
|
||||||
|
|
||||||
def __init__(self, buildMain):
|
def __init__(self, buildMain):
|
||||||
super().__init__(parent=buildMain)
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# END Class GuiBuildFormattingTab
|
# END Class GuiBuildHeadingsTab
|
||||||
|
|
||||||
|
|
||||||
|
class GuiBuildFormatTab(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, buildMain):
|
||||||
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# END Class GuiBuildFormatTab
|
||||||
|
|
||||||
|
|
||||||
|
class GuiBuildContentTab(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, buildMain):
|
||||||
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# END Class GuiBuildContentTab
|
||||||
|
|
||||||
|
|
||||||
|
class GuiBuildHTMLTab(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, buildMain):
|
||||||
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# END Class GuiBuildHTMLTab
|
||||||
|
|
||||||
|
|
||||||
|
class GuiBuildMarkdownTab(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, buildMain):
|
||||||
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# END Class GuiBuildMarkdownTab
|
||||||
|
|
||||||
|
|
||||||
|
class GuiBuildODTTab(QWidget):
|
||||||
|
|
||||||
|
def __init__(self, buildMain):
|
||||||
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
# END Class GuiBuildODTTab
|
||||||
|
|||||||
Reference in New Issue
Block a user