Add ability to storage images in the page

This commit is contained in:
Miguel Jacq 2025-11-04 15:57:41 +11:00
parent 7548f33de4
commit 74a75eadcb
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
5 changed files with 331 additions and 5 deletions

View file

@ -16,6 +16,7 @@ class ToolBar(QToolBar):
numbersRequested = Signal()
alignRequested = Signal(Qt.AlignmentFlag)
historyRequested = Signal()
insertImageRequested = Signal()
def __init__(self, parent=None):
super().__init__("Format", parent)
@ -86,6 +87,12 @@ class ToolBar(QToolBar):
self.actNumbers.setCheckable(True)
self.actNumbers.triggered.connect(self.numbersRequested)
# Images
self.actInsertImg = QAction("Image", self)
self.actInsertImg.setToolTip("Insert image")
self.actInsertImg.setShortcut("Ctrl+Shift+I")
self.actInsertImg.triggered.connect(self.insertImageRequested)
# Alignment
self.actAlignL = QAction("L", self)
self.actAlignL.setToolTip("Align Left")
@ -143,6 +150,7 @@ class ToolBar(QToolBar):
self.actNormal,
self.actBullets,
self.actNumbers,
self.actInsertImg,
self.actAlignL,
self.actAlignC,
self.actAlignR,