Get widget by index.

        If no tabs and index specified the current active widget is returned.
967824
def get_widget(self, index=None, path=None, tabs=None):
        
        if (index and tabs) or (path and tabs):
            return tabs.widget(index)
        elif self.plugin:
            return self.get_plugin_tabwidget(self.plugin).currentWidget()
        else:
            return self.plugins_tabs[0][0].currentWidget()
1285893
def set_current_index(self, index):
        
        # d = self.declaration
        # #: We have to wait for the current_index to be ready before we can
        # #: change pages
        if self._notify_count > 0:
            self._pending_calls.append(
                lambda index=index: self.widget.setCurrentItem(index))
        else:
            self.widget.setCurrentItem(index)
604891
def find_widget(self, name):
        
        result = None
        for column in self._columns:
            for widget in column:
                if widget.name is not None and name == widget.name:
                    result = widget
                    break
        return result
870575
def insertTab(self, index, widget, title):
        
        self.insertWidget(index, widget)
        tab = self.tabBar().insertTab(index, title)
        tab.titleChanged.connect(widget.setWindowTitle)
1161061
def get(self, index):
        
        if self and (index <= len(self) -1):
            return self._result_cache[index]
1255315
def setCurrentIndex(self, index):
        
        if self._currentIndex == index:
            return

        self._currentIndex = index
        self.currentIndexChanged.emit(index)

        for i, item in enumerate(self.items()):
            item.setMenuEnabled(i == index)
        self.repaint()
193141
def get_widget_class_from_id(id):
    

    res = id.split('-')
    try:
        model_cls = apps.get_model(res[1], res[2])
    except:
        model_cls = None
    return model_cls
142930
def currentPlugin( self ):
        
        col    = self.uiWizardTABLE.currentColumn()
        row    = self.uiWizardTABLE.currentRow()
        item   = self.uiWizardTABLE.currentItem()
        widget = self.uiWizardTABLE.cellWidget(row, col)
        
        if ( not (widget and item and item.isSelected()) ):
            return None
            
        return widget.plugin()
5650
private void setCurrentTab(final int index)
	{
		if (this.currentTab == index)
		{
			// already current
			return;
		}
		this.currentTab = index;

		final Component component;

		if ((currentTab == -1) || tabs.isEmpty() || !getVisiblityCache().isVisible(currentTab))
		{
			// no tabs or the current tab is not visible
			component = newPanel();
		}
		else
		{
			// show panel from selected tab
			final T tab = tabs.get(currentTab);
			component = tab.getPanel(TAB_PANEL_ID);
			if (component == null)
			{
				throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel ["
					+ getPath() + "] ITab index [" + currentTab + "]");
			}
		}

		if (!component.getId().equals(TAB_PANEL_ID))
		{
			throw new WicketRuntimeException(
				"ITab.getPanel() returned a panel with invalid id [" + component.getId()
					+ "]. You always have to return a panel with id equal to the provided panelId parameter. TabbedPanel ["
					+ getPath() + "] ITab index [" + currentTab + "]");
		}

		addOrReplace(component);
	}
1232871
public T get(int index) {
        if (index < 0 || index >= size) {
            return null;
        }
        if (!wasFullAtleastOnce && index >= emptyItemIndex) {
            return null;
        }
        return (T)(items[index]);
    }
1089899
def _get_list_widget(
        self,
        filters,
        actions=None,
        order_column="",
        order_direction="",
        page=None,
        page_size=None,
        widgets=None,
        **args
    ):

        
        widgets = widgets or {}
        actions = actions or self.actions
        page_size = page_size or self.page_size
        if not order_column and self.base_order:
            order_column, order_direction = self.base_order
        joined_filters = filters.get_joined_filters(self._base_filters)
        count, lst = self.datamodel.query(
            joined_filters,
            order_column,
            order_direction,
            page=page,
            page_size=page_size,
        )
        pks = self.datamodel.get_keys(lst)

        # serialize composite pks
        pks = [self._serialize_pk_if_composite(pk) for pk in pks]

        widgets["list"] = self.list_widget(
            label_columns=self.label_columns,
            include_columns=self.list_columns,
            value_columns=self.datamodel.get_values(lst, self.list_columns),
            order_columns=self.order_columns,
            formatters_columns=self.formatters_columns,
            page=page,
            page_size=page_size,
            count=count,
            pks=pks,
            actions=actions,
            filters=filters,
            modelview_name=self.__class__.__name__,
        )
        return widgets
818686
def _get_index(self, beacon_config, label):
        '''
        
        '''

        indexes = [index for index, item in enumerate(beacon_config) if label in item]
        if not indexes:
            return -1
        else:
            return indexes[0]
372979
def get_item(self, index):
        
        row = index.row() if hasattr(index, "row") else index
        try:
            return self.collection[row]
        except IndexError:  # invalid index for exemple
            return None
168875
def selection(self):
        """"""
        sel = QtGui.QItemSelection()
        for index in self.selectedIndexes():
            sel.select(index, index)
        return sel
243134
def get_widget_from_id(id):
    

    res = id.split('-')
    try:
        model_cls = apps.get_model(res[0], res[1])
        obj = model_cls.objects.get(parent=res[2], id=res[3])
    except:
        obj = None
    return obj
328250
def get(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get(index=self._name, **kwargs)
765684
public int getTabIndex(Element child) {

        int index = 0;
        for (Widget tab : m_tabPanel) {
            if (tab.getElement().isOrHasChild(child)) {
                return index;
            }
            index++;
        }
        return -1;
    }