def loadSettings(self): """Load the possibly saved search plugin settings from diks.""" settings = PluginSettings('search') autocomplete = settings.pluginValue('autocomplete', False).toBool() highlight = settings.pluginValue('highlighting', False).toBool() self.enableCompletionOpt.setChecked(autocomplete) self.enableHighlightingOpt.setChecked(highlight) self.scopeBox.setCurrentIndex( settings.pluginValue('scope', 2).toInt()[0]) self.sizeLimitBox.setValue(settings.pluginValue('limit', 0).toInt()[0]) del settings
def __loadSettings(self): """Loads the plugin settings if available. """ s = PluginSettings('search') self.autocompleteIsEnabled = s.pluginValue( 'autocomplete', False).toBool() self.searchForm.scope = s.pluginValue('scope', 2).toInt()[0] self.searchForm.sizeLimit = s.pluginValue('limit', 0).toInt()[0] self.filterBuilder.setFilterHighlighter( s.pluginValue('highlighting', False).toBool()) # Try to fetch the luma config prefix from the settings file, # and call the loadFilterBookmarks to populate search box self.configPrefix = s.configPrefix self.loadFilterBookmarks()
def __loadSettings(self): """Loads the plugin settings if available. """ s = PluginSettings('search') self.autocompleteIsEnabled = s.pluginValue('autocomplete', False).toBool() self.searchForm.scope = s.pluginValue('scope', 2).toInt()[0] self.searchForm.sizeLimit = s.pluginValue('limit', 0).toInt()[0] self.filterBuilder.setFilterHighlighter( s.pluginValue('highlighting', False).toBool()) # Try to fetch the luma config prefix from the settings file, # and call the loadFilterBookmarks to populate search box self.configPrefix = s.configPrefix self.loadFilterBookmarks()