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


Python Settings.endGroup方法代码示例

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


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

示例1: update_reference_separators

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
def update_reference_separators():
    """
    Updates separators and matches for parsing and formating scripture references.
    """
    default_separators = [
        '|'.join([
            translate('BiblesPlugin', ':', 'Verse identifier e.g. Genesis 1 : 1 = Genesis Chapter 1 Verse 1'),
            translate('BiblesPlugin', 'v', 'Verse identifier e.g. Genesis 1 v 1 = Genesis Chapter 1 Verse 1'),
            translate('BiblesPlugin', 'V', 'Verse identifier e.g. Genesis 1 V 1 = Genesis Chapter 1 Verse 1'),
            translate('BiblesPlugin', 'verse', 'Verse identifier e.g. Genesis 1 verse 1 = Genesis Chapter 1 Verse 1'),
            translate('BiblesPlugin', 'verses',
                      'Verse identifier e.g. Genesis 1 verses 1 - 2 = Genesis Chapter 1 Verses 1 to 2')]),
        '|'.join([
            translate('BiblesPlugin', '-',
                      'range identifier e.g. Genesis 1 verse 1 - 2 = Genesis Chapter 1 Verses 1 To 2'),
            translate('BiblesPlugin', 'to',
                      'range identifier e.g. Genesis 1 verse 1 - 2 = Genesis Chapter 1 Verses 1 To 2')]),
        '|'.join([
            translate('BiblesPlugin', ',', 'connecting identifier e.g. Genesis 1 verse 1 - 2, 4 - 5 = '
                                           'Genesis Chapter 1 Verses 1 To 2 And Verses 4 To 5'),
            translate('BiblesPlugin', 'and', 'connecting identifier e.g. Genesis 1 verse 1 - 2 and 4 - 5 = '
                                             'Genesis Chapter 1 Verses 1 To 2 And Verses 4 To 5')]),
        '|'.join([translate('BiblesPlugin', 'end', 'ending identifier e.g. Genesis 1 verse 1 - end = '
                                                   'Genesis Chapter 1 Verses 1 To The Last Verse')])]
    settings = Settings()
    settings.beginGroup('bibles')
    custom_separators = [
        settings.value('verse separator'),
        settings.value('range separator'),
        settings.value('list separator'),
        settings.value('end separator')]
    settings.endGroup()
    for index, role in enumerate(['v', 'r', 'l', 'e']):
        if custom_separators[index].strip('|') == '':
            source_string = default_separators[index].strip('|')
        else:
            source_string = custom_separators[index].strip('|')
        while '||' in source_string:
            source_string = source_string.replace('||', '|')
        if role != 'e':
            REFERENCE_SEPARATORS['sep_%s_display' % role] = source_string.split('|')[0]
        # escape reserved characters
        for character in '\\.^$*+?{}[]()':
            source_string = source_string.replace(character, '\\' + character)
        # add various unicode alternatives
        source_string = source_string.replace('-', '(?:[-\u00AD\u2010\u2011\u2012\u2014\u2014\u2212\uFE63\uFF0D])')
        source_string = source_string.replace(',', '(?:[,\u201A])')
        REFERENCE_SEPARATORS['sep_%s' % role] = '\s*(?:%s)\s*' % source_string
        REFERENCE_SEPARATORS['sep_%s_default' % role] = default_separators[index]
    # verse range match: (<chapter>:)?<verse>(-((<chapter>:)?<verse>|end)?)?
    range_regex = '(?:(?P<from_chapter>[0-9]+)%(sep_v)s)?' \
        '(?P<from_verse>[0-9]+)(?P<range_to>%(sep_r)s(?:(?:(?P<to_chapter>' \
        '[0-9]+)%(sep_v)s)?(?P<to_verse>[0-9]+)|%(sep_e)s)?)?' % REFERENCE_SEPARATORS
    REFERENCE_MATCHES['range'] = re.compile('^\s*%s\s*$' % range_regex, re.UNICODE)
    REFERENCE_MATCHES['range_separator'] = re.compile(REFERENCE_SEPARATORS['sep_l'], re.UNICODE)
    # full reference match: <book>(<range>(,(?!$)|(?=$)))+
    REFERENCE_MATCHES['full'] = \
        re.compile('^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*'
                   '(?P<ranges>(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$'
                   % dict(list(REFERENCE_SEPARATORS.items()) + [('range_regex', range_regex)]), re.UNICODE)
开发者ID:crossroadchurch,项目名称:paul,代码行数:62,代码来源:__init__.py

