src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10849
78d338b6d89f
parent 10843
5184f7a9a244
child 10850
d835f48b9908
equal deleted inserted replaced
10848:328c9a177c64 10849:78d338b6d89f
226 "<": "<>", 226 "<": "<>",
227 ">": "<>", 227 ">": "<>",
228 } 228 }
229 229
230 def __init__( 230 def __init__(
231 self, dbs, fn="", vm=None, filetype="", editor=None, tv=None, parent=None 231 self,
232 dbs,
233 fn="",
234 vm=None,
235 filetype="",
236 editor=None,
237 tv=None,
238 assembly=None,
239 parent=None,
232 ): 240 ):
233 """ 241 """
234 Constructor 242 Constructor
235 243
236 @param dbs reference to the debug server object 244 @param dbs reference to the debug server object
237 @type DebugServer 245 @type DebugServer
238 @param fn name of the file to be opened. If it is None, a new (empty) 246 @param fn name of the file to be opened. If it is None, a new (empty)
239 editor is opened. 247 editor is opened. (defaults to "")
240 @type str 248 @type str (optional)
241 @param vm reference to the view manager object 249 @param vm reference to the view manager object (defaults to None)
242 @type ViewManager 250 @type ViewManager (optional)
243 @param filetype type of the source file 251 @param filetype type of the source file (defaults to "")
244 @type str 252 @type str (optional)
245 @param editor reference to an Editor object, if this is a cloned view 253 @param editor reference to an Editor object, if this is a cloned view
246 @type Editor 254 (defaults to None)
247 @param tv reference to the task viewer object 255 @type Editor (optional)
248 @type TaskViewer 256 @param tv reference to the task viewer object (defaults to None)
249 @param parent reference to the parent widget 257 @type TaskViewer (optional)
250 @type QWidget 258 @param assembly reference to the editor assembly object (defaults to None)
259 @type EditorAssembly (optional)
260 @param parent reference to the parent widget (defaults to None)
261 @type QWidget (optional)
251 @exception OSError raised to indicate an issue accessing the file 262 @exception OSError raised to indicate an issue accessing the file
252 """ 263 """
253 super().__init__(parent) 264 super().__init__(parent)
254 self.setAttribute(Qt.WidgetAttribute.WA_KeyCompression) 265 self.setAttribute(Qt.WidgetAttribute.WA_KeyCompression)
255 self.setUtf8(True) 266 self.setUtf8(True)
256 267
257 self.enableMultiCursorSupport() 268 self.enableMultiCursorSupport()
258 269
270 self.__assembly = assembly
259 self.dbs = dbs 271 self.dbs = dbs
260 self.taskViewer = tv 272 self.taskViewer = tv
261 self.fileName = "" 273 self.fileName = ""
262 self.vm = vm 274 self.vm = vm
263 self.filetype = filetype 275 self.filetype = filetype
670 self.grabGesture(Qt.GestureType.PinchGesture) 682 self.grabGesture(Qt.GestureType.PinchGesture)
671 683
672 self.SCN_ZOOM.connect(self.__markerMap.update) 684 self.SCN_ZOOM.connect(self.__markerMap.update)
673 self.__markerMap.update() 685 self.__markerMap.update()
674 686
687 def getAssembly(self):
688 """
689 Public method to get a reference to the editor assembly object.
690
691 @return reference to the editor assembly object
692 @rtype EditorAssembly
693 """
694 return self.__assembly
695
675 def setFileName(self, name): 696 def setFileName(self, name):
676 """ 697 """
677 Public method to set the file name of the current file. 698 Public method to set the file name of the current file.
678 699
679 @param name name of the current file 700 @param name name of the current file

eric ide

mercurial