src/eric7/QScintilla/MiniEditor.py

branch
eric7
changeset 10431
64157aeb0312
parent 10417
c6011e501282
child 10439
21c28b0f9e41
--- a/src/eric7/QScintilla/MiniEditor.py	Wed Dec 20 19:28:22 2023 +0100
+++ b/src/eric7/QScintilla/MiniEditor.py	Thu Dec 21 12:03:40 2023 +0100
@@ -105,7 +105,8 @@
         """
         Public method to perform a simple editor command.
 
-        @param cmd the scintilla command to be performed (integer)
+        @param cmd the scintilla command to be performed
+        @type int
         """
         if cmd == QsciScintilla.SCI_DELETEBACK:
             line, index = self.getCursorPosition()
@@ -266,10 +267,14 @@
         """
         Constructor
 
-        @param filename name of the file to open (string)
-        @param filetype type of the source file (string)
-        @param parent reference to the parent widget (QWidget)
-        @param name object name of the window (string)
+        @param filename name of the file to open
+        @type str
+        @param filetype type of the source file
+        @type str
+        @param parent reference to the parent widget
+        @type QWidget
+        @param name object name of the window
+        @type str
         """
         super().__init__(parent)
         if name is not None:
@@ -386,7 +391,8 @@
         """
         Protected method to handle the close event.
 
-        @param event close event (QCloseEvent)
+        @param event close event
+        @type QCloseEvent
         """
         if self.__maybeSave():
             self.__writeSettings()
@@ -418,7 +424,8 @@
         """
         Private slot to save a file.
 
-        @return flag indicating success (boolean)
+        @return flag indicating success
+        @rtype bool
         """
         if not self.__curFile:
             return self.__saveAs()
@@ -429,7 +436,8 @@
         """
         Private slot to save a file with a new name.
 
-        @return flag indicating success (boolean)
+        @return flag indicating success
+        @rtype bool
         """
         fileName = EricFileDialog.getSaveFileName(self)
         if not fileName:
@@ -490,7 +498,7 @@
         and set the statusbar info.
 
         @param setSb flag indicating an update of the status bar is wanted
-            (boolean)
+        @type bool
         """
         self.saveAct.setEnabled(self.__textEdit.isModified())
 
@@ -556,8 +564,10 @@
         """
         Private function to read a single keyboard shortcut from the settings.
 
-        @param act reference to the action object (EricAction)
-        @param category category the action belongs to (string)
+        @param act reference to the action object
+        @type EricAction
+        @param category category the action belongs to
+        @type str
         """
         if act.objectName():
             accel = Preferences.getSettings().value(
@@ -3158,7 +3168,8 @@
         """
         Private method to ask the user to save the file, if it was modified.
 
-        @return flag indicating, if it is ok to continue (boolean)
+        @return flag indicating, if it is ok to continue
+        @rtype bool
         """
         if self.__textEdit.isModified():
             ret = EricMessageBox.okToClearData(
@@ -3174,8 +3185,10 @@
         """
         Private method to load the given file.
 
-        @param fileName name of the file to load (string)
-        @param filetype type of the source file (string)
+        @param fileName name of the file to load
+        @type str
+        @param filetype type of the source file
+        @type str
         """
         self.__loadEditorConfig(fileName=fileName)
 
@@ -3327,7 +3340,8 @@
         """
         Private method to register the file name of the current file.
 
-        @param fileName name of the file to register (string)
+        @param fileName name of the file to register
+        @type str
         """
         self.__curFile = fileName
 
@@ -3352,7 +3366,8 @@
         """
         Public method to return the name of the file being displayed.
 
-        @return filename of the displayed file (string)
+        @return filename of the displayed file
+        @rtype str
         """
         return self.__curFile
 
@@ -3360,8 +3375,10 @@
         """
         Private method to return the filename part of the given path.
 
-        @param fullFileName full pathname of the given file (string)
-        @return filename part (string)
+        @param fullFileName full pathname of the given file
+        @type str
+        @return filename part
+        @rtype str
         """
         return pathlib.Path(fullFileName).name
 
@@ -3370,6 +3387,7 @@
         Private slot to handle the modificationChanged signal.
 
         @param m modification status
+        @type bool
         """
         self.setWindowModified(m)
         self.__checkActions()
@@ -3379,7 +3397,9 @@
         Private slot to handle the cursorPositionChanged signal.
 
         @param line line number of the cursor
+        @type int
         @param pos position in line of the cursor
+        @type int
         """
         lang = self.getLanguage()
         self.__setSbFile(line + 1, pos, lang)
@@ -3615,7 +3635,8 @@
         """
         Private method to set/reset a monospaced font.
 
-        @param on flag to indicate usage of a monospace font (boolean)
+        @param on flag to indicate usage of a monospace font
+        @type bool
         """
         if on:
             if not self.lexer_:
@@ -3687,7 +3708,7 @@
         Private slot to generate a print preview.
 
         @param printer reference to the printer object
-            (QScintilla.Printer.Printer)
+        @type QScintilla.Printer.Printer
         """
         printer.printRange(self.__textEdit)
 
