コード例 #1
0
    def __init__(self, view=None, parent=None, designMode=False):
        BaseToolBar.__init__(self,
                             name="Taurus selection toolbar",
                             view=view,
                             parent=parent,
                             designMode=designMode)

        af = ActionFactory()
        self._goIntoAction = af.createAction(
            self,
            "Go Into",
            icon=Qt.QIcon.fromTheme("go-down"),
            tip="Go into the selected item",
            triggered=self.goInto)
        self._goUpAction = af.createAction(self,
                                           "Go Up",
                                           icon=Qt.QIcon.fromTheme("go-up"),
                                           tip="Go up one level",
                                           triggered=self.goUp)
        self._goTopAction = af.createAction(self,
                                            "Go Top",
                                            icon=Qt.QIcon.fromTheme("go-top"),
                                            tip="Go to top level",
                                            triggered=self.goTop)
        self.addAction(self._goIntoAction)
        self.addAction(self._goUpAction)
        self.addAction(self._goTopAction)
        self._navigationWidget = _NavigationWidget(view, self, parent=self)
        self._navigationAction = self.addWidget(self._navigationWidget)
コード例 #2
0
ファイル: qtree.py プロジェクト: cmft/taurus
    def __init__(self, view=None, parent=None, designMode=False):
        BaseToolBar.__init__(self, name="Taurus selection toolbar", view=view,
                             parent=parent, designMode=designMode)

        af = ActionFactory()
        self._expandAllAction = af.createAction(self, "Expand All",
                                                icon=Qt.QIcon(
                                                    "actions:expand.png"),
                                                tip="Expand all items",
                                                triggered=self.onExpandAll)
        self._collapseAllAction = af.createAction(self, "Collapse All",
                                                  icon=Qt.QIcon(
                                                      "actions:collapse.png"),
                                                  tip="Collapse all items",
                                                  triggered=self.onCollapseAll)
        self._expandSelectionAction = af.createAction(self, "Expand selection",
                                                      icon=Qt.QIcon(
                                                          "actions:expand-selection.png"),
                                                      tip="Expand selection",
                                                      triggered=self.onExpandSelection)
        self._collapseSelectionAction = af.createAction(self, "Collapse All",
                                                        icon=Qt.QIcon(
                                                            "actions:collapse-selection.png"),
                                                        tip="Collapse selection",
                                                        triggered=self.onCollapseSelection)
        self.addAction(self._expandAllAction)
        self.addAction(self._collapseAllAction)
        self.addAction(self._expandSelectionAction)
        self.addAction(self._collapseSelectionAction)
コード例 #3
0
ファイル: qtree.py プロジェクト: cmft/taurus
    def __init__(self, view=None, parent=None, designMode=False):
        BaseToolBar.__init__(self, name="Taurus selection toolbar", view=view,
                             parent=parent, designMode=designMode)

        af = ActionFactory()
        self._goIntoAction = af.createAction(self, "Go Into",
                                             icon=Qt.QIcon.fromTheme("go-down"),
                                             tip="Go into the selected item",
                                             triggered=self.goInto)
        self._goUpAction = af.createAction(self, "Go Up",
                                           icon=Qt.QIcon.fromTheme("go-up"),
                                           tip="Go up one level",
                                           triggered=self.goUp)
        self._goTopAction = af.createAction(self, "Go Top",
                                            icon=Qt.QIcon.fromTheme("go-top"),
                                            tip="Go to top level",
                                            triggered=self.goTop)
        self.addAction(self._goIntoAction)
        self.addAction(self._goUpAction)
        self.addAction(self._goTopAction)
        self._navigationWidget = _NavigationWidget(view, self, parent=self)
        self._navigationAction = self.addWidget(self._navigationWidget)
コード例 #4
0
    def __init__(self, view=None, parent=None, designMode=False):
        BaseToolBar.__init__(self,
                             name="Taurus selection toolbar",
                             view=view,
                             parent=parent,
                             designMode=designMode)

        af = ActionFactory()
        self._expandAllAction = af.createAction(
            self,
            "Expand All",
            icon=Qt.QIcon("actions:expand.png"),
            tip="Expand all items",
            triggered=self.onExpandAll)
        self._collapseAllAction = af.createAction(
            self,
            "Collapse All",
            icon=Qt.QIcon("actions:collapse.png"),
            tip="Collapse all items",
            triggered=self.onCollapseAll)
        self._expandSelectionAction = af.createAction(
            self,
            "Expand selection",
            icon=Qt.QIcon("actions:expand-selection.png"),
            tip="Expand selection",
            triggered=self.onExpandSelection)
        self._collapseSelectionAction = af.createAction(
            self,
            "Collapse All",
            icon=Qt.QIcon("actions:collapse-selection.png"),
            tip="Collapse selection",
            triggered=self.onCollapseSelection)
        self.addAction(self._expandAllAction)
        self.addAction(self._collapseAllAction)
        self.addAction(self._expandSelectionAction)
        self.addAction(self._collapseSelectionAction)