Create a tab with all checked features.

        :return A list with all features which are checked in the UI.
        :rtype list
968385
def get_checked_features(self):
        
        feature_types = []
        if self.roads_flag.isChecked():
            feature_types.append('roads')
        if self.buildings_flag.isChecked():
            feature_types.append('buildings')
        if self.building_points_flag.isChecked():
            feature_types.append('building-points')
        if self.flood_prone_flag.isChecked():
            feature_types.append('flood-prone')
        if self.evacuation_centers_flag.isChecked():
            feature_types.append('evacuation-centers')
        if self.boundary_flag.isChecked():
            level = self.admin_level_comboBox.currentIndex() + 1
            feature_types.append('boundary-%s' % level)
        return feature_types
1051876
def tab_complete(self):
        
        opts = self._complete_options()
        if len(opts) == 1:
            self.set_current_text(opts[0] + os.sep)
            self.hide_completer()
87010
def choices(self, changelist):
        
        show_all = self.used_parameters.get(self.parameter_name) == "1"
        return (
            {
                'display': _('Current Configuration'),
                'selected': not show_all,
                'query_string': changelist.get_query_string({}, [self.parameter_name]),
            },
            {
                'display': _('All (Show History)'),
                'selected': show_all,
                'query_string': changelist.get_query_string({self.parameter_name: "1"}, []),
            }
        )
900124
def convert_indentation_to_tabs(self):
        

        cursor = self.textCursor()

        block = self.document().findBlockByLineNumber(0)
        while block.isValid():
            cursor.setPosition(block.position())
            search = re.match(r"^ +", block.text())
            if search:
                cursor.movePosition(QTextCursor.StartOfBlock, QTextCursor.MoveAnchor)
                searchLength = len(search.group(0))
                foundations.common.repeat(
                    lambda: cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor), searchLength)
                cursor.insertText(self.__indent_marker * (searchLength / self.__indent_width))
            block = block.next()
        return True
1350323
def get_tabs(self, model_alias, object):
        
        model_alias = self.get_model_alias(model_alias)
        for item in self.tabs[model_alias]:
            if item.display_filter(object):
                yield item
359936
def checklist(self):
        
        choice = []
        for item in self.data:
            choice.append((item, "", self.status))
        code, self.tags = self.d.checklist(
            text=self.text, height=20, width=65, list_height=13,
            choices=choice, title=self.title, backtitle=self.backtitle)
        if code == "ok":
            self.unicode_to_string()
            return self.ununicode
        if code in ["cancel", "esc"]:
            self.exit()
887751
def create_tab(self, location=None):
        
        eb = self._get_or_create_editor_buffer(location)

        self.tab_pages.insert(self.active_tab_index + 1, TabPage(Window(eb)))
        self.active_tab_index += 1
355604
def tab(self):
        
        for stop in sorted(self.tabstops):
            if self.cursor.x < stop:
                column = stop
                break
        else:
            column = self.columns - 1

        self.cursor.x = column
1014849
def get_tabs(self):
        
        if not self.tabs:
            return None
        else:
            allowed_tabs = []
            for tab in self.tabs:

                # check permission based on named_url
                if not view_from_url(tab[1]).has_permission(self.request.user):
                    continue

                obj = self if not hasattr(self, "object") else self.object
                url = reverse_url(tab[1], obj)
                allowed_tabs.append(
                    {
                        "name": tab[0],
                        "active": self.request.path == url,
                        "url": self.in_modal(url),
                    }
                )
            return allowed_tabs
1244554
def selections(self):
        """"""
        selections = []
        cursors = self.cursors()
        if cursors:
            background = self._qpart.palette().color(QPalette.Highlight)
            foreground = self._qpart.palette().color(QPalette.HighlightedText)
            for cursor in cursors:
                selection = QTextEdit.ExtraSelection()
                selection.format.setBackground(background)
                selection.format.setForeground(foreground)
                selection.cursor = cursor

                selections.append(selection)

        return selections
540552
def find_all_checks(self, **kwargs):
        
        found = []
        searches = kwargs.items()
        for obj in self.list():
            try:
                if all(getattr(obj, attr) == value
                        for (attr, value) in searches):
                    found.append(obj)
            except AttributeError:
                continue
        return found
143696
def remove_tab(self, tab=0):
        

        # pop it from the list
        t = self.tabs.pop(tab)

        # remove it from the gui
        self._widget.removeTab(tab)

        # return it in case someone cares
        return t
384530
def describe_all(self, full=False):
        
        for table in self.tabs:
            yield self.tabs[table]().describe(full)
1147719
def make_configure_tab(self):
        
        # Setup the choice between single and multicolor
        modeframe = tk.Frame(self.tab_configure)
        self.mode = tk.IntVar()
        singlecolor = tk.Radiobutton(modeframe, text="Single color", variable=self.mode,
                                     value=1, command=lambda: self.disable_multicolor())
        multicolor = tk.Radiobutton(modeframe, text="Three color", variable=self.mode,
                                    value=3, command=lambda: self.disable_singlecolor())
        self.mode.set(3)
        singlecolor.pack(side=tk.LEFT)
        multicolor.pack(side=tk.LEFT)

        updatebutton = tk.Button(master=modeframe, text="Update",
                                 command=self.update_button_action)
        updatebutton.pack(side=tk.RIGHT)
        modeframe.grid(row=0, column=0)
        self.setup_multicolor()
        self.setup_singlecolor()
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]
585629
def checkbox_check(self, force_check=False):
        
        if not self.get_attribute('checked'):
            self.click(force_click=force_check)
354753
def query_all():
        '''
        
        '''
        recs = TabPost2Tag.select(
            TabPost2Tag,
            TabTag.kind.alias('tag_kind'),
        ).join(
            TabTag,
            on=(TabPost2Tag.tag_id == TabTag.uid)
        )
        return recs