示例2: load

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def load(self):
     settings = Settings()
     settings.beginGroup(self.settings_section)
     self.background_color = settings.value('background color')
     self.initial_color = self.background_color
     settings.endGroup()
     self.background_color_button.color = self.background_color
开发者ID:crossroadchurch,项目名称:paul,代码行数:9,代码来源:imagetab.py

示例3: save

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save(self):
     """
     Save the settings from the form
     """
     settings = Settings()
     settings.beginGroup(self.settings_section)
     settings.setValue('monitor', self.monitor_combo_box.currentIndex())
     settings.setValue('display on monitor', self.display_on_monitor_check.isChecked())
     settings.setValue('blank warning', self.warning_check_box.isChecked())
     settings.setValue('auto open', self.auto_open_check_box.isChecked())
     settings.setValue('show splash', self.show_splash_check_box.isChecked())
     settings.setValue('update check', self.check_for_updates_check_box.isChecked())
     settings.setValue('save prompt', self.save_check_service_check_box.isChecked())
     settings.setValue('auto unblank', self.auto_unblank_check_box.isChecked())
     settings.setValue('auto preview', self.auto_preview_check_box.isChecked())
     settings.setValue('loop delay', self.timeout_spin_box.value())
     settings.setValue('ccli number', self.number_edit.displayText())
     settings.setValue('songselect username', self.username_edit.displayText())
     settings.setValue('songselect password', self.password_edit.displayText())
     settings.setValue('x position', self.custom_X_value_edit.value())
     settings.setValue('y position', self.custom_Y_value_edit.value())
     settings.setValue('height', self.custom_height_value_edit.value())
     settings.setValue('width', self.custom_width_value_edit.value())
     settings.setValue('override position', self.override_radio_button.isChecked())
     settings.setValue('audio start paused', self.start_paused_check_box.isChecked())
     settings.setValue('audio repeat list', self.repeat_list_check_box.isChecked())
     settings.endGroup()
     # On save update the screens as well
     self.post_set_up(True)
开发者ID:crossroadchurch,项目名称:paul,代码行数:31,代码来源:generaltab.py

示例4: load_screen_settings

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def load_screen_settings(self):
     """
     Loads the screen size and the monitor number from the settings.
     """
     # Add the screen settings to the settings dict. This has to be done here due to cyclic dependency.
     # Do not do this anywhere else.
     screen_settings = {
         'core/x position': self.current['size'].x(),
         'core/y position': self.current['size'].y(),
         'core/monitor': self.display_count - 1,
         'core/height': self.current['size'].height(),
         'core/width': self.current['size'].width()
     }
     Settings.extend_default_settings(screen_settings)
     settings = Settings()
     settings.beginGroup('core')
     monitor = settings.value('monitor')
     self.set_current_display(monitor)
     self.display = settings.value('display on monitor')
     override_display = settings.value('override position')
     x = settings.value('x position')
     y = settings.value('y position')
     width = settings.value('width')
     height = settings.value('height')
     self.override['size'] = QtCore.QRect(x, y, width, height)
     self.override['primary'] = False
     settings.endGroup()
     if override_display:
         self.set_override_display()
     else:
         self.reset_current_display()
开发者ID:crossroadchurch,项目名称:paul,代码行数:33,代码来源:screen.py

示例5: __init__

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def __init__(self):
     """
     Constructor
     """
     super(PrintServiceForm, self).__init__(Registry().get('main_window'))
     self.printer = QtGui.QPrinter()
     self.print_dialog = QtGui.QPrintDialog(self.printer, self)
     self.document = QtGui.QTextDocument()
     self.zoom = 0
     self.setupUi(self)
     # Load the settings for the dialog.
     settings = Settings()
     settings.beginGroup('advanced')
     self.slide_text_check_box.setChecked(settings.value('print slide text'))
     self.page_break_after_text.setChecked(settings.value('add page break'))
     if not self.slide_text_check_box.isChecked():
         self.page_break_after_text.setDisabled(True)
     self.meta_data_check_box.setChecked(settings.value('print file meta data'))
     self.notes_check_box.setChecked(settings.value('print notes'))
     self.zoom_combo_box.setCurrentIndex(settings.value('display size'))
     settings.endGroup()
     # Signals
     self.print_button.triggered.connect(self.print_service_order)
     self.zoom_out_button.clicked.connect(self.zoom_out)
     self.zoom_in_button.clicked.connect(self.zoom_in)
     self.zoom_original_button.clicked.connect(self.zoom_original)
     self.preview_widget.paintRequested.connect(self.paint_requested)
     self.zoom_combo_box.currentIndexChanged.connect(self.display_size_changed)
     self.plain_copy.triggered.connect(self.copy_text)
     self.html_copy.triggered.connect(self.copy_html_text)
     self.slide_text_check_box.stateChanged.connect(self.on_slide_text_check_box_changed)
     self.update_preview_text()
