scriptEditor.py
Others:
Bases: manager.qwidgetComponent.QWidgetComponent
Defines the sibl_gui.components.addons.scriptEditor.scriptEditor Component Interface class.
Initializes the class.
Parameters: |
|
---|
This signal is emited by the ScriptEditor class when the Ui needs to be refreshed. ( pyqtSignal )
This signal is emited by the ScriptEditor class when the recent files list has changed. ( pyqtSignal )
This signal is emited by the ScriptEditor class when a file is loaded. ( pyqtSignal )
Returns: | Loaded file. |
---|---|
Return type: | unicode |
This signal is emited by the ScriptEditor class when a file is closed. ( pyqtSignal )
Returns: | Closed file. |
---|---|
Return type: | unicode |
Property for self.__settings attribute.
Returns: | self.__settings. |
---|---|
Return type: | QSettings |
Property for self.__settingsSection attribute.
Returns: | self.__settingsSection. |
---|---|
Return type: | unicode |
Property for self.__developmentLayout attribute.
Returns: | self.__developmentLayout. |
---|---|
Return type: | unicode |
Property for self.__grammarsDirectory attribute.
Returns: | self.__grammarsDirectory. |
---|---|
Return type: | unicode |
Property for self.__extension attribute.
Returns: | self.__extension. |
---|---|
Return type: | unicode |
Property for self.__languagesModel attribute.
Returns: | self.__languagesModel. |
---|---|
Return type: | LanguagesModel |
Property for self.__defaultProject attribute.
Returns: | self.__defaultProject. |
---|---|
Return type: | unicode |
Property for self.__defaultLanguage attribute.
Returns: | self.__defaultLanguage. |
---|---|
Return type: | unicode |
Property for self.__defaultScriptLanguage attribute.
Returns: | self.__defaultScriptLanguage. |
---|---|
Return type: | unicode |
Property for self.__defaultFileName attribute.
Returns: | self.__defaultFileName. |
---|---|
Return type: | unicode |
Property for self.__defaultFileExtension attribute.
Returns: | self.__defaultFileExtension. |
---|---|
Return type: | unicode |
Property for self.__defaultWindowTitle attribute.
Returns: | self.__defaultWindowTitle. |
---|---|
Return type: | unicode |
Property for self.__defaultScriptEditorDirectory attribute.
Returns: | self.__defaultScriptEditorDirectory. |
---|---|
Return type: | unicode |
Property for self.__defaultSessionDirectory attribute.
Returns: | self.__defaultSessionDirectory. |
---|---|
Return type: | unicode |
Property for self.__defaultScriptEditorFile attribute.
Returns: | self.__defaultScriptEditorFile. |
---|---|
Return type: | unicode |
Property for self.__factoryDefaultScriptEditorFile attribute.
Returns: | self.__factoryDefaultScriptEditorFile. |
---|---|
Return type: | unicode |
Property for self.__scriptEditorFile attribute.
Returns: | self.__scriptEditorFile. |
---|---|
Return type: | unicode |
Property for self.__maximumRecentFiles attribute.
Returns: | self.__maximumRecentFiles. |
---|---|
Return type: | int |
Property for self.__recentFilesActions attribute.
Returns: | self.__recentFilesActions. |
---|---|
Return type: | list |
Property for self.__searchAndReplace attribute.
Returns: | self.__searchAndReplace. |
---|---|
Return type: | SearchAndReplace |
Property for self.__searchInFiles attribute.
Returns: | self.__searchInFiles. |
---|---|
Return type: | SearchInFiles |
Property for self.__indentWidth attribute.
Returns: | self.__indentWidth. |
---|---|
Return type: | int |
Property for self.__defaultFontsSettings attribute.
Returns: | self.__defaultFontsSettings. |
---|---|
Return type: | dict |
Property for self.__memoryHandlerStackDepth attribute.
Returns: | self.__memoryHandlerStackDepth. |
---|---|
Return type: | int |
Property for self.__menuBar attribute.
Returns: | self.__menuBar. |
---|---|
Return type: | QToolbar |
Property for self.__fileMenu attribute.
Returns: | self.__fileMenu. |
---|---|
Return type: | QMenu |
Property for self.__editMenu attribute.
Returns: | self.__editMenu. |
---|---|
Return type: | QMenu |
Property for self.__sourceMenu attribute.
Returns: | self.__sourceMenu. |
---|---|
Return type: | QMenu |
Property for self.__navigateMenu attribute.
Returns: | self.__navigateMenu. |
---|---|
Return type: | QMenu |
Property for self.__searchMenu attribute.
Returns: | self.__searchMenu. |
---|---|
Return type: | QMenu |
Property for self.__commandMenu attribute.
Returns: | self.__commandMenu. |
---|---|
Return type: | QMenu |
Property for self.__viewMenu attribute.
Returns: | self.__viewMenu. |
---|---|
Return type: | QMenu |
Activates the Component.
Parameters: | engine (QObject) – Container to attach the Component to. |
---|---|
Returns: | Method success. |
Return type: | bool |
Adds the Component Widget to the engine.
Returns: | Method success. |
---|---|
Return type: | bool |
Removes the Component Widget from the engine.
Returns: | Method success. |
---|---|
Return type: | bool |
Registers given file in the fileSystemEventsManager.
Parameters: | file (unicode) – File. |
---|---|
Returns: | Method success. |
Return type: | bool |
Unregisters given file in the fileSystemEventsManager.
Parameters: | file (unicode) – File. |
---|---|
Returns: | Method success. |
Return type: | bool |
Registers given Node path in the fileSystemEventsManager.
Parameters: | node (FileNode or DirectoryNode or ProjectNode) – Node. |
---|---|
Returns: | Method success. |
Return type: | bool |
Unregisters given Node path from the fileSystemEventsManager.
Parameters: | node (FileNode or DirectoryNode or ProjectNode) – Node. |
---|---|
Returns: | Method success. |
Return type: | bool |
Loads user chosen file(s) into Script_Editor_tabWidget Widget tab Model editor(s).
Returns: | Method success. |
---|---|
Return type: | bool |
Note: | May require user interaction. |
Adds user chosen project Script_Editor_tabWidget Widget tab Model.
Returns: | Method success. |
---|---|
Return type: | bool |
Note: | May require user interaction. |
Performs a search and replace in the current Script_Editor_tabWidget Widget tab Model editor.
Returns: | Method success. |
---|---|
Return type: | bool |
Note: | May require user interaction. |
Performs a search in the current user chosen files.
Returns: | Method success. |
---|---|
Return type: | bool |
Note: | May require user interaction. |
Returns the Script_Editor_tabWidget Widget associated with given index.
Parameters: | index (int) – Tab index. |
---|---|
Returns: | Widget. |
Return type: | QWidget |
Returns the Widget with focus.
Returns: | Widget with focus. |
---|---|
Return type: | QWidget |
Returns the Script_Editor_tabWidget Widget tab associated with the given editor.
Parameters: | editor (Editor) – Editor to search tab for. |
---|---|
Returns: | Tab index. |
Return type: | Editor |
Adds a new tab to the Script_Editor_tabWidget Widget and sets the given editor as child widget.
Parameters: | editor (Editor) – Editor. |
---|---|
Returns: | New tab index. |
Return type: | int |
Removes the Script_Editor_tabWidget Widget tab with given editor.
Parameters: | editor (Editor) – Editor. |
---|---|
Returns: | Method success. |
Return type: | bool |
Finds the Script_Editor_tabWidget Widget tab associated to the given file.
Parameters: | file (unicode) – File to search tab for. |
---|---|
Returns: | Tab index. |
Return type: | Editor |
Returns if the Script_Editor_tabWidget Widget has at least one tab.
Returns: | Has tab. |
---|---|
Return type: | bool |
Returns the current Script_Editor_tabWidget Widget tab Model editor.
Returns: | Current editor. |
---|---|
Return type: | Editor |
Focus the Script_Editor_tabWidget Widget tab Model editor with given file.
Parameters: | file (unicode) – File. |
---|---|
Returns: | Method success. |
Return type: | bool |
Loads given path.
Parameters: | path (unicode) – Path to load. |
---|---|
Returns: | Method success. |
Return type: | bool |
Loads given document into a new Script_Editor_tabWidget Widget tab Model editor.
Parameters: |
|
---|---|
Returns: | Method success. |
Return type: | bool |
Adds a project.
Parameters: | path (unicode) – Project path. |
---|---|
Returns: | Method success. |
Return type: | bool |
Removes a project.
Parameters: | path (unicode) – Project path. |
---|---|
Returns: | Method success. |
Return type: | bool |
Creates a new file into a new Script_Editor_tabWidget Widget tab.
Returns: | Method success. |
---|---|
Return type: | bool |
Loads user chosen file in a new Script_Editor_tabWidget Widget tab Model editor.
Parameters: | file (unicode) – File to load. |
---|---|
Returns: | Method success. |
Return type: | bool |
Reloads given file Script_Editor_tabWidget Widget tab Model editor content.
Parameters: | |
---|---|
Returns: | Method success. |
Return type: | bool |
Saves either given file or current Script_Editor_tabWidget Widget tab Model editor file.
Parameters: | file (unicode) – File to save. |
---|---|
Returns: | Method success. |
Return type: | bool |
Saves current Script_Editor_tabWidget Widget tab Model editor file as user chosen file.
Returns: | Method success. |
---|---|
Return type: | bool |
Saves all Script_Editor_tabWidget Widget tab Model editor files.
Returns: | Method success. |
---|---|
Return type: | bool |
Reverts either given file or current Script_Editor_tabWidget Widget tab Model editor file.
Parameters: | file (unicode) – File to revert. |
---|---|
Returns: | Method success. |
Return type: | bool |
Closes either given file or current Script_Editor_tabWidget Widget tab Model editor file.
Parameters: | |
---|---|
Returns: | Method success. |
Return type: | bool |
Closes every opened files and removes their associated Script_Editor_tabWidget Widget tabs.
Returns: | Method success. |
---|---|
Return type: | bool |
Attemtps to close the first Script_Editor_tabWidget Widget tab Model editor file.
Returns: | Method success. |
---|---|
Return type: | bool |
Returns the Model directories.
Returns: | DirectoryNode nodes. |
---|---|
Return type: | list |
Returns the Model projects.
Returns: | ProjectNode nodes. |
---|---|
Return type: | list |
Returns the Model editor associated with given file.
Parameters: | file (unicode) – File to search editors for. |
---|---|
Returns: | Editor. |
Return type: | Editor |
Sets given language to given Model editor.
Parameters: |
|
---|---|
Returns: | Method success. |
Return type: | bool |
Moves current Script_Editor_tabWidget Widget tab Model editor cursor to user defined line.
Returns: | Method success. |
---|---|
Return type: | bool |
Note: | May require user interaction. |
Evaluates current Script_Editor_tabWidget Widget tab Model editor selected content in the interactive console.
Returns: | Method success. |
---|---|
Return type: | bool |
Evaluates current Script_Editor_tabWidget Widget tab Model editor content into the interactive console.
Returns: | Method success. |
---|---|
Return type: | bool |
Evaluates given code into the interactive console.
Parameters: | code (unicode) – Code to evaluate. |
---|---|
Returns: | Method success. |
Return type: | bool |