ProjectDjango/DjangoSendTestEmailDataDialog.py

branch
eric7
changeset 180
64339135bd61
parent 175
30cb5e553e7e
child 190
f394b11f9f31
equal deleted inserted replaced
179:8413c2429808 180:64339135bd61
15 class DjangoSendTestEmailDataDialog(QDialog, Ui_DjangoSendTestEmailDataDialog): 15 class DjangoSendTestEmailDataDialog(QDialog, Ui_DjangoSendTestEmailDataDialog):
16 """ 16 """
17 Class implementing a dialog to enter the data for the 'sendtestemail' 17 Class implementing a dialog to enter the data for the 'sendtestemail'
18 command. 18 command.
19 """ 19 """
20
20 def __init__(self, parent=None): 21 def __init__(self, parent=None):
21 """ 22 """
22 Constructor 23 Constructor
23 24
24 @param parent reference to the parent widget 25 @param parent reference to the parent widget
25 @type QWidget 26 @type QWidget
26 """ 27 """
27 super().__init__(parent) 28 super().__init__(parent)
28 self.setupUi(self) 29 self.setupUi(self)
29 30
30 def getData(self): 31 def getData(self):
31 """ 32 """
32 Public method to get the dialog data. 33 Public method to get the dialog data.
33 34
34 @return tuple containing a flag indicating to send to the defined 35 @return tuple containing a flag indicating to send to the defined
35 managers, a flag indicating to send to the defined administrators 36 managers, a flag indicating to send to the defined administrators
36 and a list of recipients 37 and a list of recipients
37 @rtype tuple of (bool, bool, list of str) 38 @rtype tuple of (bool, bool, list of str)
38 """ 39 """
39 recipientsStr = self.recipientsEdit.toPlainText() 40 recipientsStr = self.recipientsEdit.toPlainText()
40 recipients = [r.strip() 41 recipients = [r.strip() for r in recipientsStr.splitlines() if r.strip()]
41 for r in recipientsStr.splitlines() 42
42 if r.strip()]
43
44 return ( 43 return (
45 self.managersCheckBox.isChecked(), 44 self.managersCheckBox.isChecked(),
46 self.adminsCheckBox.isChecked(), 45 self.adminsCheckBox.isChecked(),
47 recipients, 46 recipients,
48 ) 47 )

eric ide

mercurial