Obtain list parameter object from the current widget state.

        :returns: A DefaultSelectParameter from the current state of widget.
169395
def get_parameter(self):
        
        current_index = self.input.currentIndex()
        selected_value = self.input.itemData(current_index, Qt.UserRole)
        if hasattr(selected_value, 'toPyObject'):
            selected_value = selected_value.toPyObject()

        try:
            self._parameter.value = selected_value
        except ValueError:
            err = self.raise_invalid_type_exception()
            raise err

        radio_button_checked_id = self.default_input_button_group.checkedId()
        # No radio button checked, then default value = None
        if radio_button_checked_id == -1:
            self._parameter.default = None
        # The last radio button (custom) is checked, get the value from the
        # line edit
        elif (radio_button_checked_id
              == len(self._parameter.default_values) - 1):
            self._parameter.default_values[radio_button_checked_id] \
                = self.custom_value.value()
            self._parameter.default = self.custom_value.value()
        else:
            self._parameter.default = self._parameter.default_values[
                radio_button_checked_id]

        return self._parameter
573707
def get_default_value(self):
        
        default = self.default_value
        if isinstance(default, collections.Callable):
            default = default()
        return default
1287480
def _elements(self):
        
        if not hasattr(self, '_elements_cached'):
            setattr(self, '_elements_cached', list(self._select()))
        return self._elements_cached
187142
def _get_list_widget(self, **args):
        
        widgets = super(CompactCRUDMixin, self)._get_list_widget(**args)
        session_form_widget = self.get_key("session_form_widget", None)

        form_widget = None
        if session_form_widget == "add":
            form_widget = self._add().get("add")
        elif session_form_widget == "edit":
            pk = self.get_key("session_form_edit_pk")
            if pk and self.datamodel.get(int(pk)):
                form_widget = self._edit(int(pk)).get("edit")
        return {
            "list": GroupFormListWidget(
                list_widget=widgets.get("list"),
                form_widget=form_widget,
                form_action=self.get_key("session_form_action", ""),
                form_title=self.get_key("session_form_title", ""),
            )
        }
894729
def _selectionParameters(self, param):
        """"""
        components = param['selection']
        if len(components) == 0:
            return []
        # extract the selected component names
        editable_sets = []
        for comp in components:
            # all the keys (component names) for the auto details for components in selection
            details = comp.auto_details()
            editable_sets.append(set(details.keys()))
        editable_paramters = set.intersection(*editable_sets)
        # do not allow selecting of filename from here
        return list(editable_paramters)
1234777
def get_parameter(self, name, default=None):
        '''
        
        '''
        if hasattr(self, name):
            item = getattr(self, name)
            if isinstance(item, Parameter):
                return item
        return default
34827
def get_parameter_tbl(self, parameter):
        
        par = []
        for entry in parameter.findall('Entry'):
            instance = defaultdict(list)
            instance['Instance'] = entry.find('Instance').text.split()
            if entry.find('ProbTable') is None:
                instance['ValueTable'] = entry.find('ValueTable').text.split()
            else:
                instance['ProbTable'] = entry.find('ProbTable').text.split()
            par.append(instance)
        return par
109712
def GetValue(self):
    '''
    
    '''
    self.AssertInitialization('Optional')
    value = self._widget.GetValue()
    if not value or len(value) <= 0:
      return None
    return ' '.join(
      [self._action.option_strings[0],  # get the verbose copy if available
       value])
459880
def getparam(self, name, default=None, parents=False):
        '''
        '''
        value = getattr(self, name, None)
        if value is None:
            if parents and self._parent:
                return self._parent.getparam(name, default, parents)
            else:
                return default
        else:
            return value
115107
function getDefaultProps() {
	return {
		data: null,
		indexedData: null, // Just when you use a function as a display field. (array) (Full indexed data not filted)
		onSelectionChange: null,
		rowFormater: null, // function
		multiSelect: false,
		messages: null,
		selection: new Set(),
		allSelected: false,
		listRowHeight: 26,
		listHeight: 200,
		listWidth: 100, // Container width by default
		idField: 'value',
		displayField: 'label',
		showIcon: true,
		listElementClass: null,
		allowsEmptySelection: false,
		hiddenSelection: null,
		uniqueID: null
	};
}
1349821
def choices(self):
        
        choice_list = getattr(
            settings, 'MARKUP_CHOICES', DEFAULT_MARKUP_CHOICES
        )
        return [(f, self._get_filter_title(f)) for f in choice_list]
1252290
def GetValue(self):
    '''
    
    '''
    self.AssertInitialization('Positional')
    if str(self._widget.GetValue()) == EMPTY:
      return None
    return self._widget.GetValue()
707738
def get_widgets(self):
        
        widgets = OrderedDict()
        mappings = {}
        for dim in self.mock_obj.kdims:
            holomap = None if self.plot.dynamic else self.mock_obj
            widget, label, mapping = self.create_widget(dim, holomap, self.editable)
            if label is not None and not isinstance(label, Div):
                label.on_change('value', partial(self.on_change, dim, 'label'))
            widget.on_change('value', partial(self.on_change, dim, 'widget'))
            widgets[dim.pprint_label] = (label, widget)
            if mapping:
                mappings[dim.pprint_label] = OrderedDict(mapping)
        return widgets, mappings
1213348
def get_selected_tab(self):
        
        selected = self.request.GET.get(self.param_name, None)
        if selected:
            try:
                tab_group, tab_name = selected.split(SEPARATOR)
            except ValueError:
                return None
            if tab_group == self.get_id():
                self._selected = self.get_tab(tab_name)
        return self._selected
887420
def onselection(self, widget):
        """"""
        self._selected_key = None
        for k in self.children:
            if self.children[k] == widget:  # widget is the selected ListItem
                self._selected_key = k
                if (self._selected_item is not None) and self._selectable:
                    self._selected_item.attributes['selected'] = False
                self._selected_item = self.children[self._selected_key]
                if self._selectable:
                    self._selected_item.attributes['selected'] = True
                break
        return (self._selected_key,)
414340
def DefaultSelector(sock):
    ""
    global _DEFAULT_SELECTOR
    if _DEFAULT_SELECTOR is None:
        if has_selector('poll'):
            _DEFAULT_SELECTOR = PollSelector
        elif hasattr(select, 'select'):
            _DEFAULT_SELECTOR = SelectSelector
        else:
            raise RedisError('Platform does not support any selectors')
    return _DEFAULT_SELECTOR(sock)
763635
def selected_unit(self):
        
        item = self.lstUnits.currentItem()
        try:
            return definition(item.data(QtCore.Qt.UserRole))
        except (AttributeError, NameError):
            return None