Example #1
0
        def __init__(self, *args):
            QPlainTextEdit.__init__(self, *args)
            #self.setFrameStyle(QFrame.NoFrame)

            self.setFrameStyle(QFrame.NoFrame)
            self.highlight()
            #self.setLineWrapMode(QPlainTextEdit.NoWrap)

            self.cursorPositionChanged.connect(self.highlight)
Example #2
0
        def __init__(self, *args):
            QPlainTextEdit.__init__(self, *args)
            #self.setFrameStyle(QFrame.NoFrame)

            self.setFrameStyle(QFrame.NoFrame)
            self.highlight()
            #self.setLineWrapMode(QPlainTextEdit.NoWrap)

            self.cursorPositionChanged.connect(self.highlight)
Example #3
0
 def __init__(self, parent=None):
     QPlainTextEdit.__init__(self, parent)
     self.highlighter = SyntaxHighlighter(self)
     self.apply_settings()
     self.setMouseTracking(True)
     self.cursorPositionChanged.connect(self.highlight_cursor_line)
     self.blockCountChanged[int].connect(self.update_line_number_area_width)
     self.updateRequest.connect(self.update_line_number_area)
     self.line_number_area = LineNumbers(self)
Example #4
0
    def __init__(self, *args):
        QPlainTextEdit.__init__(self, *args)

        self.setMaximumWidth(655)

        font = QFont('')
        font.setFamily('Courier')
        font.setStyleHint(QFont.Monospace)
        font.setPointSize(10)
        self.setFont(font)
Example #5
0
 def __init__(self, parent=None):
     QPlainTextEdit.__init__(self, parent)
     self.current_cursor_line = None
     self.current_search_mark = None
     self.highlighter = SyntaxHighlighter(self)
     self.line_number_area = LineNumbers(self)
     self.apply_settings()
     self.setMouseTracking(True)
     self.cursorPositionChanged.connect(self.highlight_cursor_line)
     self.blockCountChanged[int].connect(self.update_line_number_area_width)
     self.updateRequest.connect(self.update_line_number_area)
     self.syntax = None
Example #6
0
 def __init__(self, *args):
     QPlainTextEdit.__init__(self, *args)
     # Default options to RightToleft
     options=QTextOption();
     options = self.document().defaultTextOption();
     options.setAlignment(Qt.AlignRight);
     options.setTextDirection(Qt.RightToLeft);
     self.document().setDefaultTextOption(options)
     # Default dictionary based on the current locale.
     self.dict = myspeller()
     # self.highlighter = Highlighter(self.document())
     # self.highlighter.setDict(self.dict)
     self.pretxt=''
Example #7
0
 def __init__(self, *args):
     QPlainTextEdit.__init__(self, *args)
     # Default options to RightToleft
     options = QTextOption()
     options = self.document().defaultTextOption()
     options.setAlignment(Qt.AlignRight)
     options.setTextDirection(Qt.RightToLeft)
     self.document().setDefaultTextOption(options)
     # Default dictionary based on the current locale.
     self.dict = myspeller()
     # self.highlighter = Highlighter(self.document())
     # self.highlighter.setDict(self.dict)
     self.pretxt = ''
Example #8
0
        def __init__(self, editor):
            """
			The editor part
			"""

            QPlainTextEdit.__init__(self, editor)

            self.editor = editor
            self.setFrameStyle(QFrame.NoFrame)
            self.highlight()

            # Set a monospace font with a tab indent of 4 characters
            if os.name == "posix":
                self.font = QtGui.QFont("mono")
            else:
                self.font = QtGui.QFont("courier")
            self.setFont(self.font)
            self.setTabStopWidth(self.fontMetrics().width(unicode("1234")))

            self.cursorPositionChanged.connect(self.highlight)
Example #9
0
		def __init__(self, editor):
		
			"""
			The editor part
			"""
		
			QPlainTextEdit.__init__(self, editor)
	 
	 		self.editor = editor
			self.setFrameStyle(QFrame.NoFrame)
			self.highlight()
			
			# Set a monospace font with a tab indent of 4 characters
			if os.name == "posix":
				self.font = QtGui.QFont("mono")
			else:
				self.font = QtGui.QFont("courier")
			self.setFont(self.font)
			self.setTabStopWidth(self.fontMetrics().width(unicode("1234")))
			
			self.cursorPositionChanged.connect(self.highlight)
Example #10
0
 def __init__(self, parent=None):
     QPlainTextEdit.__init__(self, parent)
     self.selectionChanged.connect(self.selection_changed)
Example #11
0
 def __init__(self, parent=None):
     QPlainTextEdit.__init__(self, parent)
     self.selectionChanged.connect(self.selection_changed)