当前位置: 首页>>代码示例>>Python>>正文


Python IDE.editor_settings方法代码示例

本文整理汇总了Python中ninja_ide.gui.ide.IDE.editor_settings方法的典型用法代码示例。如果您正苦于以下问题:Python IDE.editor_settings方法的具体用法?Python IDE.editor_settings怎么用?Python IDE.editor_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ninja_ide.gui.ide.IDE的用法示例。


在下文中一共展示了IDE.editor_settings方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _save

# 需要导入模块: from ninja_ide.gui.ide import IDE [as 别名]
# 或者: from ninja_ide.gui.ide.IDE import editor_settings [as 别名]
    def _save(self):
        qsettings = IDE.ninja_settings()
        editor_settings = IDE.editor_settings()

        qsettings.beginGroup("editor")
        editor_settings.beginGroup("editor")
        qsettings.beginGroup("behavior")
        editor_settings.beginGroup("behavior")

        settings.REMOVE_TRAILING_SPACES = self._check_remove_spaces.isChecked()
        qsettings.setValue("removeTrailingSpaces",
                           settings.REMOVE_TRAILING_SPACES)
        settings.ADD_NEW_LINE_AT_EOF = self._check_add_new_line.isChecked()
        qsettings.setValue("addNewLineAtEnd", settings.ADD_NEW_LINE_AT_EOF)
        settings.HIDE_MOUSE_CURSOR = self._check_hide_cursor.isChecked()
        qsettings.setValue("hideMouseCursor", settings.HIDE_MOUSE_CURSOR)
        settings.SCROLL_WHEEL_ZOMMING = self._check_scroll_wheel.isChecked()
        qsettings.setValue("scrollWheelZomming", settings.SCROLL_WHEEL_ZOMMING)

        settings.USE_TABS = bool(self._combo_tab_policy.currentIndex())
        editor_settings.setValue("use_tabs", settings.USE_TABS)
        settings.INDENT = self._spin_indent_size.value()
        editor_settings.setValue("indentation_width", settings.INDENT)

        qsettings.endGroup()
        qsettings.endGroup()
        editor_settings.endGroup()
        editor_settings.endGroup()
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:30,代码来源:preferences_editor_behavior.py

示例2: _save

# 需要导入模块: from ninja_ide.gui.ide import IDE [as 别名]
# 或者: from ninja_ide.gui.ide.IDE import editor_settings [as 别名]
    def _save(self):

        qsettings = IDE.editor_settings()

        qsettings.beginGroup("editor")
        qsettings.beginGroup("intellisense")

        settings.AUTOCOMPLETE_BRACKETS = self._check_braces.isChecked()
        qsettings.setValue("autocomplete_brackets",
                           settings.AUTOCOMPLETE_BRACKETS)
        settings.AUTOCOMPLETE_QUOTES = self._check_quotes.isChecked()
        qsettings.setValue("autocomplete_quotes",
                           settings.AUTOCOMPLETE_QUOTES)

        qsettings.endGroup()
        qsettings.endGroup()
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:18,代码来源:preferences_editor_intellisense.py

示例3: _save

# 需要导入模块: from ninja_ide.gui.ide import IDE [as 别名]
# 或者: from ninja_ide.gui.ide.IDE import editor_settings [as 别名]
    def _save(self):
        qsettings = IDE.editor_settings()

        qsettings.beginGroup("editor")
        qsettings.beginGroup("display")

        settings.ALLOW_WORD_WRAP = self._check_text_wrapping.isChecked()
        qsettings.setValue("allow_word_wrap", settings.ALLOW_WORD_WRAP)
        settings.SHOW_TABS_AND_SPACES = self._check_show_tabs.isChecked()
        qsettings.setValue("show_whitespaces",
                           settings.SHOW_TABS_AND_SPACES)
        settings.SHOW_INDENTATION_GUIDES = \
            self._check_indentation_guides.isChecked()
        # qsettings.setValue("show_indentation_guides",
        #                    settings.SHOW_INDENTATION_GUIDES)
        settings.SHOW_MARGIN_LINE = self._check_margin_line.isChecked()
        qsettings.setValue("margin_line", settings.SHOW_MARGIN_LINE)
        settings.MARGIN_LINE = self._spin_margin_line.value()
        qsettings.setValue("margin_line_position", settings.MARGIN_LINE)
        settings.MARGIN_LINE_BACKGROUND = \
            self._check_margin_line_background.isChecked()
        qsettings.setValue("margin_line_background",
                           settings.MARGIN_LINE_BACKGROUND)
        settings.HIGHLIGHT_CURRENT_LINE = self._check_current_line.isChecked()
        qsettings.setValue("highlight_current_line",
                           settings.HIGHLIGHT_CURRENT_LINE)
        settings.HIGHLIGHT_CURRENT_LINE_MODE = \
            self._combo_current_line.currentIndex()
        qsettings.setValue("current_line_mode",
                           settings.HIGHLIGHT_CURRENT_LINE_MODE)
        settings.BRACE_MATCHING = self._check_brace_matching.isChecked()
        qsettings.setValue("brace_matching", settings.BRACE_MATCHING)
        settings.SHOW_LINE_NUMBERS = self._check_lineno.isChecked()
        qsettings.setValue("show_line_numbers", settings.SHOW_LINE_NUMBERS)
        settings.SHOW_TEXT_CHANGES = self._check_text_changes.isChecked()
        qsettings.setValue("show_text_changes", settings.SHOW_TEXT_CHANGES)

        settings.CHECK_STYLE = self._check_highlight_pep8.isChecked()
        qsettings.setValue("check_style", settings.CHECK_STYLE)
        settings.FIND_ERRORS = self._check_find_errors.isChecked()
        qsettings.setValue("check_errors", settings.FIND_ERRORS)

        qsettings.endGroup()
        qsettings.endGroup()
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:46,代码来源:preferences_editor_display.py

示例4: _save

# 需要导入模块: from ninja_ide.gui.ide import IDE [as 别名]
# 或者: from ninja_ide.gui.ide.IDE import editor_settings [as 别名]
    def _save(self):
        qsettings = IDE.editor_settings()

        settings.FONT = self._font
        qsettings.setValue("editor/general/default_font", settings.FONT)
        settings.FONT_ANTIALIASING = self._check_font_antialiasing.isChecked()
        qsettings.setValue("editor/general/font_antialiasing",
                           settings.FONT_ANTIALIASING)
        settings.EDITOR_SCHEME = self._combo_themes.currentText()
        qsettings.setValue("editor/general/scheme",
                           settings.EDITOR_SCHEME)

        scheme = self._combo_themes.currentText()
        if scheme != self.__current_scheme:
            index = self._combo_themes.currentIndex()
            colors = self._combo_themes.itemData(index)
            resources.COLOR_SCHEME = colors
            main = IDE.get_service("main_container")
            main.restyle_editor()
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:21,代码来源:preferences_editor_general.py


注:本文中的ninja_ide.gui.ide.IDE.editor_settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。