OSDN Git Service

Added LaTex image insert & edit
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / ContentView.java
index 2dfef1f..648570b 100644 (file)
@@ -62,6 +62,8 @@ public class ContentView extends QWebView {
        QShortcut rotateImageLeftShortcut;      \r
        QAction insertLinkAction;\r
        QShortcut insertLinkShortcut;\r
        QShortcut rotateImageLeftShortcut;      \r
        QAction insertLinkAction;\r
        QShortcut insertLinkShortcut;\r
+       QAction insertLatexAction;\r
+       QShortcut insertLatexShortcut;\r
        QAction insertTableAction;\r
        QShortcut insertTableShortcut;\r
        QAction insertTableRowAction;\r
        QAction insertTableAction;\r
        QShortcut insertTableShortcut;\r
        QAction insertTableRowAction;\r
@@ -170,6 +172,14 @@ public class ContentView extends QWebView {
                insertLinkShortcut = new QShortcut(this);\r
                setupShortcut(insertLinkShortcut, "Edit_Insert_Hyperlink");\r
                insertLinkShortcut.activated.connect(parent, "insertLink()");\r
                insertLinkShortcut = new QShortcut(this);\r
                setupShortcut(insertLinkShortcut, "Edit_Insert_Hyperlink");\r
                insertLinkShortcut.activated.connect(parent, "insertLink()");\r
+\r
+               insertLatexAction = new QAction(tr("Insert LaTeX Formula"), this);\r
+               insertLatexAction.triggered.connect(parent, "insertLatex()");\r
+               setupShortcut(insertLatexAction, "Insert_Latex");\r
+               contextMenu.addAction(insertLatexAction);\r
+               insertLatexShortcut = new QShortcut(this);\r
+               setupShortcut(insertLatexShortcut, "Latex_Insert");\r
+               insertLatexShortcut.activated.connect(parent, "insertLatex()");\r
                \r
                contextMenu.addMenu(tableMenu);\r
                tableMenu.setTitle("Table");\r
                \r
                contextMenu.addMenu(tableMenu);\r
                tableMenu.setTitle("Table");\r