src/eric7/Plugins/VcsPlugins/vcsGit/GitApplyBundleDataDialog.py

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8881
54e42bc2437a
child 9221
bf71ee032bb4
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2014 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data for applying a bundle.
8 """
9
10 from PyQt6.QtWidgets import QDialog
11
12 from .Ui_GitApplyBundleDataDialog import Ui_GitApplyBundleDataDialog
13
14
15 class GitApplyBundleDataDialog(QDialog, Ui_GitApplyBundleDataDialog):
16 """
17 Class implementing a dialog to enter the data for applying a bundle.
18 """
19 def __init__(self, bundleHeads, branches, parent=None):
20 """
21 Constructor
22
23 @param bundleHeads list of heads contained in a bundle
24 (list of strings)
25 @param branches list of available branch names (list of strings)
26 @param parent reference to the parent widget (QWidget)
27 """
28 super().__init__(parent)
29 self.setupUi(self)
30
31 self.headCombo.addItems(sorted(bundleHeads))
32 self.branchCombo.addItems([""] + sorted(branches))
33
34 def getData(self):
35 """
36 Public method to get the entered data.
37
38 @return tuple with the bundle head (string) and the local branch
39 name (string)
40 """
41 return self.headCombo.currentText(), self.branchCombo.currentText()

eric ide

mercurial