Refactor schema to support versioning of pages. Add HistoryDialog and diff with ability to revert.
This commit is contained in:
parent
cf9102939f
commit
82069053be
9 changed files with 520 additions and 33 deletions
|
|
@ -15,6 +15,7 @@ class ToolBar(QToolBar):
|
|||
bulletsRequested = Signal()
|
||||
numbersRequested = Signal()
|
||||
alignRequested = Signal(Qt.AlignmentFlag)
|
||||
historyRequested = Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__("Format", parent)
|
||||
|
|
@ -76,6 +77,10 @@ class ToolBar(QToolBar):
|
|||
lambda: self.alignRequested.emit(Qt.AlignRight)
|
||||
)
|
||||
|
||||
# History button
|
||||
self.actHistory = QAction("History", self)
|
||||
self.actHistory.triggered.connect(self.historyRequested)
|
||||
|
||||
self.addActions(
|
||||
[
|
||||
self.actBold,
|
||||
|
|
@ -92,6 +97,7 @@ class ToolBar(QToolBar):
|
|||
self.actAlignL,
|
||||
self.actAlignC,
|
||||
self.actAlignR,
|
||||
self.actHistory,
|
||||
]
|
||||
)
|
||||
|
||||
|
|
@ -120,6 +126,9 @@ class ToolBar(QToolBar):
|
|||
self._style_letter_button(self.actAlignC, "C")
|
||||
self._style_letter_button(self.actAlignR, "R")
|
||||
|
||||
# History
|
||||
self._style_letter_button(self.actHistory, "View History")
|
||||
|
||||
def _style_letter_button(
|
||||
self,
|
||||
action: QAction,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue