Add ability to take screenshots in-app and insert them into the page
All checks were successful
CI / test (push) Successful in 3m21s
Lint / test (push) Successful in 28s
Trivy / test (push) Successful in 21s

This commit is contained in:
Miguel Jacq 2025-11-17 17:43:23 +11:00
parent eedf48dc6a
commit 34349c6133
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
8 changed files with 204 additions and 12 deletions

View file

@ -18,6 +18,7 @@ class ToolBar(QToolBar):
checkboxesRequested = Signal()
historyRequested = Signal()
insertImageRequested = Signal()
insertScreenshotRequested = Signal()
def __init__(self, parent=None):
super().__init__(strings._("toolbar_format"), parent)
@ -81,16 +82,21 @@ class ToolBar(QToolBar):
self.actNumbers.setToolTip(strings._("toolbar_numbered_list"))
self.actNumbers.setCheckable(True)
self.actNumbers.triggered.connect(self.numbersRequested)
self.actCheckboxes = QAction("", self)
self.actCheckboxes = QAction("", self)
self.actCheckboxes.setToolTip(strings._("toolbar_toggle_checkboxes"))
self.actCheckboxes.triggered.connect(self.checkboxesRequested)
# Images
self.actInsertImg = QAction(strings._("images"), self)
self.actInsertImg = QAction("🌄", self)
self.actInsertImg.setToolTip(strings._("insert_images"))
self.actInsertImg.setShortcut("Ctrl+Shift+I")
self.actInsertImg.triggered.connect(self.insertImageRequested)
self.actScreenshot = QAction("📸", self)
self.actScreenshot.setToolTip(strings._("screenshot"))
self.actScreenshot.setShortcut("Ctrl+Shift+O")
self.actScreenshot.triggered.connect(self.insertScreenshotRequested)
# History button
self.actHistory = QAction(strings._("history"), self)
self.actHistory.triggered.connect(self.historyRequested)
@ -130,6 +136,7 @@ class ToolBar(QToolBar):
self.actNumbers,
self.actCheckboxes,
self.actInsertImg,
self.actScreenshot,
self.actHistory,
]
)