Ejemplo n.º 1
0
    def test_python_highlight():
        """simple test"""
        from PyQt4.QtGui import QApplication
        from Mixin import mixin
        import os

        app = QApplication([])
        widget = mixin(
                       WidthPythonHighlighter,
                       WidthMqHighlighter,
                       WithLineNumbers,
                       WithViewPortMargins,
                       WithLineHighlight,
                       WithFixedFont,
                       QPlainTextEdit)()
        f = open(os.path.abspath(__file__), 'r')
        widget.setPlainText(unicode(f.read().decode('utf-8')))
        widget.setPlainText("""#'asd"fsdf'sadfasdf

"asdfasdf"
def
aaas"dfas"df"asdf"
""")
        widget.show()
        app.exec_()
Ejemplo n.º 2
0
    def test_with_hightlight():
        """simple test"""
        from PyQt4.QtGui import QApplication
        from Mixin import mixin

        app = QApplication([])
        widget = mixin(WithLineHighlight, WithFixedFont, QPlainTextEdit)()
        widget.show()
        app.exec_()
Ejemplo n.º 3
0
    def test_word_completion_multy():
        """simple test"""
        from PyQt4.QtGui import QApplication
        from Mixin import mixin

        app = QApplication([])
        widget = mixin(WithWordCompletionMulty_, WithCompletion, QPlainTextEdit)()
        widget.show()
        app.exec_()
Ejemplo n.º 4
0
    def test_mqedit_load_save():
        """simple test"""
        from PyQt4.QtGui import QApplication
        from Mixin import mixin

        app = QApplication([])
        widget = mixin(
                        WithLineHighlight, 
                        WithFixedFont,
                        WithMqEditIO,
                        QPlainTextEdit)()
        widget.show()
        widget.load_file('MqEditIO.py')
        app.exec_()
Ejemplo n.º 5
0
    def test_with_linenumber_and_word_completion():
        """simple test"""
        from PyQt4.QtGui import QApplication
        from Mixin import mixin

        app = QApplication([])
        widget = mixin(
            WithBasicIdentationManager,
            WithLineNumbers,
            WithViewPortMargins,
            WithLineHighlight,
            WithFixedFont,
            QPlainTextEdit,
        )()
        widget.show()
        app.exec_()