开发者ID:crossroadchurch,项目名称:paul,代码行数:34,代码来源:printserviceform.py

示例6: save

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save(self):
     settings = Settings()
     settings.beginGroup(self.settings_section)
     settings.setValue('is verse number visible', self.is_verse_number_visible)
     settings.setValue('display new chapter', self.show_new_chapters)
     settings.setValue('display brackets', self.display_style)
     settings.setValue('verse layout style', self.layout_style)
     settings.setValue('second bibles', self.second_bibles)
     settings.setValue('bible theme', self.bible_theme)
     if self.verse_separator_check_box.isChecked():
         settings.setValue('verse separator', self.verse_separator_line_edit.text())
     else:
         settings.remove('verse separator')
     if self.range_separator_check_box.isChecked():
         settings.setValue('range separator', self.range_separator_line_edit.text())
     else:
         settings.remove('range separator')
     if self.list_separator_check_box.isChecked():
         settings.setValue('list separator', self.list_separator_line_edit.text())
     else:
         settings.remove('list separator')
     if self.end_separator_check_box.isChecked():
         settings.setValue('end separator', self.end_separator_line_edit.text())
     else:
         settings.remove('end separator')
     update_reference_separators()
     if self.language_selection != settings.value('book name language'):
         settings.setValue('book name language', self.language_selection)
         self.settings_form.register_post_process('bibles_load_list')
     settings.endGroup()
     if self.tab_visited:
         self.settings_form.register_post_process('bibles_config_updated')
     self.tab_visited = False
开发者ID:crossroadchurch,项目名称:paul,代码行数:35,代码来源:biblestab.py

示例7: save

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save(self):
     """
     Save settings to disk.
     """
     settings = Settings()
     settings.beginGroup(self.settings_section)
     settings.setValue('default service enabled', self.service_name_check_box.isChecked())
     service_name = self.service_name_edit.text()
     preset_is_valid = self.generate_service_name_example()[0]
     if service_name == UiStrings().DefaultServiceName or not preset_is_valid:
         settings.remove('default service name')
         self.service_name_edit.setText(service_name)
     else:
         settings.setValue('default service name', service_name)
     settings.setValue('default service day', self.service_name_day.currentIndex())
     settings.setValue('default service hour', self.service_name_time.time().hour())
     settings.setValue('default service minute', self.service_name_time.time().minute())
     settings.setValue('recent file count', self.recent_spin_box.value())
     settings.setValue('save current plugin', self.media_plugin_check_box.isChecked())
     settings.setValue('double click live', self.double_click_live_check_box.isChecked())
     settings.setValue('single click preview', self.single_click_preview_check_box.isChecked())
     settings.setValue('expand service item', self.expand_service_item_check_box.isChecked())
     settings.setValue('enable exit confirmation', self.enable_auto_close_check_box.isChecked())
     settings.setValue('hide mouse', self.hide_mouse_check_box.isChecked())
     settings.setValue('alternate rows', self.alternate_rows_check_box.isChecked())
     settings.setValue('default color', self.default_color)
     settings.setValue('default image', self.default_file_edit.text())
     settings.setValue('slide limits', self.slide_limits)
     if self.x11_bypass_check_box.isChecked() != settings.value('x11 bypass wm'):
         settings.setValue('x11 bypass wm', self.x11_bypass_check_box.isChecked())
         self.settings_form.register_post_process('config_screen_changed')
     self.settings_form.register_post_process('slidecontroller_update_slide_limits')
     settings.endGroup()
开发者ID:crossroadchurch,项目名称:paul,代码行数:35,代码来源:advancedtab.py

