dumpLexer( QsciLexerPython() ) dumpLexer( QsciLexerBash() ) dumpLexer( QsciLexerBatch() ) dumpLexer( QsciLexerCMake() ) dumpLexer( QsciLexerCPP() ) dumpLexer( QsciLexerCSharp() ) dumpLexer( QsciLexerCSS() ) dumpLexer( QsciLexerDiff() ) dumpLexer( QsciLexerD() ) dumpLexer( QsciLexerFortran77() ) dumpLexer( QsciLexerFortran() ) dumpLexer( QsciLexerHTML() ) dumpLexer( QsciLexerIDL() ) dumpLexer( QsciLexerJava() ) dumpLexer( QsciLexerJavaScript() ) dumpLexer( QsciLexerLua() ) dumpLexer( QsciLexerMakefile() ) dumpLexer( QsciLexerPascal() ) dumpLexer( QsciLexerPerl() ) dumpLexer( QsciLexerPostScript() ) dumpLexer( QsciLexerPOV() ) dumpLexer( QsciLexerProperties() ) dumpLexer( QsciLexerRuby() ) dumpLexer( QsciLexerSQL() ) dumpLexer( QsciLexerTCL() ) dumpLexer( QsciLexerTeX() ) dumpLexer( QsciLexerVHDL() ) dumpLexer( QsciLexerXML() ) dumpLexer( QsciLexerYAML() )
def __init__(self, parent=None): #CONSTRUCTOR DE LA CLASE HEREDADA super(editor, self).__init__(parent) #DEFINICION DE LA FUENTE Y SUS PROPIEDADES font = QFont() font.setFamily('Courier') font.setFixedPitch(True) font.setPointSize(10) self.setFont(font) self.setMarginsFont(font) self.lineas_marcadas = [] #PROFIEDADES AVANZADAS DE LA FUENTE DEL EDITOR fontmetrics = QFontMetrics(font) self.setMarginsFont(font) #SE CAMBIA EL MARGEN ANCHO DE LA FUNETE self.setMarginWidth(0, fontmetrics.width("00000") - 15) #MARGEN DE LOS NUMEROS DE LINEA self.setMarginLineNumbers(0, True) #COLOR DE FONDO DE LOS NUMEROS DE LINEA self.setMarginsBackgroundColor(QColor("#E0E0E0")) self.setMarginSensitivity(1, True) #CREAMOS LA SEÑA PARA AGREGAR LINEA MARCADA self.connect(self, SIGNAL('marginClicked(int, int, Qt::KeyboardModifiers)'), self.on_margin_clicked) #SE DEFINE EL ICONO A MOSTRAR EN LA LINEA MARCADA self.markerDefine(QsciScintilla.Circle, self.ARROW_MARKER_NUM) self.setMarkerBackgroundColor(QColor("#FF6C3B"), self.ARROW_MARKER_NUM) #RESALTADO DE PARENTECIS,CORCHETES Y OTROS self.setBraceMatching(QsciScintilla.SloppyBraceMatch) #RESALTADO DE LA LINEA DONDE SE ENCUENTRA EL CURSOR self.setCaretLineVisible(True) self.setCaretLineBackgroundColor(QColor("#32f24c")) #AUTOIDENTACION self.setAutoIndent(True) self.setIndentationGuides(True) self.setIndentationsUseTabs(True) self.setIndentationWidth(4) #DEFINIMOS EL RESALTADO O LEXER self.lexer = QsciLexerPascal() self.lexer.setDefaultFont(font) #FUENTE DEL LEXER #API PARA EL AUTOCOMPETADO api = QsciAPIs(self.lexer) self.palabraAutocompletar(api) api.prepare() self.cambiarColores() self.setLexer(self.lexer) self.setAutoCompletionThreshold(1) self.setAutoCompletionSource(QsciScintilla.AcsAPIs) #ESCONDER SCROLLBAR HORIZONTAL self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0) #TAMAÑO MINIMO DEL EDITOR self.setMinimumSize(600, 360)