Plugins/VcsPlugins/vcsGit/GitApplyBundleDataDialog.py

changeset 6020
baf6da1ae288
child 6048
82ad8ec9548c
equal deleted inserted replaced
6019:58ecdaf0b789 6020:baf6da1ae288
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2014 - 2017 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 __future__ import unicode_literals
11
12 from PyQt5.QtWidgets import QDialog
13
14 from .Ui_GitApplyBundleDataDialog import Ui_GitApplyBundleDataDialog
15
16
17 class GitApplyBundleDataDialog(QDialog, Ui_GitApplyBundleDataDialog):
18 """
19 Class implementing a dialog to enter the data for applying a bundle.
20 """
21 def __init__(self, bundleHeads, branches, parent=None):
22 """
23 Constructor
24
25 @param bundleHeads list of heads contained in a bundle
26 (list of strings)
27 @param branches list of available branch names (list of strings)
28 @param parent reference to the parent widget (QWidget)
29 """
30 super(GitApplyBundleDataDialog, self).__init__(parent)
31 self.setupUi(self)
32
33 self.headCombo.addItems(sorted(bundleHeads))
34 self.branchCombo.addItems([""] + sorted(branches))
35
36 def getData(self):
37 """
38 Public method to get the entered data.
39
40 @return tuple with the bundle head (string) and the local branch
41 name (string)
42 """
43 return self.headCombo.currentText(), self.branchCombo.currentText()

eric ide

mercurial