示例8: set_defaults

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def set_defaults(self):
     """
     Set default values for the wizard pages.
     """
     settings = Settings()
     settings.beginGroup(self.plugin.settings_section)
     self.restart()
     self.finish_button.setVisible(False)
     self.cancel_button.setVisible(True)
     self.setField("source_format", 0)
     self.setField("osis_location", "")
     self.setField("csv_booksfile", "")
     self.setField("csv_versefile", "")
     self.setField("opensong_file", "")
     self.setField("zefania_file", "")
     self.setField("web_location", WebDownload.Crosswalk)
     self.setField("web_biblename", self.web_translation_combo_box.currentIndex())
     self.setField("proxy_server", settings.value("proxy address"))
     self.setField("proxy_username", settings.value("proxy username"))
     self.setField("proxy_password", settings.value("proxy password"))
     self.setField("license_version", self.version_name_edit.text())
     self.setField("license_copyright", self.copyright_edit.text())
     self.setField("license_permissions", self.permissions_edit.text())
     self.on_web_source_combo_box_index_changed(WebDownload.Crosswalk)
     settings.endGroup()
开发者ID:crossroadchurch,项目名称:paul,代码行数:27,代码来源:bibleimportform.py

示例9: load

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def load(self):
     settings = Settings()
     settings.beginGroup(self.settings_section)
     self.is_verse_number_visible = settings.value('is verse number visible')
     self.show_new_chapters = settings.value('display new chapter')
     self.display_style = settings.value('display brackets')
     self.layout_style = settings.value('verse layout style')
     self.bible_theme = settings.value('bible theme')
     self.second_bibles = settings.value('second bibles')
     self.is_verse_number_visible_check_box.setChecked(self.is_verse_number_visible)
     self.check_is_verse_number_visible()
     self.new_chapters_check_box.setChecked(self.show_new_chapters)
     self.display_style_combo_box.setCurrentIndex(self.display_style)
     self.layout_style_combo_box.setCurrentIndex(self.layout_style)
     self.bible_second_check_box.setChecked(self.second_bibles)
     verse_separator = settings.value('verse separator')
     if (verse_separator.strip('|') == '') or (verse_separator == get_reference_separator('sep_v_default')):
         self.verse_separator_line_edit.setText(get_reference_separator('sep_v_default'))
         self.verse_separator_line_edit.setPalette(self.get_grey_text_palette(True))
         self.verse_separator_check_box.setChecked(False)
     else:
         self.verse_separator_line_edit.setText(verse_separator)
         self.verse_separator_line_edit.setPalette(self.get_grey_text_palette(False))
         self.verse_separator_check_box.setChecked(True)
     range_separator = settings.value('range separator')
     if (range_separator.strip('|') == '') or (range_separator == get_reference_separator('sep_r_default')):
         self.range_separator_line_edit.setText(get_reference_separator('sep_r_default'))
         self.range_separator_line_edit.setPalette(self.get_grey_text_palette(True))
         self.range_separator_check_box.setChecked(False)
     else:
         self.range_separator_line_edit.setText(range_separator)
         self.range_separator_line_edit.setPalette(self.get_grey_text_palette(False))
         self.range_separator_check_box.setChecked(True)
     list_separator = settings.value('list separator')
     if (list_separator.strip('|') == '') or (list_separator == get_reference_separator('sep_l_default')):
         self.list_separator_line_edit.setText(get_reference_separator('sep_l_default'))
         self.list_separator_line_edit.setPalette(self.get_grey_text_palette(True))
         self.list_separator_check_box.setChecked(False)
     else:
         self.list_separator_line_edit.setText(list_separator)
         self.list_separator_line_edit.setPalette(self.get_grey_text_palette(False))
         self.list_separator_check_box.setChecked(True)
     end_separator = settings.value('end separator')
     if (end_separator.strip('|') == '') or (end_separator == get_reference_separator('sep_e_default')):
         self.end_separator_line_edit.setText(get_reference_separator('sep_e_default'))
         self.end_separator_line_edit.setPalette(self.get_grey_text_palette(True))
         self.end_separator_check_box.setChecked(False)
     else:
         self.end_separator_line_edit.setText(end_separator)
         self.end_separator_line_edit.setPalette(self.get_grey_text_palette(False))
         self.end_separator_check_box.setChecked(True)
     self.language_selection = settings.value('book name language')
     self.language_selection_combo_box.setCurrentIndex(self.language_selection)
     self.reset_to_combined_quick_search = settings.value('reset to combined quick search')
     self.reset_to_combined_quick_search_check_box.setChecked(self.reset_to_combined_quick_search)
     self.hide_combined_quick_error = settings.value('hide combined quick error')
     self.hide_combined_quick_error_check_box.setChecked(self.hide_combined_quick_error)
     self.bible_search_while_typing = settings.value('is search while typing enabled')
     self.bible_search_while_typing_check_box.setChecked(self.bible_search_while_typing)
     settings.endGroup()