@@ -3699,7 +3720,8 @@
         """
         Private slot to show the context menu.
 
-        @param coord the position of the mouse pointer (QPoint)
+        @param coord the position of the mouse pointer
+        @type QPoint
         """
         self.contextMenu.popup(self.mapToGlobal(coord))
 
@@ -3730,7 +3752,8 @@
         """
         Private method used to setup the Languages context sub menu.
 
-        @return reference to the generated menu (QMenu)
+        @return reference to the generated menu
+        @rtype QMenu
         """
         menu = QMenu(self.tr("Languages"))
 
@@ -3784,7 +3807,8 @@
         """
         Private slot to show the Languages menu of the status bar.
 
-        @param pos position the menu should be shown at (QPoint)
+        @param pos position the menu should be shown at
+        @type QPoint
         """
         self.languagesMenu.exec(pos)
 
@@ -3821,7 +3845,8 @@
         """
         Private method to handle the selection of a lexer language.
 
-        @param act reference to the action that was triggered (QAction)
+        @param act reference to the action that was triggered
+        @type QAction
         """
         if act == self.noLanguageAct:
             self.__resetLanguage()
@@ -3861,10 +3886,13 @@
         Public method to set a lexer language.
 
         @param filename filename used to determine the associated lexer
-            language (string)
+            language
+        @type str
         @param initTextDisplay flag indicating an initialization of the text
-            display is required as well (boolean)
-        @param pyname name of the pygments lexer to use (string)
+            display is required as well
+        @type bool
+        @param pyname name of the pygments lexer to use
+        @type str
         """
         self.__bindLexer(filename, pyname=pyname)
         self.__textEdit.recolor()
@@ -3923,8 +3951,10 @@
         Private slot to set the correct lexer depending on language.
 
         @param filename filename used to determine the associated lexer
-            language (string)
-        @param pyname name of the pygments lexer to use (string)
+            language
+        @type str
+        @param pyname name of the pygments lexer to use
+        @type str
         """
         if self.lexer_ is not None and (
             self.lexer_.lexer() == "container" or self.lexer_.lexer() is None
@@ -3992,7 +4022,8 @@
         """
         Private slot to handle the need for more styling.
 
-        @param position end position, that needs styling (integer)
+        @param position end position, that needs styling
+        @type int
         """
         self.lexer_.styleText(self.__textEdit.getEndStyled(), position)
 
@@ -4001,8 +4032,9 @@
         Private method to generate a dummy filename for binding a lexer.
 
         @param line0 first line of text to use in the generation process
-            (string)
-        @return dummy file name to be used for binding a lexer (string)
+        @type str
+        @return dummy file name to be used for binding a lexer
+        @rtype str
         """
         bindName = ""
         line0 = line0.lower()
@@ -4076,7 +4108,9 @@
         Public method to get the search or replace history list.
 
         @param key list to return (must be 'search' or 'replace')
-        @return the requested history list (list of strings)
+        @type str
+        @return the requested history list
+        @rtype list of str
         """
         return self.srHistory[key][:]
 
@@ -4085,7 +4119,8 @@
         Public method to determine the selection or the current word for the
         next find operation.
 
-        @return selection or current word (string)
+        @return selection or current word
+        @rtype str
         """
         if self.__textEdit.hasSelectedText():
             text = self.__textEdit.selectedText()
@@ -4135,6 +4170,7 @@
         Private method to get the word at the current position.
 
         @return the word at that current position
+        @rtype str
         """
         line, index = self.getCursorPosition()
         return self.__getWord(line, index)
@@ -4173,7 +4209,8 @@
         """
         Public method to fulfill the ViewManager interface.
 
-        @return reference to the text edit component (QsciScintillaCompat)
+        @return reference to the text edit component
+        @rtype QsciScintillaCompat
         """
         return self.__textEdit
 
@@ -4181,8 +4218,10 @@
         """
         Public method to set a search indicator for the given range.
 
-        @param startPos start position of the indicator (integer)
-        @param indicLength length of the indicator (integer)
+        @param startPos start position of the indicator
+        @type int
+        @param indicLength length of the indicator
+        @type int
         """
         self.__textEdit.setIndicatorRange(self.searchIndicator, startPos, indicLength)
 
@@ -4255,8 +4294,10 @@
         """
         Public method to set the text programatically.
 
-        @param txt text to be set (string)
-        @param filetype type of the source file (string)
+        @param txt text to be set
+        @type str
+        @param filetype type of the source file
+        @type str
         """
         self.__textEdit.setText(txt)
 
@@ -4489,7 +4530,8 @@
         """
         Private slot to zoom to a given value.
 
-        @param value zoom value to be set (integer)
+        @param value zoom value to be set
+        @type int
         """
         self.zoomTo(value)
         self.sbZoom.setValue(self.getZoom())

eric ide

mercurial