X-Git-Url: https://harishankar.org/repos/?p=biaweb_qt.git;a=blobdiff_plain;f=article_dialog.py;fp=article_dialog.py;h=3494138d3cbff289bea366c251bc69f6847ff7a2;hp=787f8d2bd16d9f625d97320e71df954e6ab11c8b;hb=903f2462bb6e7130191b1b0c667a9f6fce1e6189;hpb=e14aab0777f4dcc7200894ee75fab329007adb53 diff --git a/article_dialog.py b/article_dialog.py index 787f8d2..3494138 100644 --- a/article_dialog.py +++ b/article_dialog.py @@ -9,3 +9,79 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog): PyQt4.QtGui.QDialog.__init__ (self, parent) self.setupUi (self) + # when bold is clicked + def onBold (self): + textcur = self.content.textCursor () + sel = textcur.selectedText () + boldsel = "" + str (sel) + "" + textcur.insertText (boldsel) + + # when block quote is clicked + def onBQuote (self): + textcur = self.content.textCursor () + sel = textcur.selectedText () + quotesel = "
\n" + str (sel) + "\n" + textcur.insertText (quotesel) + + # when bullet is clicked + def onBullet (self): + pass + + # when code is clicked + def onCode (self): + textcur = self.content.textCursor () + sel = textcur.selectedText () + codesel = "
" + str (sel) + "
"
+ textcur.insertText (codesel)
+
+ # when horiz rule is clicked
+ def onHRule (self):
+ pass
+
+ # when image is clicked
+ def onImage (self):
+ pass
+
+ # when italic is clicked
+ def onItalic (self):
+ pass
+
+ # when link is clicked
+ def onLink (self):
+ pass
+
+ # when numbered is clicked
+ def onNumber (self):
+ pass
+
+ # when center is clicked
+ def onCenter (self):
+ pass
+
+ # when justify is clicked
+ def onJustify (self):
+ pass
+
+ # when left is clicked
+ def onLeft (self):
+ pass
+
+ # when right is clicked
+ def onRight (self):
+ pass
+
+ # when pre is clicked
+ def onPre (self):
+ pass
+
+ # when para is clicked
+ def onPara (self):
+ pass
+
+ # when table is clicked
+ def onTable (self):
+ pass
+
+ # when break is clicked
+ def onBreak (self):
+ pass