Returns given layout value.

        :param layout: Layout name.
        :type layout: unicode
        :param default: Default value if layout is not found.
        :type default: object
        :return: Action.
        :rtype: QAction
3952
def get(self, layout, default=None):
        

        try:
            return self.__getitem__(layout)
        except KeyError as error:
            return default
621590
def layout(self, value):
        ''

        if self._adjust_id:
            self._fix_component_id(value)
        return Dash.layout.fset(self, value)
1237944
def find_widget(self, name):
        
        result = None
        for layout in self._layouts:
            result = layout.find_widget(name)
            if result:
                break
        return result
526315
def setup_layout(self, default=False):
        """"""
        prefix = 'window' + '/'
        settings = self.load_window_settings(prefix, default)
        hexstate = settings[0]

        self.first_spyder_run = False
        if hexstate is None:
            # First Spyder execution:
            self.setWindowState(Qt.WindowMaximized)
            self.first_spyder_run = True
            self.setup_default_layouts('default', settings)

            # Now that the initial setup is done, copy the window settings,
            # except for the hexstate in the quick layouts sections for the
            # default layouts.
            # Order and name of the default layouts is found in config.py
            section = 'quick_layouts'
            get_func = CONF.get_default if default else CONF.get
            order = get_func(section, 'order')

            # restore the original defaults if reset layouts is called
            if default:
                CONF.set(section, 'active', order)
                CONF.set(section, 'order', order)
                CONF.set(section, 'names', order)

            for index, name, in enumerate(order):
                prefix = 'layout_{0}/'.format(index)
                self.save_current_window_settings(prefix, section,
                                                  none_state=True)

            # store the initial layout as the default in spyder
            prefix = 'layout_default/'
            section = 'quick_layouts'
            self.save_current_window_settings(prefix, section, none_state=True)
            self.current_quick_layout = 'default'

            # Regenerate menu
            self.quick_layout_set_menu()
        self.set_window_settings(*settings)

        for plugin in (self.widgetlist + self.thirdparty_plugins):
            try:
                plugin.initialize_plugin_in_mainwindow_layout()
            except Exception as error:
                print("%s: %s" % (plugin, str(error)), file=STDERR)
                traceback.print_exc(file=STDERR)
332254
def get_layout(self, name):
        '''
        
        '''
        layout_chain = []

        # Retrieve initial layout file
        try:
            json_data = self.json_files[self.layout_names[name]]
        except KeyError:
            log.error('Could not find layout: %s', name)
            log.error('Layouts path: %s', self.layout_path)
            raise
        layout_chain.append(Layout(name, json_data))

        # Recursively locate parent layout files
        parent = layout_chain[-1].parent()
        while parent is not None:
            # Find the parent
            parent_path = None
            for path in self.json_file_paths:
                if os.path.normcase(os.path.normpath(parent)) in os.path.normcase(path):
                    parent_path = path

            # Make sure a path was found
            if parent_path is None:
                raise UnknownLayoutPathException('Could not find: {}'.format(parent_path))

            # Build layout for parent
            json_data = self.json_files[parent_path]
            layout_chain.append(Layout(parent_path, json_data))

            # Check parent of parent
            parent = layout_chain[-1].parent()

        # Squash layout files
        layout = self.squash_layouts(layout_chain)
        return layout
899884
def set_default_layouts(self, ignored_layouts=None):
        

        for key in self.__default_layouts_settings.allKeys():
            if ignored_layouts:
                if tuple((layout for layout in ignored_layouts if layout in key)):
                    continue
            self.__settings.setValue(key, self.__default_layouts_settings.value(key))
        return True
1104506
def default_value(self, default_value):
        
        # For custom value
        if default_value not in self.default_values:
            if len(self.default_labels) == len(self.default_values):
                self.default_values[-1] = default_value
            else:
                self.default_values.append(default_value)

        self._default_value = default_value
