示例#1
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        Ui_MainWindow.__init__(self)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
               
        ## Syntax highlighting
        self.highlighter = highlighter.Highlighter(self.ui.orig_text.document())
        self.highlighter.modeRest()

        ## Connect the refresButton and F1 key to a message method.
        self.connect(self.ui.refresh, QtCore.SIGNAL("clicked()"), self.do_html)
        QtGui.QShortcut(QtGui.QKeySequence(self.VIEWACTIVATOR), 
                        self, self.do_html)
               
        ## SIGNALS AND SLOTS
        self.connect(self.ui.actionHelp, QtCore.SIGNAL("triggered()"), 
                    self.showHelp)
        
        ## STATUSBAR
        self.statusBar().showMessage("Welcome to WikiWriter, press F1 to update your Browser.")