signature stringlengths 8 3.44k | body stringlengths 0 1.41M | docstring stringlengths 1 122k | id stringlengths 5 17 |
|---|---|---|---|
def __save_file_action__triggered(self, checked): | return self.save_file()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|&Save'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m146 |
def __save_file_as_action__triggered(self, checked): | return self.save_fileAs()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|Save As ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m147 |
def __save_all_files_action__triggered(self, checked): | return self.save_all_files()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|Save All'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m148 |
def __revert_file_action__triggered(self, checked): | return self.revert_file()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|Revert'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m149 |
def __close_file_action__triggered(self, checked): | return self.close_file()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|Close ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m150 |
def __close_all_files_action__triggered(self, checked): | return self.close_all_files()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&File|Close All ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m151 |
def __load_recent_file__triggered(self, checked): | file = self.sender().data<EOL>if foundations.common.path_exists(file):<EOL><INDENT>return self.load_file(file)<EOL><DEDENT> | Defines the slot triggered by any recent file related action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m152 |
def __undo_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>self.get_current_editor().undo()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|&Undo'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m153 |
def __redo_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>self.get_current_editor().redo()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|&Redo'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m154 |
def __cut_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>if current_widget.objectName() == "<STR_LIT>":<EOL><INDENT>current_widget.copy()<EOL><DEDENT>else:<EOL><INDENT>current_widget.cut()<EOL><DEDENT>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|Cu&t'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m155 |
def __copy_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>current_widget.copy()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|&Copy'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m156 |
def __paste_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>self.get_current_editor().paste()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|&Paste'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m157 |
def __delete_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>self.get_current_editor().delete()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|Delete'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m158 |
def __select_all_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>current_widget.selectAll()<EOL>return True<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Edit|Select All'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m159 |
def __delete_lines_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().delete_lines()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Delete Line(s)'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m160 |
def __duplicate_lines_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().duplicate_lines()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Duplicate Line(s)'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m161 |
def __move_up_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().move_lines_up()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Move Up'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m162 |
def __move_down_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().move_lines_down()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Move Down'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m163 |
def __indent_selection_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().indent()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Indent Selection'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m164 |
def __unindent_selection_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().unindent()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Unindent Selection'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m165 |
def __convert_indentation_to_tabs_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().convert_indentation_to_tabs()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Source|Convert Identation To Tabs'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m166 |
def __convert_indentation_to_spaces_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().convert_indentation_to_spaces()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Source|Convert Identation To Spaces'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m167 |
def __remove_trailing_white_spaces_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().remove_trailing_white_spaces()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Source|Remove Trailing WhiteSpaces'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m168 |
def __toggle_comments_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().toggle_comments()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Source|Toggle Comments'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m169 |
def __go_to_line_action__triggered(self, checked): | return self.go_to_line()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Navigate|Goto Line ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m170 |
def __search_and_replace_action__triggered(self, checked): | return self.search_and_replace_ui()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Search|Search And Replace ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m171 |
def __search_in_files_action__triggered(self, checked): | return self.search_in_files_ui()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Search|Search In Files ...'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m172 |
def __search_next_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().search_next()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Search|Search Next'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m173 |
def __search_previous_action__triggered(self, checked): | if not self.has_editor_tab():<EOL><INDENT>return False<EOL><DEDENT>return self.get_current_editor().search_previous()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Search|Search Previous'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m174 |
def __evaluate_selection_action__triggered(self, checked): | return self.evaluate_selection()<EOL> | Defines the slot triggered by
**'Actions|Umbra|Components|factory.script_editor|&Command|&Evaluate Selection'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m175 |
def __evaluate_script_action__triggered(self, checked): | return self.evaluate_script()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&Command|Evaluate &Script'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m176 |
def __increase_font_size_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>return current_widget.zoom_in()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&View|Increase Font Size'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m177 |
def __decrease_font_size_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>return current_widget.zoom_out()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&View|Decrease Font Size'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m178 |
def __toggle_word_wrap_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>return current_widget.toggle_word_wrap()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&View|Toggle Word Wrap'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m179 |
def __toggle_white_spaces_action__triggered(self, checked): | current_widget = self.get_focus_widget()<EOL>if not current_widget:<EOL><INDENT>return False<EOL><DEDENT>return current_widget.toggle_white_spaces()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&View|Toggle White Spaces'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m180 |
def __loop_through_editors_action__triggered(self, checked): | return self.loop_through_editors()<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|&View|Loop Through Editors'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m181 |
def __edit_selected_path_action__triggered(self, checked): | return self.load_path(<EOL>foundations.strings.to_string(self.Script_Editor_Output_plainTextEdit.get_selected_text()))<EOL> | Defines the slot triggered by **'Actions|Umbra|Components|factory.script_editor|Edit Selected Path'** action.
:param checked: Checked state.
:type checked: bool
:return: Method success.
:rtype: bool | f13127:c0:m182 |
def __editor__patterns_replaced(self, patterns): | replacedPatternsCount = len(patterns)<EOL>replacedPatternsCount and self.__engine.notifications_manager.notify(<EOL>"<STR_LIT>".format(self.__class__.__name__, replacedPatternsCount))<EOL> | Defines the slot triggered by an editor when patterns have been replaced. | f13127:c0:m183 |
def __editor__title_changed(self): | self.__set_tab_title(self.get_editorTab(self.sender()))<EOL>self.__set_window_title()<EOL> | Defines the slot triggered by an editor when title is changed. | f13127:c0:m184 |
def __editor__file_loaded(self): | self.register_node_path(self.sender())<EOL> | Defines the slot triggered by an editor when file is loaded. | f13127:c0:m185 |
def __editor__file_saved(self): | self.register_node_path(self.sender())<EOL> | Defines the slot triggered by an editor when file is saved. | f13127:c0:m186 |
def __editor__language_changed(self): | self.Editor_Status_editorStatus._EditorStatus__Languages_comboBox_set_default_view_state()<EOL> | Defines the slot triggered by an editor when language is changed. | f13127:c0:m187 |
def __editor__modification_changed(self, changed): | if self.sender() is not None:<EOL><INDENT>self.search_in_files._SearchInFiles__uncache(self.sender().file)<EOL><DEDENT> | Defines the slot triggered by an editor when document is modified.
:param changed: File modification state.
:type changed: bool | f13127:c0:m188 |
def __initialize_languages_model(self): | languages = [PYTHON_LANGUAGE, LOGGING_LANGUAGE, TEXT_LANGUAGE]<EOL>existingGrammarFiles = [os.path.normpath(language.file) for language in languages]<EOL>for directory in RuntimeGlobals.resources_directories:<EOL><INDENT>for file in foundations.walkers.files_walker(directory, ("<STR_LIT>".format(self.__extension),), ("<STR_LIT>",)):<EOL><INDENT>if os.path.normpath(file) in existingGrammarFiles:<EOL><INDENT>continue<EOL><DEDENT>languageDescription = get_language_description(file)<EOL>if not languageDescription:<EOL><INDENT>continue<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(languageDescription))<EOL>languages.append(languageDescription)<EOL><DEDENT><DEDENT>self.__languages_model = LanguagesModel(self, sorted(languages, key=lambda x: (x.name)))<EOL>self.__get_supported_file_types_string()<EOL> | Initializes the languages Model. | f13127:c0:m189 |
@umbra.engine.encapsulate_processing<EOL><INDENT>def __handle_dropped_content(self, event):<DEDENT> | if not event.mimeData().hasUrls():<EOL><INDENT>return<EOL><DEDENT>urls = event.mimeData().urls()<EOL>self.__engine.start_processing("<STR_LIT>", len(urls))<EOL>for url in event.mimeData().urls():<EOL><INDENT>path = foundations.strings.to_string(url.path())<EOL>LOGGER.debug("<STR_LIT>".format(path))<EOL>path = (platform.system() == "<STR_LIT>" or platform.system() == "<STR_LIT>") andre.search(r"<STR_LIT>", path) and path[<NUM_LIT:1>:] or path<EOL>self.load_path(path) and self.restore_development_layout()<EOL>self.__engine.step_processing()<EOL><DEDENT>self.__engine.stop_processing()<EOL> | Handles dopped content event.
:param event: Content dropped event.
:type event: QEvent | f13127:c0:m190 |
def __get_supported_file_types_string(self): | languages = ["<STR_LIT>"]<EOL>for language in self.__languages_model.languages:<EOL><INDENT>languages.append("<STR_LIT>".format(language.name,<EOL>"<STR_LIT:U+0020>".join(language.extensions.split("<STR_LIT:|>")).replace("<STR_LIT:\\>", "<STR_LIT:*>")))<EOL><DEDENT>return "<STR_LIT>".join(languages)<EOL> | Returns the supported file types dialog string. | f13127:c0:m191 |
def __set_recent_files_actions(self): | recentFiles = [foundations.strings.to_string(file)<EOL>for file in self.__settings.get_key(self.__settings_section, "<STR_LIT>").toStringList()<EOL>if foundations.common.path_exists(file)]<EOL>if not recentFiles:<EOL><INDENT>return<EOL><DEDENT>numberRecentFiles = min(len(recentFiles), self.__maximum_recent_files)<EOL>for i in range(self.__maximum_recent_files):<EOL><INDENT>if i >= numberRecentFiles:<EOL><INDENT>self.__recent_files_actions[i].setVisible(False)<EOL>continue<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(recentFiles[i]))<EOL>self.__recent_files_actions[i].setText("<STR_LIT>".format(i + <NUM_LIT:1>, os.path.basename(<EOL>foundations.strings.to_string(recentFiles[i]))))<EOL>self.__recent_files_actions[i].data = foundations.strings.to_string(recentFiles[i])<EOL>self.__recent_files_actions[i].setVisible(True)<EOL><DEDENT> | Sets the recent files actions. | f13127:c0:m192 |
def __store_recent_file(self, file): | LOGGER.debug("<STR_LIT>".format(file))<EOL>recentFiles = [foundations.strings.to_string(recentFile)<EOL>for recentFile in self.__settings.get_key(self.__settings_section, "<STR_LIT>").toStringList()<EOL>if foundations.common.path_exists(recentFile)]<EOL>if not recentFiles:<EOL><INDENT>recentFiles = []<EOL><DEDENT>if file in recentFiles:<EOL><INDENT>recentFiles.pop(recentFiles.index(file))<EOL><DEDENT>recentFiles.insert(<NUM_LIT:0>, file)<EOL>del recentFiles[self.__maximum_recent_files:]<EOL>recentFiles = self.__settings.set_key(self.__settings_section, "<STR_LIT>", recentFiles)<EOL>self.recent_files_changed.emit()<EOL> | Stores given recent file into the settings.
:param file: File to store.
:type file: unicode | f13127:c0:m193 |
def __set_window_title(self): | if self.has_editor_tab():<EOL><INDENT>windowTitle = "<STR_LIT>".format(self.__default_window_title, self.get_current_editor().file)<EOL><DEDENT>else:<EOL><INDENT>windowTitle = "<STR_LIT>".format(self.__default_window_title)<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(windowTitle))<EOL>self.setWindowTitle(windowTitle)<EOL> | Sets the Component window title. | f13127:c0:m194 |
def __set_tab_title(self, index): | editor = self.get_widget(index)<EOL>if not editor:<EOL><INDENT>return<EOL><DEDENT>title, tool_tip = foundations.strings.to_string(editor.title), foundations.strings.to_string(editor.file)<EOL>LOGGER.debug(<EOL>"<STR_LIT>".format(title, tool_tip, index))<EOL>color = QColor(<NUM_LIT>, <NUM_LIT>, <NUM_LIT>) if editor.is_modified() else QColor(<NUM_LIT>, <NUM_LIT>, <NUM_LIT>)<EOL>self.Script_Editor_tabWidget.tabBar().setTabTextColor(index, color)<EOL>tabText = self.Script_Editor_tabWidget.tabText(index)<EOL>tabText != title and self.Script_Editor_tabWidget.setTabText(index, title)<EOL>self.Script_Editor_tabWidget.setTabToolTip(index, tool_tip)<EOL> | Sets the name and toolTip of the **Script_Editor_tabWidget** Widget tab with given index.
:param index: Index of the tab containing the Model editor.
:type index: int | f13127:c0:m195 |
def __has_editor_lock(self, editor): | return hasattr(editor, "<STR_LIT>")<EOL> | Returns if given editor has a lock.
:param editor: Editor.
:type editor: Editor
:return: Has editor lock.
:rtype: bool | f13127:c0:m196 |
def __lock_editor(self, editor): | setattr(editor, "<STR_LIT>", True)<EOL> | Locks given editor.
:param editor: Editor.
:type editor: Editor | f13127:c0:m197 |
def __unlock_editor(self, editor): | delattr(editor, "<STR_LIT>")<EOL> | Locks given editor.
:param editor: Editor.
:type editor: Editor | f13127:c0:m198 |
def __get_untitled_file_name(self): | untitledNameId = Editor._Editor__untitled_name_id<EOL>for file in self.list_files():<EOL><INDENT>if not os.path.dirname(file) == self.__default_session_directory:<EOL><INDENT>continue<EOL><DEDENT>search = re.search(r"<STR_LIT>", os.path.basename(file))<EOL>if not search:<EOL><INDENT>continue<EOL><DEDENT>untitledNameId = max(int(search.group(<NUM_LIT:0>)), untitledNameId) + <NUM_LIT:1><EOL><DEDENT>name = "<STR_LIT>".format(self.__default_file_name, untitledNameId, self.__default_file_extension)<EOL>Editor._Editor__untitled_name_id += <NUM_LIT:1><EOL>LOGGER.debug("<STR_LIT>".format(name))<EOL>return name<EOL> | Returns an untitled file name.
:return: Untitled file name.
:rtype: unicode | f13127:c0:m199 |
def register_file(self, file): | not self.__engine.file_system_events_manager.is_path_registered(file) andself.__engine.file_system_events_manager.register_path(file)<EOL>return True<EOL> | Registers given file in the **file_system_events_manager**.
:param file: File.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m200 |
def unregister_file(self, file): | self.__engine.file_system_events_manager.is_path_registered(file) andself.__engine.file_system_events_manager.unregister_path(file)<EOL>return True<EOL> | Unregisters given file in the **file_system_events_manager**.
:param file: File.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m201 |
def register_node_path(self, node): | path = node.file if hasattr(node, "<STR_LIT:file>") else node.path<EOL>path = foundations.strings.to_string(path)<EOL>if not foundations.common.path_exists(path):<EOL><INDENT>return False<EOL><DEDENT>return self.register_file(path)<EOL> | Registers given Node path in the **file_system_events_manager**.
:param node: Node.
:type node: FileNode or DirectoryNode or ProjectNode
:return: Method success.
:rtype: bool | f13127:c0:m202 |
def unregister_node_path(self, node): | path = node.file if hasattr(node, "<STR_LIT:file>") else node.path<EOL>path = foundations.strings.to_string(path)<EOL>return self.unregister_file(path)<EOL> | Unregisters given Node path from the **file_system_events_manager**.
:param node: Node.
:type node: FileNode or DirectoryNode or ProjectNode
:return: Method success.
:rtype: bool | f13127:c0:m203 |
def load_file_ui(self): | editor = self.get_current_editor()<EOL>file = editor and editor.file or None<EOL>browsedPath = os.path.dirname(file) if foundations.common.path_exists(<EOL>file) else RuntimeGlobals.last_browsed_path<EOL>files = umbra.ui.common.store_last_browsed_path(QFileDialog.getOpenFileNames(self,<EOL>"<STR_LIT>",<EOL>browsedPath,<EOL>self.__get_supported_file_types_string()))<EOL>if not files:<EOL><INDENT>return False<EOL><DEDENT>success = True<EOL>for file in files:<EOL><INDENT>success *= self.load_file(file)<EOL><DEDENT>return success<EOL> | Loads user chosen file(s) into **Script_Editor_tabWidget** Widget tab Model editor(s).
:return: Method success.
:rtype: bool
:note: May require user interaction. | f13127:c0:m204 |
def add_project_ui(self): | directory = umbra.ui.common.store_last_browsed_path(QFileDialog.getExistingDirectory(self,<EOL>"<STR_LIT>",<EOL>RuntimeGlobals.last_browsed_path))<EOL>if not directory:<EOL><INDENT>return False<EOL><DEDENT>return self.add_project(directory)<EOL> | Adds user chosen project **Script_Editor_tabWidget** Widget tab Model.
:return: Method success.
:rtype: bool
:note: May require user interaction. | f13127:c0:m205 |
def search_and_replace_ui(self): | self.__search_and_replace.show()<EOL>return True<EOL> | Performs a search and replace in the current **Script_Editor_tabWidget** Widget tab Model editor.
:return: Method success.
:rtype: bool
:note: May require user interaction. | f13127:c0:m206 |
def search_in_files_ui(self): | self.__search_in_files.show()<EOL>return True<EOL> | Performs a search in the current user chosen files.
:return: Method success.
:rtype: bool
:note: May require user interaction. | f13127:c0:m207 |
def get_widget(self, index): | if index is not None:<EOL><INDENT>return self.Script_Editor_tabWidget.widget(index)<EOL><DEDENT> | Returns the **Script_Editor_tabWidget** Widget associated with given index.
:param index: Tab index.
:type index: int
:return: Widget.
:rtype: QWidget | f13127:c0:m208 |
def get_focus_widget(self): | current_widget = QApplication.focusWidget()<EOL>if current_widget is None:<EOL><INDENT>return False<EOL><DEDENT>if current_widget.objectName() == "<STR_LIT>" orisinstance(current_widget, Editor):<EOL><INDENT>return current_widget<EOL><DEDENT> | Returns the Widget with focus.
:return: Widget with focus.
:rtype: QWidget | f13127:c0:m209 |
def get_editorTab(self, editor): | for i in range(self.Script_Editor_tabWidget.count()):<EOL><INDENT>if not self.get_widget(i) == editor:<EOL><INDENT>continue<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(editor, i))<EOL>return i<EOL><DEDENT> | Returns the **Script_Editor_tabWidget** Widget tab associated with the given editor.
:param editor: Editor to search tab for.
:type editor: Editor
:return: Tab index.
:rtype: Editor | f13127:c0:m210 |
def add_editor_tab(self, editor): | index = self.Script_Editor_tabWidget.addTab(editor, editor.get_file_short_name())<EOL>LOGGER.debug("<STR_LIT>".format(editor, index))<EOL>self.Script_Editor_tabWidget.setCurrentIndex(index)<EOL>self.__set_tab_title(index)<EOL>editor.patterns_replaced.connect(self.__editor__patterns_replaced)<EOL>editor.title_changed.connect(self.__editor__title_changed)<EOL>editor.file_loaded.connect(self.__editor__file_loaded)<EOL>editor.file_saved.connect(self.__editor__file_saved)<EOL>editor.language_changed.connect(self.__editor__language_changed)<EOL>editor.modification_changed.connect(self.__editor__modification_changed)<EOL>editor.cursorPositionChanged.connect(<EOL>self.Editor_Status_editorStatus._EditorStatus__editor__cursorPositionChanged)<EOL>return index<EOL> | Adds a new tab to the **Script_Editor_tabWidget** Widget and sets the given editor as child widget.
:param editor: Editor.
:type editor: Editor
:return: New tab index.
:rtype: int | f13127:c0:m211 |
def remove_editor_tab(self, editor): | LOGGER.debug("<STR_LIT>".format(editor))<EOL>self.Script_Editor_tabWidget.removeTab(self.get_editorTab(editor))<EOL>return True<EOL> | Removes the **Script_Editor_tabWidget** Widget tab with given editor.
:param editor: Editor.
:type editor: Editor
:return: Method success.
:rtype: bool | f13127:c0:m212 |
def find_editor_tab(self, file): | for i in range(self.Script_Editor_tabWidget.count()):<EOL><INDENT>if not self.get_widget(i).file == file:<EOL><INDENT>continue<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(file, i))<EOL>return i<EOL><DEDENT> | Finds the **Script_Editor_tabWidget** Widget tab associated to the given file.
:param file: File to search tab for.
:type file: unicode
:return: Tab index.
:rtype: Editor | f13127:c0:m213 |
def has_editor_tab(self): | return self.Script_Editor_tabWidget.count() and True or False<EOL> | Returns if the **Script_Editor_tabWidget** Widget has at least one tab.
:return: Has tab.
:rtype: bool | f13127:c0:m214 |
def get_current_editor(self): | if not self.has_editor_tab():<EOL><INDENT>return<EOL><DEDENT>return self.Script_Editor_tabWidget.currentWidget()<EOL> | Returns the current **Script_Editor_tabWidget** Widget tab Model editor.
:return: Current editor.
:rtype: Editor | f13127:c0:m215 |
def set_current_editor(self, file): | index = self.find_editor_tab(file)<EOL>if index is not None:<EOL><INDENT>self.Script_Editor_tabWidget.setCurrentIndex(index)<EOL>return True<EOL><DEDENT> | Focus the **Script_Editor_tabWidget** Widget tab Model editor with given file.
:param file: File.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m216 |
def load_path(self, path): | if not foundations.common.path_exists(path):<EOL><INDENT>return False<EOL><DEDENT>if os.path.isfile(path):<EOL><INDENT>if path in self.list_files():<EOL><INDENT>self.set_current_editor(path)<EOL><DEDENT>else:<EOL><INDENT>self.load_file(path)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if not path in self.list_projects():<EOL><INDENT>self.add_project(path)<EOL><DEDENT><DEDENT>return True<EOL> | Loads given path.
:param path: Path to load.
:type path: unicode
:return: Method success.
:rtype: bool | f13127:c0:m217 |
def load_document(self, document, file): | if not foundations.common.path_exists(file):<EOL><INDENT>raise foundations.exceptions.FileExistsError("<STR_LIT>".format(<EOL>self.__class__.__name__, file))<EOL><DEDENT>if self.get_editor(file):<EOL><INDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>return True<EOL><DEDENT>self.close_first_file()<EOL>language = self.__languages_model.get_language(self.__default_language)<EOL>editor = Editor(parent=self, language=language)<EOL>if not editor.new_file():<EOL><INDENT>return False<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>language = self.__languages_model.get_file_language(<EOL>file) or self.__languages_model.get_language(self.__default_language)<EOL>if not editor.load_document(document, file, language):<EOL><INDENT>return False<EOL><DEDENT>if self.__model.set_authoring_nodes(editor):<EOL><INDENT>self.__store_recent_file(file)<EOL>self.file_loaded.emit(file)<EOL>return True<EOL><DEDENT> | Loads given document into a new **Script_Editor_tabWidget** Widget tab Model editor.
:param document: Document to load.
:type document: QTextDocument
:param file: Document file.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m218 |
def add_project(self, path): | if not foundations.common.path_exists(path):<EOL><INDENT>return False<EOL><DEDENT>path = os.path.normpath(path)<EOL>if self.__model.get_project_nodes(path):<EOL><INDENT>self.__engine.notifications_manager.warnify(<EOL>"<STR_LIT>".format(self.__class__.__name__, path))<EOL>return False<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, path))<EOL>project_node = self.__model.register_project(path)<EOL>if not project_node:<EOL><INDENT>return False<EOL><DEDENT>self.__model.set_project_nodes(project_node)<EOL>return True<EOL> | Adds a project.
:param path: Project path.
:type path: unicode
:return: Method success.
:rtype: bool | f13127:c0:m219 |
def remove_project(self, path): | project_node = foundations.common.get_first_item(self.__model.get_project_nodes(path))<EOL>if not project_node:<EOL><INDENT>self.__engine.notifications_manager.warnify(<EOL>"<STR_LIT>".format(self.__class__.__name__, path))<EOL>return False<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, path))<EOL>self.__model.delete_project_nodes(project_node)<EOL>return True<EOL> | Removes a project.
:param path: Project path.
:type path: unicode
:return: Method success.
:rtype: bool | f13127:c0:m220 |
def new_file(self): | language = self.__languages_model.get_language(self.__default_script_language)<EOL>editor = Editor(parent=self, language=language)<EOL>file = editor.new_file()<EOL>if not file:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>if self.__model.set_authoring_nodes(editor):<EOL><INDENT>self.__store_recent_file(file)<EOL>self.file_loaded.emit(file)<EOL>return True<EOL><DEDENT> | Creates a new file into a new **Script_Editor_tabWidget** Widget tab.
:return: Method success.
:rtype: bool | f13127:c0:m221 |
@foundations.exceptions.handle_exceptions(foundations.exceptions.FileExistsError)<EOL><INDENT>def load_file(self, file):<DEDENT> | if not foundations.common.path_exists(file):<EOL><INDENT>raise foundations.exceptions.FileExistsError("<STR_LIT>".format(<EOL>self.__class__.__name__, file))<EOL><DEDENT>if self.get_editor(file):<EOL><INDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>return True<EOL><DEDENT>self.close_first_file()<EOL>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>language = self.__languages_model.get_file_language(<EOL>file) or self.__languages_model.get_language(self.__default_language)<EOL>editor = Editor(parent=self, language=language)<EOL>if not editor.load_file(file):<EOL><INDENT>return False<EOL><DEDENT>if self.__model.set_authoring_nodes(editor):<EOL><INDENT>self.__store_recent_file(file)<EOL>self.file_loaded.emit(file)<EOL>return True<EOL><DEDENT> | Loads user chosen file in a new **Script_Editor_tabWidget** Widget tab Model editor.
:param file: File to load.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m222 |
@foundations.exceptions.handle_exceptions(foundations.exceptions.FileExistsError)<EOL><INDENT>def reload_file(self, file, is_modified=True):<DEDENT> | if not foundations.common.path_exists(file):<EOL><INDENT>raise foundations.exceptions.FileExistsError("<STR_LIT>".format(<EOL>self.__class__.__name__, file))<EOL><DEDENT>editor = self.get_editor(file)<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>if self.__has_editor_lock(editor):<EOL><INDENT>self.__unlock_editor(editor)<EOL>return True<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>return editor.reload_file(is_modified)<EOL> | Reloads given file **Script_Editor_tabWidget** Widget tab Model editor content.
:param file: File to reload.
:type file: unicode
:param is_modified: File modified state.
:type is_modified: bool
:return: Method success.
:rtype: bool | f13127:c0:m223 |
def save_file(self, file=None): | editor = file and self.get_editor(file) or self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, editor.file))<EOL>self.__lock_editor(editor)<EOL>if not editor.is_untitled and foundations.common.path_exists(editor.file):<EOL><INDENT>return editor.save_file()<EOL><DEDENT>else:<EOL><INDENT>return self.save_fileAs()<EOL><DEDENT> | Saves either given file or current **Script_Editor_tabWidget** Widget tab Model editor file.
:param file: File to save.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m224 |
@foundations.exceptions.handle_exceptions(umbra.exceptions.notify_exception_handler,<EOL>foundations.exceptions.UserError)<EOL><INDENT>def save_fileAs(self):<DEDENT> | editor = self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>file = umbra.ui.common.store_last_browsed_path(QFileDialog.getSaveFileName(self, "<STR_LIT>", editor.file))<EOL>if not file:<EOL><INDENT>return False<EOL><DEDENT>candidate_editor = self.get_editor(file)<EOL>if candidate_editor:<EOL><INDENT>if not candidate_editor is editor:<EOL><INDENT>raise foundations.exceptions.UserError("<STR_LIT>".format(<EOL>self.__class__.__name__, file))<EOL><DEDENT>else:<EOL><INDENT>return self.save_file(file)<EOL><DEDENT><DEDENT>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>self.__lock_editor(editor)<EOL>self.unregister_node_path(editor)<EOL>if editor.save_fileAs(file):<EOL><INDENT>self.__model.update_authoring_nodes(editor)<EOL>language = self.__languages_model.get_file_language(<EOL>file) or self.__languages_model.get_language(self.__default_language)<EOL>if editor.language.name != language.name:<EOL><INDENT>self.set_language(editor, language)<EOL><DEDENT>return True<EOL><DEDENT> | Saves current **Script_Editor_tabWidget** Widget tab Model editor file as user chosen file.
:return: Method success.
:rtype: bool | f13127:c0:m225 |
@umbra.engine.encapsulate_processing<EOL><INDENT>def save_all_files(self):<DEDENT> | self.__engine.start_processing("<STR_LIT>", len(self.list_editors()))<EOL>success = True<EOL>for file in self.list_files():<EOL><INDENT>success *= self.save_file(file)<EOL>self.__engine.step_processing()<EOL><DEDENT>self.__engine.stop_processing()<EOL>return success<EOL> | Saves all **Script_Editor_tabWidget** Widget tab Model editor files.
:return: Method success.
:rtype: bool | f13127:c0:m226 |
@umbra.engine.encapsulate_processing<EOL><INDENT>def revert_file(self, file=None):<DEDENT> | editor = file and self.get_editor(file) or self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>file = editor.file<EOL>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>if self.reload_file(file, is_modified=False):<EOL><INDENT>return True<EOL><DEDENT> | Reverts either given file or current **Script_Editor_tabWidget** Widget tab Model editor file.
:param file: File to revert.
:type file: unicode
:return: Method success.
:rtype: bool | f13127:c0:m227 |
def close_file(self, file=None, leave_first_editor=True): | editor = file and self.get_editor(file) or self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>file = editor.file<EOL>LOGGER.info("<STR_LIT>".format(self.__class__.__name__, file))<EOL>if not editor.close_file():<EOL><INDENT>return False<EOL><DEDENT>if self.__model.delete_authoring_nodes(editor):<EOL><INDENT>if not self.has_editor_tab() and leave_first_editor:<EOL><INDENT>self.new_file()<EOL><DEDENT>self.file_closed.emit(file)<EOL>return True<EOL><DEDENT> | Closes either given file or current **Script_Editor_tabWidget** Widget tab Model editor file.
:param file: File to save.
:type file: unicode
:param leave_first_editor: Leave first editor.
:type leave_first_editor: bool
:return: Method success.
:rtype: bool | f13127:c0:m228 |
def close_all_files(self, leave_first_editor=True): | <EOL>success = True<EOL>for file in self.list_files():<EOL><INDENT>success *= True if self.close_file(file, leave_first_editor) else False<EOL>if not success:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return success<EOL> | Closes every opened files and removes their associated **Script_Editor_tabWidget** Widget tabs.
:return: Method success.
:rtype: bool | f13127:c0:m229 |
def close_first_file(self): | editor = self.get_current_editor()<EOL>if len(self.__model.list_editors()) == <NUM_LIT:1> and editor.is_untitled and not editor.is_modified():<EOL><INDENT>self.close_file(leave_first_editor=False)<EOL>return True<EOL><DEDENT> | Attemtps to close the first **Script_Editor_tabWidget** Widget tab Model editor file.
:return: Method success.
:rtype: bool | f13127:c0:m230 |
def list_editors(self): | return self.__model.list_editors()<EOL> | Returns the Model editors.
:return: Editors.
:rtype: list | f13127:c0:m231 |
def list_files(self): | return self.__model.list_files()<EOL> | Returns the Model files.
:return: FileNode nodes.
:rtype: list | f13127:c0:m232 |
def list_directories(self): | return self.__model.list_directories()<EOL> | Returns the Model directories.
:return: DirectoryNode nodes.
:rtype: list | f13127:c0:m233 |
def list_projects(self, ignore_default_project=True): | return self.__model.list_projects()<EOL> | Returns the Model projects.
:return: ProjectNode nodes.
:rtype: list | f13127:c0:m234 |
def get_editor(self, file): | for editor in self.__model.list_editors():<EOL><INDENT>if editor.file == file:<EOL><INDENT>return editor<EOL><DEDENT><DEDENT> | Returns the Model editor associated with given file.
:param file: File to search editors for.
:type file: unicode
:return: Editor.
:rtype: Editor | f13127:c0:m235 |
def set_language(self, editor, language): | LOGGER.debug("<STR_LIT>".format(language.name, editor))<EOL>return editor.set_language(language)<EOL> | Sets given language to given Model editor.
:param editor: Editor to set language to.
:type editor: Editor
:param language: Language to set.
:type language: Language
:return: Method success.
:rtype: bool | f13127:c0:m236 |
def go_to_line(self): | editor = self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>line, state = QInputDialog.getInt(self, "<STR_LIT>", "<STR_LIT>", min=<NUM_LIT:1>)<EOL>if not state:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(line))<EOL>return editor.go_to_line(line)<EOL> | Moves current **Script_Editor_tabWidget** Widget tab Model editor cursor to user defined line.
:return: Method success.
:rtype: bool
:note: May require user interaction. | f13127:c0:m237 |
def evaluate_selection(self): | editor = self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.debug("<STR_LIT>")<EOL>if self.evaluate_code(<EOL>foundations.strings.to_string(editor.get_selected_text().replace(QChar(QChar.ParagraphSeparator),<EOL>QString("<STR_LIT:\n>")))):<EOL><INDENT>self.ui_refresh.emit()<EOL>return True<EOL><DEDENT> | Evaluates current **Script_Editor_tabWidget** Widget tab Model editor
selected content in the interactive console.
:return: Method success.
:rtype: bool | f13127:c0:m238 |
def evaluate_script(self): | editor = self.get_current_editor()<EOL>if not editor:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.debug("<STR_LIT>")<EOL>if self.evaluate_code(foundations.strings.to_string(editor.toPlainText().toUtf8())):<EOL><INDENT>self.ui_refresh.emit()<EOL>return True<EOL><DEDENT> | Evaluates current **Script_Editor_tabWidget** Widget tab Model editor content
into the interactive console.
:return: Method success.
:rtype: bool | f13127:c0:m239 |
def evaluate_code(self, code): | if not code:<EOL><INDENT>return False<EOL><DEDENT>LOGGER.debug("<STR_LIT>")<EOL>code = code.endswith("<STR_LIT:\n>") and code or "<STR_LIT>".format(code)<EOL>code = code.split("<STR_LIT:\n>", <NUM_LIT:3>)<EOL>for i, line in enumerate(code[:-<NUM_LIT:2>]):<EOL><INDENT>if "<STR_LIT>" in line:<EOL><INDENT>code[i] = line.replace("<STR_LIT:=>", "<STR_LIT>").replace("<STR_LIT::>", "<STR_LIT>")<EOL>break<EOL><DEDENT><DEDENT>code = "<STR_LIT:\n>".join(code)<EOL>sys.stdout.write(code)<EOL>self.__console.runcode(code)<EOL>return True<EOL> | Evaluates given code into the interactive console.
:param code: Code to evaluate.
:type code: unicode
:return: Method success.
:rtype: bool | f13127:c0:m240 |
def store_session(self): | session = []<EOL>for editor in self.list_editors():<EOL><INDENT>file = editor.file<EOL>ignore_file = True<EOL>if editor.is_untitled and not editor.is_empty():<EOL><INDENT>file = os.path.join(self.__default_session_directory, file)<EOL>editor.write_file(file)<EOL><DEDENT>elif os.path.dirname(file) == self.__default_session_directory:<EOL><INDENT>editor.save_file()<EOL><DEDENT>session.append(file)<EOL><DEDENT>for directory in self.list_projects():<EOL><INDENT>if not os.path.exists(directory):<EOL><INDENT>continue<EOL><DEDENT>session.append(directory)<EOL><DEDENT>LOGGER.debug("<STR_LIT>".format(session))<EOL>self.__settings.set_key(self.__settings_section, "<STR_LIT>", session)<EOL>return True<EOL> | Stores the current session.
:return: Method success.
:rtype: bool | f13127:c0:m241 |
def restore_session(self): | session = [foundations.strings.to_string(path)<EOL>for path in self.__settings.get_key(self.__settings_section, "<STR_LIT>").toStringList()<EOL>if foundations.common.path_exists(path)]<EOL>LOGGER.debug("<STR_LIT>".format(session))<EOL>success = True<EOL>for path in session:<EOL><INDENT>if os.path.isfile(path):<EOL><INDENT>success *= self.load_file(path)<EOL><DEDENT>else:<EOL><INDENT>success *= self.add_project(path)<EOL><DEDENT><DEDENT>return success<EOL> | Restores the stored session.
:return: Method success.
:rtype: bool | f13127:c0:m242 |
def loop_through_editors(self, backward=False): | step = not backward and <NUM_LIT:1> or -<NUM_LIT:1><EOL>idx = self.Script_Editor_tabWidget.currentIndex() + step<EOL>if idx < <NUM_LIT:0>:<EOL><INDENT>idx = self.Script_Editor_tabWidget.count() - <NUM_LIT:1><EOL><DEDENT>elif idx > self.Script_Editor_tabWidget.count() - <NUM_LIT:1>:<EOL><INDENT>idx = <NUM_LIT:0><EOL><DEDENT>self.Script_Editor_tabWidget.setCurrentIndex(idx)<EOL>return True<EOL> | Loops through the editor tabs.
:param backward: Looping backward.
:type backward: bool
:return: Method success.
:rtype: bool | f13127:c0:m243 |
def restore_development_layout(self): | if self.__engine.layouts_manager.current_layout != self.__development_layout and not self.isVisible():<EOL><INDENT>self.__engine.layouts_manager.restore_layout(self.__development_layout)<EOL><DEDENT>return True<EOL> | Restores the development layout.
:return: Definition success.
:rtype: bool | f13127:c0:m244 |
def __init__(self,<EOL>parent=None,<EOL>root_node=None,<EOL>horizontal_headers=None,<EOL>vertical_headers=None,<EOL>default_node=None,<EOL>default_project=None): | LOGGER.debug("<STR_LIT>".format(self.__class__.__name__))<EOL>umbra.ui.models.GraphModel.__init__(<EOL>self, parent, root_node, horizontal_headers, vertical_headers, default_node)<EOL>self.__default_project = None<EOL>self.default_project = default_project or "<STR_LIT>"<EOL>self.__default_project_node = None<EOL>ProjectsModel.__initialize_model(self)<EOL> | Initializes the class.
:param default_project: Default project name.
:type default_project: unicode
:param parent: Object parent.
:type parent: QObject
:param root_node: Root node.
:type root_node: AbstractCompositeNode
:param horizontal_headers: Headers.
:type horizontal_headers: OrderedDict
:param vertical_headers: Headers.
:type vertical_headers: OrderedDict
:param default_node: Default node.
:type default_node: GraphModelNode | f13128:c0:m0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.