76824
def AddToLayout(self, layout):
        
        for param in self.params:
            widget = param.RenderWidget()
            layout.addRow(param.caption, widget)
928092
def get_default_value(self):
        
        if ('default_value' in self.attributes and
                bool(self.attributes['default_value'].strip())):
            return self.attributes['default_value']
        else:
            return None
1196355
protected function getLayout(string $layout = null): string
    {
        if ($layout === null) {
            $frontendBridgeComponentExists = isset($this->FrontendBridge);
            $layout = 'FrontendBridge.json_action';

            if ($frontendBridgeComponentExists) {
                $layout = $this->FrontendBridge->config('templatePaths.jsonAction');
            }

            if ($this->request->is('dialog')) {
                $layout = 'FrontendBridge.dialog_action';

                if ($frontendBridgeComponentExists) {
                    $layout = $this->FrontendBridge->config('templatePaths.dialogAction');
                }
            }
        }

        return $layout;
    }
780451
def _layout_for_option(name)
      case name
      when String     then _normalize_layout(name)
      when Proc       then name
      when true       then Proc.new { |lookup_context, formats| _default_layout(lookup_context, formats, true)  }
      when :default   then Proc.new { |lookup_context, formats| _default_layout(lookup_context, formats, false) }
      when false, nil then nil
      else
        raise ArgumentError,
          "String, Proc, :default, true, or false, expected for `layout'; you passed #{name.inspect}"
      end
    end
205032
def default(self):
        
        if isinstance(self.__default, (str, unicode)):
            return self.valueFromString(self.__default)
        else:
            return self.__default
668680
function assertLayout(value, defaultLayout) {
  var isFalsey = require('falsey');
  if (value === false || (value && isFalsey(value))) {
    return null;
  } else if (!value || value === true) {
    return defaultLayout || null;
  } else {
    return value;
  }
}
808514
def _get_layout(self):
        
        connected = list()
        active_layout = list()
        disconnected = list()
        layout = OrderedDict(
            {"connected": OrderedDict(), "disconnected": OrderedDict()}
        )

        current = self.py3.command_output("xrandr")
        for line in current.splitlines():
            try:
                s = line.split(" ")
                infos = line[line.find("(") :]
                if s[1] == "connected":
                    output, state, mode = s[0], s[1], None
                    for index, x in enumerate(s[2:], 2):
                        if "x" in x and "+" in x:
                            mode = x
                            active_layout.append(output)
                            infos = line[line.find(s[index + 1]) :]
                            break
                        elif "(" in x:
                            break
                    connected.append(output)
                elif s[1] == "disconnected":
                    output, state, mode = s[0], s[1], None
                    disconnected.append(output)
                else:
                    continue
            except Exception as err:
                self.py3.log('xrandr error="{}"'.format(err))
            else:
                layout[state][output] = {"infos": infos, "mode": mode, "state": state}

        # initialize the active layout
        if self.active_layout is None:
            self.active_comb = tuple(active_layout)
            self.active_layout = self._get_string_and_set_width(
                tuple(active_layout), self.active_mode
            )

        return layout
432600
function getLayoutName(file, options) {
  const defaultLayout = options.defaultLayout;
  const prop = options.layoutProp || 'layout';
  const name = file[prop];
  if (typeof name === 'undefined' || name === true || name === defaultLayout) {
    return defaultLayout;
  }
  if (!name || ['false', 'null', 'nil', 'none', 'undefined'].includes(name.toLowerCase())) {
    return false;
  }
  return name;
}
425832
def get_value(self, class_name, attr, default_value=None,
                  state='normal', base_name='View'):
        
        styles = self.get_dict_for_class(class_name, state, base_name)
        try:
            return styles[attr]
        except KeyError:
            return default_value
990137
async def get_default_storage_layout(cls) -> StorageLayout:
        
        data = await cls.get_config("default_storage_layout")
        return cls.StorageLayout.lookup(data)