QScintilla/QsciScintillaCompat.py

changeset 1131
7781e396c903
parent 945
8cd4d08fa9f6
child 1443
9b9396fc54aa
equal deleted inserted replaced
1130:3e9f0330f833 1131:7781e396c903
51 51
52 @param parent parent widget (QWidget) 52 @param parent parent widget (QWidget)
53 @param name name of this instance (string) 53 @param name name of this instance (string)
54 @param flags window flags 54 @param flags window flags
55 """ 55 """
56 QsciScintilla.__init__(self, parent) 56 super().__init__(parent)
57 57
58 self.zoom = 0 58 self.zoom = 0
59 59
60 self.__targetSearchFlags = 0 60 self.__targetSearchFlags = 0
61 self.__targetSearchExpr = "" 61 self.__targetSearchExpr = ""
67 """ 67 """
68 Public method to set the lexer. 68 Public method to set the lexer.
69 69
70 @param lex the lexer to be set or None to reset it. 70 @param lex the lexer to be set or None to reset it.
71 """ 71 """
72 QsciScintilla.setLexer(self, lex) 72 super().setLexer(lex)
73 if lex is None: 73 if lex is None:
74 self.clearStyles() 74 self.clearStyles()
75 75
76 def clearStyles(self): 76 def clearStyles(self):
77 """ 77 """
304 Public method used to increase the zoom factor. 304 Public method used to increase the zoom factor.
305 305
306 @param zoom zoom factor increment 306 @param zoom zoom factor increment
307 """ 307 """
308 self.zoom += zoom 308 self.zoom += zoom
309 QsciScintilla.zoomIn(self, zoom) 309 super().zoomIn(zoom)
310 310
311 def zoomOut(self, zoom=1): 311 def zoomOut(self, zoom=1):
312 """ 312 """
313 Public method used to decrease the zoom factor. 313 Public method used to decrease the zoom factor.
314 314
315 @param zoom zoom factor decrement 315 @param zoom zoom factor decrement
316 """ 316 """
317 self.zoom -= zoom 317 self.zoom -= zoom
318 QsciScintilla.zoomOut(self, zoom) 318 super().zoomOut(zoom)
319 319
320 def zoomTo(self, zoom): 320 def zoomTo(self, zoom):
321 """ 321 """
322 Public method used to zoom to a specific zoom factor. 322 Public method used to zoom to a specific zoom factor.
323 323
324 @param zoom zoom factor 324 @param zoom zoom factor
325 """ 325 """
326 self.zoom = zoom 326 self.zoom = zoom
327 QsciScintilla.zoomTo(self, zoom) 327 super().zoomTo(zoom)
328 328
329 def getZoom(self): 329 def getZoom(self):
330 """ 330 """
331 Public method used to retrieve the current zoom factor. 331 Public method used to retrieve the current zoom factor.
332 332
876 876
877 @param style folding style to set (integer) 877 @param style folding style to set (integer)
878 @param margin margin number (integer) 878 @param margin margin number (integer)
879 """ 879 """
880 if style < self.ArrowFoldStyle: 880 if style < self.ArrowFoldStyle:
881 QsciScintilla.setFolding(self, style, margin) 881 super().setFolding(style, margin)
882 else: 882 else:
883 QsciScintilla.setFolding( 883 super().setFolding(
884 self, QsciScintilla.PlainFoldStyle, margin) 884 QsciScintilla.PlainFoldStyle, margin)
885 885
886 if style == self.ArrowFoldStyle: 886 if style == self.ArrowFoldStyle:
887 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDER, 887 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDER,
888 QsciScintilla.SC_MARK_ARROW) 888 QsciScintilla.SC_MARK_ARROW)
889 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPEN, 889 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPEN,
982 @param event the event object (QFocusEvent) 982 @param event the event object (QFocusEvent)
983 """ 983 """
984 if self.isListActive(): 984 if self.isListActive():
985 self.cancelList() 985 self.cancelList()
986 986
987 QsciScintilla.focusOutEvent(self, event) 987 super().focusOutEvent(event)
988 988
989 ########################################################################### 989 ###########################################################################
990 # interface methods to the mini editor 990 # interface methods to the mini editor
991 ########################################################################### 991 ###########################################################################
992 992

eric ide

mercurial