src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
33 Constructor 33 Constructor
34 34
35 @param mode mode of the dialog (HgQueuesQueueManagementDialog.NO_INPUT 35 @param mode mode of the dialog (HgQueuesQueueManagementDialog.NO_INPUT
36 HgQueuesQueueManagementDialog.NAME_INPUT, 36 HgQueuesQueueManagementDialog.NAME_INPUT,
37 HgQueuesQueueManagementDialog.QUEUE_INPUT) 37 HgQueuesQueueManagementDialog.QUEUE_INPUT)
38 @param title title for the dialog (string) 38 @type int
39 @param title title for the dialog
40 @type str
39 @param suppressActive flag indicating to not show the name of the 41 @param suppressActive flag indicating to not show the name of the
40 active queue (boolean) 42 active queue
43 @type bool
41 @param vcs reference to the vcs object 44 @param vcs reference to the vcs object
42 @param parent reference to the parent widget (QWidget) 45 @type Hg
46 @param parent reference to the parent widget
47 @type QWidget
43 @exception ValueError raised to indicate an invalid dialog mode 48 @exception ValueError raised to indicate an invalid dialog mode
44 """ 49 """
45 super().__init__(parent) 50 super().__init__(parent)
46 self.setupUi(self) 51 self.setupUi(self)
47 self.setWindowFlags(Qt.WindowType.Window) 52 self.setWindowFlags(Qt.WindowType.Window)
96 def __getQueuesList(self): 101 def __getQueuesList(self):
97 """ 102 """
98 Private method to get a list of all queues and the name of the active 103 Private method to get a list of all queues and the name of the active
99 queue. 104 queue.
100 105
101 @return tuple with a list of all queues and the name of the active 106 @return tuple with a list of all queues and the name of the active queue
102 queue (list of strings, string) 107 @rtype tuple of (list of str, str)
103 """ 108 """
104 queuesList = [] 109 queuesList = []
105 activeQueue = "" 110 activeQueue = ""
106 111
107 args = self.vcs.initCommand("qqueue") 112 args = self.vcs.initCommand("qqueue")
125 @pyqtSlot(str) 130 @pyqtSlot(str)
126 def on_nameEdit_textChanged(self, txt): 131 def on_nameEdit_textChanged(self, txt):
127 """ 132 """
128 Private slot to handle changes of the entered queue name. 133 Private slot to handle changes of the entered queue name.
129 134
130 @param txt text of the edit (string) 135 @param txt text of the edit
136 @type str
131 """ 137 """
132 if self.__mode == HgQueuesQueueManagementDialog.NAME_INPUT: 138 if self.__mode == HgQueuesQueueManagementDialog.NAME_INPUT:
133 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( 139 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
134 txt != "" 140 txt != ""
135 ) 141 )
147 @pyqtSlot(QAbstractButton) 153 @pyqtSlot(QAbstractButton)
148 def on_buttonBox_clicked(self, button): 154 def on_buttonBox_clicked(self, button):
149 """ 155 """
150 Private slot called by a button of the button box clicked. 156 Private slot called by a button of the button box clicked.
151 157
152 @param button button that was clicked (QAbstractButton) 158 @param button button that was clicked
159 @type QAbstractButton
153 """ 160 """
154 if button == self.refreshButton: 161 if button == self.refreshButton:
155 self.refresh() 162 self.refresh()
156 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 163 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
157 self.close() 164 self.close()
171 178
172 def getData(self): 179 def getData(self):
173 """ 180 """
174 Public slot to get the data. 181 Public slot to get the data.
175 182
176 @return queue name (string) 183 @return queue name
184 @rtype str
177 """ 185 """
178 name = "" 186 name = ""
179 if self.__mode == HgQueuesQueueManagementDialog.NAME_INPUT: 187 if self.__mode == HgQueuesQueueManagementDialog.NAME_INPUT:
180 name = self.nameEdit.text().replace(" ", "_") 188 name = self.nameEdit.text().replace(" ", "_")
181 elif self.__mode == HgQueuesQueueManagementDialog.QUEUE_INPUT: 189 elif self.__mode == HgQueuesQueueManagementDialog.QUEUE_INPUT:

eric ide

mercurial