Code highlighting implemented
[biaweb_qt.git] / article_dialog.py
index 02c0771..ddd9d18 100644 (file)
@@ -1,13 +1,16 @@
 # BiaWeb Website content manager (c) 2010 V.Harishankar
-# Category dialog class
+# Article dialog class
 
 import PyQt4
 import ui_article_dialog
+import highlighter
 
 class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog):
        def __init__ (self, parent):
                PyQt4.QtGui.QDialog.__init__ (self, parent)
                self.setupUi (self)
+               # set the code highlighter to the document
+               self.hltext = highlighter.SimpleHtmlHighlighter (self.content.document ())
 
        # when rejected, confirm first
        def reject (self):