开发者ID:imkernel,项目名称:openlp,代码行数:62,代码来源:biblestab.py

示例10: save

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save(self):
     settings = Settings()
     settings.beginGroup(self.settings_section)
     settings.setValue('background color', self.background_color)
     settings.endGroup()
     if self.initial_color != self.background_color:
         self.settings_form.register_post_process('images_config_updated')
开发者ID:crossroadchurch,项目名称:paul,代码行数:9,代码来源:imagetab.py

示例11: add_action

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
    def add_action(self, action, category=None, weight=None):
        """
        Add an action to the list of actions.

        **Note**: The action's objectName must be set when you want to add it!

        :param action: The action to add (QAction). **Note**, the action must not have an empty ``objectName``.
        :param category: The category this action belongs to. The category has to be a python string. . **Note**,
            if the category is ``None``, the category and its actions are being hidden in the shortcut dialog. However,
            if they are added, it is possible to avoid assigning shortcuts twice, which is important.
        :param weight: The weight specifies how important a category is. However, this only has an impact on the order
            the categories are displayed.
        """
        if category not in self.categories:
            self.categories.append(category)
        settings = Settings()
        settings.beginGroup('shortcuts')
        # Get the default shortcut from the config.
        action.default_shortcuts = settings.get_default_value(action.objectName())
        if weight is None:
            self.categories[category].actions.append(action)
        else:
            self.categories[category].actions.add(action, weight)
        # Load the shortcut from the config.
        shortcuts = settings.value(action.objectName())
        settings.endGroup()
        if not shortcuts:
            action.setShortcuts([])
            return
        # We have to do this to ensure that the loaded shortcut list e. g. STRG+O (German) is converted to CTRL+O,
        # which is only done when we convert the strings in this way (QKeySequencet -> uncode).
        shortcuts = list(map(QtGui.QKeySequence.toString, list(map(QtGui.QKeySequence, shortcuts))))
        # Check the alternate shortcut first, to avoid problems when the alternate shortcut becomes the primary shortcut
        #  after removing the (initial) primary shortcut due to conflicts.
        if len(shortcuts) == 2:
            existing_actions = ActionList.shortcut_map.get(shortcuts[1], [])
            # Check for conflicts with other actions considering the shortcut context.
            if self._is_shortcut_available(existing_actions, action):
                actions = ActionList.shortcut_map.get(shortcuts[1], [])
                actions.append(action)
                ActionList.shortcut_map[shortcuts[1]] = actions
            else:
                log.warning('Shortcut "{shortcut}" is removed from "{action}" because another '
                            'action already uses this shortcut.'.format(shortcut=shortcuts[1],
                                                                        action=action.objectName()))
                shortcuts.remove(shortcuts[1])
        # Check the primary shortcut.
        existing_actions = ActionList.shortcut_map.get(shortcuts[0], [])
        # Check for conflicts with other actions considering the shortcut context.
        if self._is_shortcut_available(existing_actions, action):
            actions = ActionList.shortcut_map.get(shortcuts[0], [])
            actions.append(action)
            ActionList.shortcut_map[shortcuts[0]] = actions
        else:
            log.warning('Shortcut "{shortcut}" is removed from "{action}" '
                        'because another action already uses this shortcut.'.format(shortcut=shortcuts[0],
                                                                                    action=action.objectName()))
            shortcuts.remove(shortcuts[0])
        action.setShortcuts([QtGui.QKeySequence(shortcut) for shortcut in shortcuts])
开发者ID:imkernel,项目名称:openlp,代码行数:61,代码来源:actions.py

