27 def __init__(self, manager, networkName, parent=None): |
27 def __init__(self, manager, networkName, parent=None): |
28 """ |
28 """ |
29 Constructor |
29 Constructor |
30 |
30 |
31 @param manager reference to the IRC network manager object |
31 @param manager reference to the IRC network manager object |
32 (IrcNetworkManager) |
32 @type IrcNetworkManager |
33 @param networkName name of the network to work on (string) |
33 @param networkName name of the network to work on |
34 @param parent reference to the parent widget (QWidget) |
34 @type str |
|
35 @param parent reference to the parent widget |
|
36 @type QWidget |
35 """ |
37 """ |
36 super().__init__(parent) |
38 super().__init__(parent) |
37 self.setupUi(self) |
39 self.setupUi(self) |
38 |
40 |
39 self.__manager = manager |
41 self.__manager = manager |
82 @pyqtSlot(str) |
84 @pyqtSlot(str) |
83 def on_networkEdit_textChanged(self, txt): |
85 def on_networkEdit_textChanged(self, txt): |
84 """ |
86 """ |
85 Private slot to handle changes of the network name. |
87 Private slot to handle changes of the network name. |
86 |
88 |
87 @param txt text entered into the network name edit (string) |
89 @param txt text entered into the network name edit |
|
90 @type str |
88 """ |
91 """ |
89 self.__updateOkButton() |
92 self.__updateOkButton() |
90 |
93 |
91 def __refreshIdentityCombo(self, currentIdentity): |
94 def __refreshIdentityCombo(self, currentIdentity): |
92 """ |
95 """ |
93 Private method to refresh the identity combo. |
96 Private method to refresh the identity combo. |
94 |
97 |
95 @param currentIdentity name of the identity to select (string) |
98 @param currentIdentity name of the identity to select |
|
99 @type str |
96 """ |
100 """ |
97 from .IrcNetworkManager import IrcIdentity |
101 from .IrcNetworkManager import IrcIdentity |
98 |
102 |
99 self.identityCombo.clear() |
103 self.identityCombo.clear() |
100 |
104 |
139 @pyqtSlot(str) |
143 @pyqtSlot(str) |
140 def on_serverEdit_textChanged(self, txt): |
144 def on_serverEdit_textChanged(self, txt): |
141 """ |
145 """ |
142 Private slot to handle changes of the server name. |
146 Private slot to handle changes of the server name. |
143 |
147 |
144 @param txt text entered into the server name edit (string) |
148 @param txt text entered into the server name edit |
|
149 @type str |
145 """ |
150 """ |
146 self.__updateOkButton() |
151 self.__updateOkButton() |
147 |
152 |
148 @pyqtSlot() |
153 @pyqtSlot() |
149 def on_editServerButton_clicked(self): |
154 def on_editServerButton_clicked(self): |
197 @pyqtSlot(QTreeWidgetItem, int) |
202 @pyqtSlot(QTreeWidgetItem, int) |
198 def on_channelList_itemActivated(self, item, column): |
203 def on_channelList_itemActivated(self, item, column): |
199 """ |
204 """ |
200 Private slot to handle the activation of a channel entry. |
205 Private slot to handle the activation of a channel entry. |
201 |
206 |
202 @param item reference to the activated item (QTreeWidgetItem) |
207 @param item reference to the activated item |
203 @param column column the activation occurred in (integer) |
208 @type QTreeWidgetItem |
|
209 @param column column the activation occurred in |
|
210 @type int |
204 """ |
211 """ |
205 self.__editChannel(item) |
212 self.__editChannel(item) |
206 |
213 |
207 @pyqtSlot() |
214 @pyqtSlot() |
208 def on_channelList_itemSelectionChanged(self): |
215 def on_channelList_itemSelectionChanged(self): |
216 |
223 |
217 def __editChannel(self, itm): |
224 def __editChannel(self, itm): |
218 """ |
225 """ |
219 Private method to edit a channel. |
226 Private method to edit a channel. |
220 |
227 |
221 @param itm reference to the item to be edited (QTreeWidgetItem) |
228 @param itm reference to the item to be edited |
|
229 @type QTreeWidgetItem |
222 """ |
230 """ |
223 from .IrcChannelEditDialog import IrcChannelEditDialog |
231 from .IrcChannelEditDialog import IrcChannelEditDialog |
224 from .IrcNetworkManager import IrcChannel |
232 from .IrcNetworkManager import IrcChannel |
225 |
233 |
226 if itm: |
234 if itm: |
256 |
264 |
257 def getNetwork(self): |
265 def getNetwork(self): |
258 """ |
266 """ |
259 Public method to get the network object. |
267 Public method to get the network object. |
260 |
268 |
261 @return edited network object (IrcNetwork) |
269 @return edited network object |
|
270 @rtype IrcNetwork |
262 """ |
271 """ |
263 self.__network.setName(self.networkEdit.text()) |
272 self.__network.setName(self.networkEdit.text()) |
264 return self.__network |
273 return self.__network |