Exemple #1
0
    def __init__(self, parent=None, with_navigation_bar=True,
                 with_filter_widget=True, with_selection_widget=True,
                 with_refresh_widget=True, perspective=None, proxy=None):

        if with_navigation_bar:
            if isinstance(with_navigation_bar, (bool, int)):
                self._with_navigation_bar = NavigationToolBar
            else:
                self._with_navigation_bar = with_navigation_bar
        else:
            self._with_navigation_bar = None

        BaseModelWidget.__init__(self, parent,
            with_filter_widget=with_filter_widget,
            with_selection_widget=with_selection_widget,
            with_refresh_widget=with_refresh_widget,
            perspective=perspective, proxy=proxy)
Exemple #2
0
    def __init__(self,
                 parent=None,
                 with_navigation_bar=True,
                 with_filter_widget=True,
                 with_selection_widget=True,
                 with_refresh_widget=True,
                 perspective=None,
                 proxy=None):

        if with_navigation_bar:
            if isinstance(with_navigation_bar, (bool, int)):
                self._with_navigation_bar = NavigationToolBar
            else:
                self._with_navigation_bar = with_navigation_bar
        else:
            self._with_navigation_bar = None

        BaseModelWidget.__init__(self,
                                 parent,
                                 with_filter_widget=with_filter_widget,
                                 with_selection_widget=with_selection_widget,
                                 with_refresh_widget=with_refresh_widget,
                                 perspective=perspective,
                                 proxy=proxy)
Exemple #3
0
    def createToolArea(self):
        ta = BaseModelWidget.createToolArea(self)

        e_bar = self._expandBar = ExpansionBar(view=self, parent=self)
        e_bar.expandTriggered.connect(self.expandAllTree)
        e_bar.collapseTriggered.connect(self.collapseAllTree)
        e_bar.expandSelectionTriggered.connect(self.expandSelectionTree)
        e_bar.collapseSelectionTriggered.connect(self.collapseSelectionTree)
        ta.append(e_bar)

        if self._with_navigation_bar:
            n_bar = self._navigationToolBar = \
                self._with_navigation_bar(view=self, parent=self)
            n_bar.goIntoTriggered.connect(self.goIntoTree)
            n_bar.goTopTriggered.connect(self.goTopTree)
            n_bar.goUpTriggered.connect(self.goUpTree)
            ta.append(n_bar)
        else:
            self._navigationToolBar = None
        return ta
Exemple #4
0
    def createToolArea(self):
        ta = BaseModelWidget.createToolArea(self)

        e_bar = self._expandBar = ExpansionBar(view=self, parent=self)
        e_bar.expandTriggered.connect(self.expandAllTree)
        e_bar.collapseTriggered.connect(self.collapseAllTree)
        e_bar.expandSelectionTriggered.connect(self.expandSelectionTree)
        e_bar.collapseSelectionTriggered.connect(self.collapseSelectionTree)
        ta.append(e_bar)

        if self._with_navigation_bar:
            n_bar = self._navigationToolBar = \
                self._with_navigation_bar(view=self, parent=self)
            n_bar.goIntoTriggered.connect(self.goIntoTree)
            n_bar.goTopTriggered.connect(self.goTopTree)
            n_bar.goUpTriggered.connect(self.goUpTree)
            ta.append(n_bar)
        else:
            self._navigationToolBar = None
        return ta