示例12: load

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def load(self):
     """
     Load settings from disk.
     """
     settings = Settings()
     settings.beginGroup(self.settings_section)
     # The max recent files value does not have an interface and so never
     # gets actually stored in the settings therefore the default value of
     # 20 will always be used.
     self.recent_spin_box.setMaximum(settings.value('max recent files'))
     self.recent_spin_box.setValue(settings.value('recent file count'))
     self.media_plugin_check_box.setChecked(settings.value('save current plugin'))
     self.double_click_live_check_box.setChecked(settings.value('double click live'))
     self.single_click_preview_check_box.setChecked(settings.value('single click preview'))
     self.single_click_service_preview_check_box.setChecked(settings.value('single click service preview'))
     self.expand_service_item_check_box.setChecked(settings.value('expand service item'))
     slide_max_height_value = settings.value('slide max height')
     for i in range(0, self.slide_max_height_combo_box.count()):
         if self.slide_max_height_combo_box.itemData(i) == slide_max_height_value:
             self.slide_max_height_combo_box.setCurrentIndex(i)
     autoscroll_value = settings.value('autoscrolling')
     for i in range(0, len(self.autoscroll_map)):
         if self.autoscroll_map[i] == autoscroll_value and i < self.autoscroll_combo_box.count():
             self.autoscroll_combo_box.setCurrentIndex(i)
     self.enable_auto_close_check_box.setChecked(settings.value('enable exit confirmation'))
     self.hide_mouse_check_box.setChecked(settings.value('hide mouse'))
     self.service_name_day.setCurrentIndex(settings.value('default service day'))
     self.service_name_time.setTime(QtCore.QTime(settings.value('default service hour'),
                                                 settings.value('default service minute')))
     self.should_update_service_name_example = True
     self.service_name_edit.setText(settings.value('default service name'))
     default_service_enabled = settings.value('default service enabled')
     self.service_name_check_box.setChecked(default_service_enabled)
     self.service_name_check_box_toggled(default_service_enabled)
     self.x11_bypass_check_box.setChecked(settings.value('x11 bypass wm'))
     self.slide_limits = settings.value('slide limits')
     self.is_search_as_you_type_enabled = settings.value('search as type')
     self.search_as_type_check_box.setChecked(self.is_search_as_you_type_enabled)
     # Prevent the dialog displayed by the alternate_rows_check_box to display.
     self.alternate_rows_check_box.blockSignals(True)
     self.alternate_rows_check_box.setChecked(settings.value('alternate rows'))
     self.alternate_rows_check_box.blockSignals(False)
     if self.slide_limits == SlideLimits.End:
         self.end_slide_radio_button.setChecked(True)
     elif self.slide_limits == SlideLimits.Wrap:
         self.wrap_slide_radio_button.setChecked(True)
     else:
         self.next_item_radio_button.setChecked(True)
     settings.endGroup()
     self.data_directory_copy_check_box.hide()
     self.new_data_directory_has_files_label.hide()
     self.data_directory_cancel_button.hide()
     # Since data location can be changed, make sure the path is present.
     self.current_data_path = AppLocation.get_data_path()
     self.data_directory_label.setText(os.path.abspath(self.current_data_path))
     # Don't allow data directory move if running portable.
     if settings.value('advanced/is portable'):
         self.data_directory_group_box.hide()
开发者ID:imkernel,项目名称:openlp,代码行数:60,代码来源:advancedtab.py

示例13: load

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def load(self):
     """
     Load the projector settings on startup
     """
     settings = Settings()
     settings.beginGroup(self.settings_section)
     self.connect_on_startup.setChecked(settings.value('connect on start'))
     self.socket_timeout_spin_box.setValue(settings.value('socket timeout'))
     self.socket_poll_spin_box.setValue(settings.value('poll time'))
     self.dialog_type_combo_box.setCurrentIndex(settings.value('source dialog type'))
     settings.endGroup()
开发者ID:imkernel,项目名称:openlp,代码行数:13,代码来源:tab.py

示例14: save

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save(self):
     """
     Save the projector settings
     """
     settings = Settings()
     settings.beginGroup(self.settings_section)
     settings.setValue('connect on start', self.connect_on_startup.isChecked())
     settings.setValue('socket timeout', self.socket_timeout_spin_box.value())
     settings.setValue('poll time', self.socket_poll_spin_box.value())
     settings.setValue('source dialog type', self.dialog_type_combo_box.currentIndex())
     settings.endGroup()
开发者ID:imkernel,项目名称:openlp,代码行数:13,代码来源:tab.py

示例15: save_options

# 需要导入模块: from openlp.core.common import Settings [as 别名]
# 或者: from openlp.core.common.Settings import endGroup [as 别名]
 def save_options(self):
     """
     Save the settings and close the dialog.
     """
     # Save the settings for this dialog.
     settings = Settings()
     settings.beginGroup('advanced')
     settings.setValue('print slide text', self.slide_text_check_box.isChecked())
     settings.setValue('add page break', self.page_break_after_text.isChecked())
     settings.setValue('print file meta data', self.meta_data_check_box.isChecked())
     settings.setValue('print notes', self.notes_check_box.isChecked())
     settings.endGroup()
开发者ID:crossroadchurch,项目名称:paul,代码行数:14,代码来源:printserviceform.py


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