OSDN Git Service

Added LaTex image insert & edit
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / ContentView.java
index 81ecdfd..648570b 100644 (file)
@@ -62,12 +62,18 @@ public class ContentView extends QWebView {
        QShortcut rotateImageLeftShortcut;      \r
        QAction insertLinkAction;\r
        QShortcut insertLinkShortcut;\r
+       QAction insertLatexAction;\r
+       QShortcut insertLatexShortcut;\r
        QAction insertTableAction;\r
        QShortcut insertTableShortcut;\r
        QAction insertTableRowAction;\r
        QShortcut insertTableRowShortcut;\r
+       QAction insertTableColumnAction;\r
+       QShortcut insertTableColumnShortcut;\r
        QAction deleteTableRowAction;\r
        QShortcut deleteTableRowShortcut;\r
+       QAction deleteTableColumnAction;\r
+       QShortcut deleteTableColumnShortcut;\r
        QAction openAction;\r
        \r
        QAction redBackgroundColor;\r
@@ -166,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
+\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
@@ -185,6 +199,14 @@ public class ContentView extends QWebView {
                setupShortcut(insertTableRowShortcut, "Edit_Insert_Table_Row");\r
                insertTableRowShortcut.activated.connect(parent, "insertTableRow()");\r
                \r
+               insertTableColumnAction = new QAction(tr("Insert Column"), this);\r
+               insertTableColumnAction.triggered.connect(parent, "insertTableColumn()");\r
+               setupShortcut(insertTableColumnAction, "Edit_Insert_Table_Column");\r
+               tableMenu.addAction(insertTableColumnAction);\r
+               insertTableColumnShortcut = new QShortcut(this);\r
+               setupShortcut(insertTableColumnShortcut, "Edit_Insert_Table_Column");\r
+               insertTableColumnShortcut.activated.connect(parent, "insertTableColumn()");\r
+               \r
                deleteTableRowAction = new QAction(tr("Delete Row"), this);\r
                deleteTableRowAction.triggered.connect(parent, "deleteTableRow()");\r
                setupShortcut(deleteTableRowAction, "Edit_Delete_Table_Row");\r
@@ -193,6 +215,15 @@ public class ContentView extends QWebView {
                setupShortcut(deleteTableRowShortcut, "Edit_Delete_Table_Row");\r
                deleteTableRowShortcut.activated.connect(parent, "deleteTableRow()");\r
                \r
+               deleteTableColumnAction = new QAction(tr("Delete Column"), this);\r
+               deleteTableColumnAction.triggered.connect(parent, "deleteTableColumn()");\r
+               setupShortcut(deleteTableColumnAction, "Edit_Delete_Table_Column");\r
+               tableMenu.addAction(deleteTableColumnAction);\r
+               deleteTableColumnShortcut = new QShortcut(this);\r
+               setupShortcut(deleteTableColumnShortcut, "Edit_Delete_Table_Column");\r
+               deleteTableColumnShortcut.activated.connect(parent, "deleteTableColumn()");\r
+               \r
+               \r
                insertDateTimeShortcut = new QShortcut(this);\r
                insertDateTimeShortcut.activated.connect(parent, "insertDateTime()");\r
                setupShortcut(insertDateTimeShortcut, "Insert_DateTime");\r