src/eric7/Plugins/VcsPlugins/vcsMercurial/HgSummaryDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
23 def __init__(self, vcs, parent=None): 23 def __init__(self, vcs, parent=None):
24 """ 24 """
25 Constructor 25 Constructor
26 26
27 @param vcs reference to the vcs object 27 @param vcs reference to the vcs object
28 @param parent parent widget (QWidget) 28 @type Hg
29 @param parent parent widget
30 @type QWidget
29 """ 31 """
30 super().__init__(parent) 32 super().__init__(parent)
31 self.setupUi(self) 33 self.setupUi(self)
32 34
33 self.refreshButton = self.buttonBox.addButton( 35 self.refreshButton = self.buttonBox.addButton(
41 43
42 def start(self, mq=False, largefiles=False): 44 def start(self, mq=False, largefiles=False):
43 """ 45 """
44 Public slot to start the hg summary command. 46 Public slot to start the hg summary command.
45 47
46 @param mq flag indicating to show the queue status as well (boolean) 48 @param mq flag indicating to show the queue status as well
49 @type bool
47 @param largefiles flag indicating to show the largefiles status as 50 @param largefiles flag indicating to show the largefiles status as
48 well (boolean) 51 well
52 @type bool
49 """ 53 """
50 self.errorGroup.hide() 54 self.errorGroup.hide()
51 self.refreshButton.setEnabled(False) 55 self.refreshButton.setEnabled(False)
52 self.summary.clear() 56 self.summary.clear()
53 57
73 77
74 def on_buttonBox_clicked(self, button): 78 def on_buttonBox_clicked(self, button):
75 """ 79 """
76 Private slot called by a button of the button box clicked. 80 Private slot called by a button of the button box clicked.
77 81
78 @param button button that was clicked (QAbstractButton) 82 @param button button that was clicked
83 @type QAbstractButton
79 """ 84 """
80 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 85 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
81 self.close() 86 self.close()
82 elif button == self.refreshButton: 87 elif button == self.refreshButton:
83 self.on_refreshButton_clicked() 88 self.on_refreshButton_clicked()
98 103
99 def __showError(self, out): 104 def __showError(self, out):
100 """ 105 """
101 Private slot to show some error. 106 Private slot to show some error.
102 107
103 @param out error to be shown (string) 108 @param out error to be shown
109 @type str
104 """ 110 """
105 self.errorGroup.show() 111 self.errorGroup.show()
106 self.errors.insertPlainText(out) 112 self.errors.insertPlainText(out)
107 self.errors.ensureCursorVisible() 113 self.errors.ensureCursorVisible()
108 114
109 def __processOutput(self, output): 115 def __processOutput(self, output):
110 """ 116 """
111 Private method to process the output into nice readable text. 117 Private method to process the output into nice readable text.
112 118
113 @param output output from the summary command (string) 119 @param output output from the summary command
120 @type str
114 """ 121 """
115 infoDict = {} 122 infoDict = {}
116 123
117 # step 1: parse the output 124 # step 1: parse the output
118 while output: 125 while output:

eric ide

mercurial