Add a summary entry to the insert menu (#1619)

This commit is contained in:
Veronica Berglyd Olsen
2023-11-25 23:51:30 +01:00
parent 53aa970427
commit bedd71b105
4 changed files with 42 additions and 29 deletions
+4 -3
View File
@@ -136,9 +136,10 @@ class nwDocInsert(Enum):
QUOTE_LD = 3
QUOTE_RD = 4
SYNOPSIS = 5
NEW_PAGE = 6
VSPACE_S = 7
VSPACE_M = 8
SUMMARY = 6
NEW_PAGE = 7
VSPACE_S = 8
VSPACE_M = 9
# END Enum nwDocInsert
+4
View File
@@ -834,6 +834,10 @@ class GuiDocEditor(QPlainTextEdit):
text = "% Synopsis: "
newBlock = True
goAfter = True
elif insert == nwDocInsert.SUMMARY:
text = "% Summary: "
newBlock = True
goAfter = True
elif insert == nwDocInsert.NEW_PAGE:
text = "[newpage]"
newBlock = True
+7
View File
@@ -564,6 +564,13 @@ class GuiMainMenu(QMenuBar):
lambda: self.requestDocInsert.emit(nwDocInsert.SYNOPSIS)
)
# Insert > Summary Comment
self.aInsSynopsis = self.mInsComments.addAction(self.tr("Summary Comment"))
self.aInsSynopsis.setShortcut("Ctrl+K, U")
self.aInsSynopsis.triggered.connect(
lambda: self.requestDocInsert.emit(nwDocInsert.SUMMARY)
)
# Insert > Symbols
self.mInsBreaks = self.insMenu.addMenu(self.tr("Page Break and Space"))