Switch context tabs by tab widget name.

        :param page: The page should be focussed.
        :type page: QWidget
14340
def switch_context(self, page):
        
        # noinspection PyUnresolvedReferences
        if page.objectName() == 'profile_edit_page':
            self.stacked_widget.setCurrentIndex(0)
            self.button_box.button(QDialogButtonBox.Close).setHidden(False)
        else:  # resource_edit_page
            self.stacked_widget.setCurrentIndex(1)
            # hide the close button
            self.button_box.button(QDialogButtonBox.Close).setHidden(True)
282692
def tab(self):
        
        soft_tabs = self.tabstop - ((self._cx // self._cw) % self.tabstop)
        for _ in range(soft_tabs):
            self.putch(" ")
599913
public static @NonNull ClickEvent changePage(final @NonNull String page) {
    return new ClickEvent(Action.CHANGE_PAGE, page);
  }
136132
def tab_change(self, event):
        """"""
        self.remove_error()
        if event.new == 1:
            self.widget.disabled = False
338735
public void setPage(int page, boolean fireChanged) {

        m_page = page;
        m_label.setValue("( " + (1 + m_page) + " / " + (m_lastPage + 1) + " )");
        int start = (m_page * m_pageSize) + 1;
        int end = Math.min((start + m_pageSize) - 1, m_resultCount);
        String resultsMsg = CmsVaadinUtils.getMessageText(
            Messages.GUI_DATAVIEW_RESULTS_3,
            "" + start,
            "" + end,
            "" + m_resultCount);
        m_resultsLabel.setValue(start <= end ? resultsMsg : "");
        if (fireChanged) {
            firePageChanged(page);
        }
    }
695703
def _rename_duplicate_tabs(self, current, name, path):
        
        for i in range(self.count()):
            if self.widget(i)._tab_name == name and self.widget(i) != current:
                file_path = self.widget(i).file.path
                if file_path:
                    parent_dir = os.path.split(os.path.abspath(
                        os.path.join(file_path, os.pardir)))[1]
                    new_name = os.path.join(parent_dir, name)
                    self.setTabText(i, new_name)
                    self.widget(i)._tab_name = new_name
                break
        if path:
            parent_dir = os.path.split(os.path.abspath(
                os.path.join(path, os.pardir)))[1]
            return os.path.join(parent_dir, name)
        else:
            return name
51307
public void setActivePage(DialogPage activePage) {
		DialogPage oldPage = this.activePage;

		Assert.isTrue(activePage == null || pages.contains(activePage));
		if (oldPage == activePage) {
			return;
		}
		this.activePage = activePage;

		updateMessage();
		if (oldPage != null) {
			updatePageLabels(oldPage);
		}
		if (activePage != null) {
			updatePageLabels(activePage);
		}
	}
1010156
def activate(self, page=None):
        
        page = page or ''

        if '://' in page:
            self._iface.activate_overlay_url(page)

        else:
            self._iface.activate_overlay_game(page)
990801
def bring_tab_to_the_top(self, tab_label):
        
        found = False
        for notebook in self.left_bar_notebooks:
            for i in range(notebook.get_n_pages()):
                if gui_helper_label.get_notebook_tab_title(notebook, i) == gui_helper_label.get_widget_title(tab_label):
                    found = True
                    break
            if found:
                notebook.set_current_page(i)
                break
184421
def pages_view(view):
    
    def pages_view_decorator(request, *args, **kwargs):
        # if the current page is already there
        if(kwargs.get('current_page', False) or
                kwargs.get('pages_navigation', False)):
            return view(request, *args, **kwargs)

        path = kwargs.pop('path', None)
        lang = kwargs.pop('lang', None)
        if path:
            from basic_cms.views import details
            response = details(request, path=path, lang=lang,
                only_context=True, delegation=False)
            context = response
            extra_context_var = kwargs.pop('extra_context_var', None)
            if extra_context_var:
                kwargs.update({extra_context_var: context})
            else:
                kwargs.update(context)
        return view(request, *args, **kwargs)
    return pages_view_decorator
453134
def add_page(self, page, default = True):
        
        """
        self._pages[page.page_id] = page
        page._add_display(self)
        if default or not self._active_page:
            self._active_page = page
1347762
def create_tab(self, *widgets):
        """"""
        widget = QWidget()
        layout = QVBoxLayout()
        for widg in widgets:
            layout.addWidget(widg)
        layout.addStretch(1)
        widget.setLayout(layout)
        return widget
968412
def activate_page(self, page_id):
        

        """
        if page_id == "next":
            page_keys = list(self._pages.keys())
            key_count = len(page_keys)
            if key_count > 0:
                idx = page_keys.index(self._active_page.page_id)
                if idx >= key_count-1:
                    idx = 0
                else:
                    idx += 1
                self._active_page = self._pages[page_keys[idx]]
                self._active_page._render()
                self._page_changed(self._active_page)

        elif page_id in self._pages:
            self._active_page = self._pages[page_id]
            self._page_changed(self._active_page)
        else:
            raise ValueError("Page with {page_id} not found in page list".format(page_id = page_id))
437121
protected void setCurrentPage(WizardPage<DATA> newPage) {
		currentPage = newPage;
		updateState();
		wizardView.setCurrentPage(currentPage);
		currentPage.show();
	}
576706
def pages_menu(context, page, url='/'):
    
    lang = context.get('lang', pages_settings.PAGE_DEFAULT_LANGUAGE)
    page = get_page_from_string_or_id(page, lang)
    if page:
        children = page.get_children_for_frontend()
        context.update({'children': children, 'page': page})
    return context
407265
def _update_gui_text_tabs(self):
        """"""
        for index, page in enumerate(self.pages):
            self.tabWidget.setTabText(index, "{} (Alt+&{}){}".format(page.text_tab, index+1, (" (changed)" if page.flag_changed else "")))
773548
protected void addPage(String wizardConfigurationKey, WizardPage page) {
        pages.add(page);
        page.setWizard(this);
        if (autoConfigureChildPages) {
            String key = ((wizardConfigurationKey != null) ? wizardConfigurationKey + "." : "") + page.getId();
            ValkyrieRepository.getInstance().getApplicationConfig().applicationObjectConfigurer().configure(page, key);
        }
    }