From: Harishankar Date: Sun, 28 Nov 2010 09:12:09 +0000 (+0530) Subject: Article dialog formatting controls implemented X-Git-Url: https://harishankar.org/repos/?a=commitdiff_plain;h=3b4711c41851510b83c2c442bd6a00ee387c1bfb;p=biaweb_qt.git Article dialog formatting controls implemented Implemented all the text formatting controls of the article dialog. --- diff --git a/article_dialog.py b/article_dialog.py index 3494138..02c0771 100644 --- a/article_dialog.py +++ b/article_dialog.py @@ -9,23 +9,33 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog): PyQt4.QtGui.QDialog.__init__ (self, parent) self.setupUi (self) + # when rejected, confirm first + def reject (self): + ans = PyQt4.QtGui.QMessageBox.question (self, "Confirm", + "Are you sure you wish to cancel all changes?", + PyQt4.QtGui.QMessageBox.Yes, PyQt4.QtGui.QMessageBox.No) + if ans == PyQt4.QtGui.QMessageBox.Yes: + PyQt4.QtGui.QDialog.reject (self) + + # when bold is clicked def onBold (self): textcur = self.content.textCursor () sel = textcur.selectedText () - boldsel = "" + str (sel) + "" + boldsel = "" + sel + "" textcur.insertText (boldsel) # when block quote is clicked def onBQuote (self): textcur = self.content.textCursor () sel = textcur.selectedText () - quotesel = "
\n" + str (sel) + "\n
" + quotesel = "
\n" + sel + "\n
" textcur.insertText (quotesel) # when bullet is clicked def onBullet (self): - pass + # insert bulleted list + self.insert_list_items () # when code is clicked def onCode (self): @@ -36,52 +46,166 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog): # when horiz rule is clicked def onHRule (self): - pass + textcur = self.content.textCursor () + hrule = "\n
\n" + textcur.clearSelection () + textcur.insertText (hrule) # when image is clicked def onImage (self): - pass + img_url, ok = PyQt4.QtGui.QInputDialog.getText (self, "Image URL", "URL of the image to insert") + if not ok or img_url.isEmpty (): + return + alt_txt, ok = PyQt4.QtGui.QInputDialog.getText (self, "Alt text", "Alternate text of the image") + if not ok or alt_txt.isEmpty (): + return + + textcur = self.content.textCursor () + imgtag = '' + alt_txt + '' + textcur.clearSelection () + textcur.insertText (imgtag) # when italic is clicked def onItalic (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + italsel = "" + sel + "" + textcur.insertText (italsel) # when link is clicked def onLink (self): - pass + linkhref, ok = PyQt4.QtGui.QInputDialog.getText (self, "Link URL", "URL of the link to insert") + if not ok or linkhref.isEmpty (): + return + textcur = self.content.textCursor () + sel = textcur.selectedText () + linksel = '' + sel + "" + textcur.insertText (linksel) # when numbered is clicked def onNumber (self): - pass + # numbered list + self.insert_list_items (True) + + # get a list of items in numbered or bulleted list + def insert_list_items (self, numbered = False): + if numbered == True: + title = "Numbered list" + otag = "
    \n" + ctag = "
