コード例 #1
0
ファイル: status.py プロジェクト: jmdcal/git-cola
    def __init__(self, titlebar, parent=None):
        QtGui.QWidget.__init__(self, parent)

        tooltip = N_('Toggle the paths filter')
        self.filter_button = qtutils.create_action_button(
                tooltip=tooltip,
                icon=qtutils.filter_icon())

        self.filter_widget = StatusFilterWidget(self)
        self.filter_widget.hide()

        self.tree = StatusTreeWidget(self)

        self.main_layout = QtGui.QVBoxLayout(self)
        self.main_layout.setMargin(defs.no_margin)
        self.main_layout.setSpacing(defs.no_spacing)

        self.main_layout.addWidget(self.filter_widget)
        self.main_layout.addWidget(self.tree)
        self.setLayout(self.main_layout)

        self.toggle_action = qtutils.add_action(self, tooltip,
                self.toggle_filter, 'Shift+Ctrl+F')

        titlebar.add_corner_widget(self.filter_button)
        qtutils.connect_button(self.filter_button, self.toggle_filter)
コード例 #2
0
ファイル: status.py プロジェクト: HenryHo2015/git-cola
    def __init__(self, titlebar, parent=None):
        QtGui.QWidget.__init__(self, parent)

        tooltip = N_("Toggle the paths filter")
        self.filter_button = qtutils.create_action_button(tooltip=tooltip, icon=qtutils.filter_icon())

        self.filter_widget = StatusFilterWidget()
        self.filter_widget.hide()
        self.tree = StatusTreeWidget()
        self.setFocusProxy(self.tree)

        self.main_layout = qtutils.vbox(defs.no_margin, defs.no_spacing, self.filter_widget, self.tree)
        self.setLayout(self.main_layout)

        self.toggle_action = qtutils.add_action(self, tooltip, self.toggle_filter, "Shift+Ctrl+F")

        titlebar.add_corner_widget(self.filter_button)
        qtutils.connect_button(self.filter_button, self.toggle_filter)
コード例 #3
0
ファイル: status.py プロジェクト: PauloVAF/git-cola
    def __init__(self, titlebar, parent=None):
        QtGui.QWidget.__init__(self, parent)

        tooltip = N_('Toggle the paths filter')
        self.filter_button = qtutils.create_action_button(
            tooltip=tooltip, icon=qtutils.filter_icon())

        self.filter_widget = StatusFilterWidget()
        self.filter_widget.hide()
        self.tree = StatusTreeWidget()

        self.main_layout = qtutils.vbox(defs.no_margin, defs.no_spacing,
                                        self.filter_widget, self.tree)
        self.setLayout(self.main_layout)

        self.toggle_action = qtutils.add_action(self, tooltip,
                                                self.toggle_filter,
                                                'Shift+Ctrl+F')

        titlebar.add_corner_widget(self.filter_button)
        qtutils.connect_button(self.filter_button, self.toggle_filter)