\n" + else: + title = "Bulleted list" + otag = "\n" + + itemlist = [ otag ] + while True: + num_item, ok = PyQt4.QtGui.QInputDialog.getText (self, title, + "List item content (leave blank to finish the list)") + # if cancelled quit + if not ok: + return + # if item is empty then close the list + if num_item.isEmpty (): + break + itemlist.append ("
  • " + num_item + "
  • \n") + itemlist.append (ctag) + + textcur = self.content.textCursor () + textcur.clearSelection () + for item in itemlist: + textcur.insertText (item) + # when center is clicked def onCenter (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + paracentersel = '

    ' + sel + "

    " + textcur.insertText (paracentersel) # when justify is clicked def onJustify (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + parajustsel = '

    ' + sel + "

    " + textcur.insertText (parajustsel) # when left is clicked def onLeft (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + paraleftsel = '

    ' + sel + "

    " + textcur.insertText (paraleftsel) # when right is clicked def onRight (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + pararightsel = '

    ' + sel + "

    " + textcur.insertText (pararightsel) # when pre is clicked def onPre (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + presel = "
    " + sel + "
    " + textcur.insertText (presel) # when para is clicked def onPara (self): - pass + textcur = self.content.textCursor () + sel = textcur.selectedText () + parasel = "

    " + sel + "

    " + textcur.insertText (parasel) # when table is clicked def onTable (self): - pass + # get the number of rows + rows, ok = PyQt4.QtGui.QInputDialog.getInt (self, "Table", "Number of table rows") + if not ok: + return + # get the number of columns + cols, ok = PyQt4.QtGui.QInputDialog.getInt (self, "Table", "Number of table columns") + if not ok: + return + # should there be a header row? + headerflag = PyQt4.QtGui.QMessageBox.question (self, "Header", "Do you want additional header row?", + PyQt4.QtGui.QMessageBox.Yes, PyQt4.QtGui.QMessageBox.No, + PyQt4.QtGui.QMessageBox.Cancel) + if headerflag == PyQt4.QtGui.QMessageBox.Cancel: + return + + # build the table tag + tablelist = ["\n\n"] + if headerflag == PyQt4.QtGui.QMessageBox.Yes: + tablelist.append (" \n") + tablelist.append (" \n") + for i in range (cols): + tablelist.append (" \n") + tablelist.append (" \n") + tablelist.append (" \n") + + tablelist.append (" \n") + for j in range (rows): + tablelist.append (" \n") + for i in range (cols): + tablelist.append (" \n") + tablelist.append (" \n") + tablelist.append (" \n") + tablelist.append ("
    \n") + + # insert the table + textcur = self.content.textCursor () + textcur.clearSelection () + for item in tablelist: + textcur.insertText (item) + + # when break is clicked def onBreak (self): - pass + textcur = self.content.textCursor () + breaktxt = "\n
    \n" + textcur.clearSelection () + textcur.insertText (breaktxt) diff --git a/article_dialog.ui b/article_dialog.ui index e1124b9..a4259ef 100644 --- a/article_dialog.ui +++ b/article_dialog.ui @@ -6,7 +6,7 @@ 0 0 - 624 + 654 544 @@ -79,7 +79,12 @@ Qt::NoFocus - Bold + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bold</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:400; font-style:italic;">Shortcut: Ctrl+B</span></p></body></html> @@ -107,7 +112,12 @@ Qt::NoFocus - Italic + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:italic;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Italic</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Shortcut: Ctrl+I</p></body></html> @@ -116,6 +126,9 @@ :/bia/resources/italic.gif:/bia/resources/italic.gif + + Ctrl+I + false @@ -127,7 +140,12 @@ Qt::NoFocus - Preformatted text + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Preformatted text</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+F</span></p></body></html> @@ -136,6 +154,9 @@ :/bia/resources/pre.gif:/bia/resources/pre.gif + + Ctrl+F + false @@ -147,7 +168,12 @@ Qt::NoFocus - Right align para + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Right align para</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+R</span></p></body></html> @@ -156,6 +182,9 @@ :/bia/resources/right.gif:/bia/resources/right.gif + + Ctrl+R + false @@ -167,7 +196,12 @@ Qt::NoFocus - Justify para + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Justify para</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+J</span></p></body></html> @@ -176,6 +210,9 @@ :/bia/resources/justify.gif:/bia/resources/justify.gif + + Ctrl+J + false @@ -187,7 +224,12 @@ Qt::NoFocus - Bulleted list + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bulleted list</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+. </span>(Ctrl+dot)</p></body></html> @@ -196,6 +238,9 @@ :/bia/resources/bullets.gif:/bia/resources/bullets.gif + + Ctrl+. + false @@ -207,7 +252,12 @@ Qt::NoFocus - Numbered list + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Numbered list</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+1 </span>(Ctrl+One)</p></body></html> @@ -216,6 +266,9 @@ :/bia/resources/numbers.gif:/bia/resources/numbers.gif + + Ctrl+1 + false @@ -227,7 +280,12 @@ Qt::NoFocus - Code block + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Code block</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+= </span>(Ctrl+Equals)</p></body></html> @@ -236,6 +294,9 @@ :/bia/resources/code.gif:/bia/resources/code.gif + + Ctrl+= + false @@ -247,7 +308,12 @@ Qt::NoFocus - Table + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Table</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+T</span></p></body></html> @@ -256,6 +322,9 @@ :/bia/resources/table.gif:/bia/resources/table.gif + + Ctrl+T + false @@ -267,7 +336,12 @@ Qt::NoFocus - Horizontal rule + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Horizontal rule</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+H</span></p></body></html> @@ -276,6 +350,9 @@ :/bia/resources/hr.gif:/bia/resources/hr.gif + + Ctrl+H + false @@ -286,6 +363,14 @@ Qt::NoFocus + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Paragraph</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+P</span></p></body></html> + @@ -293,6 +378,9 @@ :/bia/resources/par.gif:/bia/resources/par.gif + + Ctrl+P + false @@ -304,7 +392,12 @@ Qt::NoFocus - Line break + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Line break</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+Enter</span></p></body></html> @@ -313,6 +406,9 @@ :/bia/resources/br.gif:/bia/resources/br.gif + + Ctrl+Return + false @@ -389,7 +485,12 @@ Qt::NoFocus - Insert image + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Insert image</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+Shift+I</span></p></body></html> @@ -398,6 +499,9 @@ :/bia/resources/img.gif:/bia/resources/img.gif + + Ctrl+Shift+I + false @@ -409,7 +513,12 @@ Qt::NoFocus - Insert link + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Insert link</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+Shift+L</span></p></body></html> @@ -418,6 +527,9 @@ :/bia/resources/link.gif:/bia/resources/link.gif + + Ctrl+Shift+L + @@ -426,7 +538,12 @@ Qt::NoFocus - Center para + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Center para</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+C</span></p></body></html> @@ -435,6 +552,9 @@ :/bia/resources/center.gif:/bia/resources/center.gif + + Ctrl+C + false @@ -446,7 +566,12 @@ Qt::NoFocus - Left align para + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Left align para</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+L</span></p></body></html> @@ -455,6 +580,9 @@ :/bia/resources/left.gif:/bia/resources/left.gif + + Ctrl+L + false @@ -466,7 +594,12 @@ Qt::NoFocus - Blockquote + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Blockquote</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Shortcut: Ctrl+Q</span></p></body></html> @@ -475,6 +608,9 @@ :/bia/resources/bquote.gif:/bia/resources/bquote.gif + + Ctrl+Q + false diff --git a/ui_article_dialog.py b/ui_article_dialog.py index fd2f8b0..7e42cc7 100644 --- a/ui_article_dialog.py +++ b/ui_article_dialog.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'article_dialog.ui' # -# Created: Sun Nov 28 10:26:53 2010 +# Created: Sun Nov 28 13:59:41 2010 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! @@ -12,7 +12,7 @@ from PyQt4 import QtCore, QtGui class Ui_ArticleDialog(object): def setupUi(self, ArticleDialog): ArticleDialog.setObjectName("ArticleDialog") - ArticleDialog.resize(624, 544) + ArticleDialog.resize(654, 544) ArticleDialog.setAutoFillBackground(False) ArticleDialog.setSizeGripEnabled(True) ArticleDialog.setModal(True) @@ -286,24 +286,127 @@ class Ui_ArticleDialog(object): self.label_2.setText(QtGui.QApplication.translate("ArticleDialog", "Keywords", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("ArticleDialog", "Summary", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("ArticleDialog", "Article content", None, QtGui.QApplication.UnicodeUTF8)) - self.bold.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Bold", None, QtGui.QApplication.UnicodeUTF8)) - self.italic.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Italic", None, QtGui.QApplication.UnicodeUTF8)) - self.preformat.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Preformatted text", None, QtGui.QApplication.UnicodeUTF8)) - self.pararight.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Right align para", None, QtGui.QApplication.UnicodeUTF8)) - self.parajustify.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Justify para", None, QtGui.QApplication.UnicodeUTF8)) - self.bullets.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Bulleted list", None, QtGui.QApplication.UnicodeUTF8)) - self.numbered.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Numbered list", None, QtGui.QApplication.UnicodeUTF8)) - self.codeblock.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Code block", None, QtGui.QApplication.UnicodeUTF8)) - self.table.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Table", None, QtGui.QApplication.UnicodeUTF8)) - self.hrule.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Horizontal rule", None, QtGui.QApplication.UnicodeUTF8)) - self.linebreak.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Line break", None, QtGui.QApplication.UnicodeUTF8)) + self.bold.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Bold

    \n" +"

    Shortcut: Ctrl+B

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.bold.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+B", None, QtGui.QApplication.UnicodeUTF8)) + self.italic.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Italic

    \n" +"

    Shortcut: Ctrl+I

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.italic.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+I", None, QtGui.QApplication.UnicodeUTF8)) + self.preformat.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Preformatted text

    \n" +"

    Shortcut: Ctrl+F

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.preformat.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+F", None, QtGui.QApplication.UnicodeUTF8)) + self.pararight.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Right align para

    \n" +"

    Shortcut: Ctrl+R

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.pararight.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+R", None, QtGui.QApplication.UnicodeUTF8)) + self.parajustify.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Justify para

    \n" +"

    Shortcut: Ctrl+J

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.parajustify.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+J", None, QtGui.QApplication.UnicodeUTF8)) + self.bullets.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Bulleted list

    \n" +"

    Shortcut: Ctrl+. (Ctrl+dot)

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.bullets.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+.", None, QtGui.QApplication.UnicodeUTF8)) + self.numbered.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Numbered list

    \n" +"

    Shortcut: Ctrl+1 (Ctrl+One)

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.numbered.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+1", None, QtGui.QApplication.UnicodeUTF8)) + self.codeblock.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Code block

    \n" +"

    Shortcut: Ctrl+= (Ctrl+Equals)

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.codeblock.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+=", None, QtGui.QApplication.UnicodeUTF8)) + self.table.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Table

    \n" +"

    Shortcut: Ctrl+T

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.table.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+T", None, QtGui.QApplication.UnicodeUTF8)) + self.hrule.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Horizontal rule

    \n" +"

    Shortcut: Ctrl+H

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.hrule.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+H", None, QtGui.QApplication.UnicodeUTF8)) + self.paragraph.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Paragraph

    \n" +"

    Shortcut: Ctrl+P

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.paragraph.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+P", None, QtGui.QApplication.UnicodeUTF8)) + self.linebreak.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Line break

    \n" +"

    Shortcut: Ctrl+Enter

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.linebreak.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+Return", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("ArticleDialog", "Category", None, QtGui.QApplication.UnicodeUTF8)) self.label_6.setText(QtGui.QApplication.translate("ArticleDialog", "Rating", None, QtGui.QApplication.UnicodeUTF8)) self.label_7.setText(QtGui.QApplication.translate("ArticleDialog", "Stub (file name without HTML extension)", None, QtGui.QApplication.UnicodeUTF8)) - self.image.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Insert image", None, QtGui.QApplication.UnicodeUTF8)) - self.link.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Insert link", None, QtGui.QApplication.UnicodeUTF8)) - self.paracenter.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Center para", None, QtGui.QApplication.UnicodeUTF8)) - self.paraleft.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Left align para", None, QtGui.QApplication.UnicodeUTF8)) - self.blockquote.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Blockquote", None, QtGui.QApplication.UnicodeUTF8)) + self.image.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Insert image

    \n" +"

    Shortcut: Ctrl+Shift+I

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.image.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+Shift+I", None, QtGui.QApplication.UnicodeUTF8)) + self.link.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Insert link

    \n" +"

    Shortcut: Ctrl+Shift+L

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.link.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+Shift+L", None, QtGui.QApplication.UnicodeUTF8)) + self.paracenter.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Center para

    \n" +"

    Shortcut: Ctrl+C

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.paracenter.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+C", None, QtGui.QApplication.UnicodeUTF8)) + self.paraleft.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Left align para

    \n" +"

    Shortcut: Ctrl+L

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.paraleft.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+L", None, QtGui.QApplication.UnicodeUTF8)) + self.blockquote.setToolTip(QtGui.QApplication.translate("ArticleDialog", "\n" +"\n" +"

    Blockquote

    \n" +"

    Shortcut: Ctrl+Q

    ", None, QtGui.QApplication.UnicodeUTF8)) + self.blockquote.setShortcut(QtGui.QApplication.translate("ArticleDialog", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8)) import biaweb_rc_rc