25 |
25 |
26 def __init__(self, withLargefiles=False, largefilesData=None, parent=None): |
26 def __init__(self, withLargefiles=False, largefilesData=None, parent=None): |
27 """ |
27 """ |
28 Constructor |
28 Constructor |
29 |
29 |
30 @param withLargefiles flag indicating to configure the largefiles |
30 @param withLargefiles flag indicating to configure the largefiles section |
31 section (boolean) |
31 @type bool |
32 @param largefilesData dictionary with data for the largefiles |
32 @param largefilesData dictionary with data for the largefiles section |
33 section (dict) |
33 @type dictdict |
34 @param parent reference to the parent widget (QWidget) |
34 @param parent reference to the parent widget |
|
35 @type QWidget |
35 """ |
36 """ |
36 super().__init__(parent) |
37 super().__init__(parent) |
37 self.setupUi(self) |
38 self.setupUi(self) |
38 |
39 |
39 self.defaultShowPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) |
40 self.defaultShowPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) |
56 def on_defaultShowPasswordButton_clicked(self, checked): |
57 def on_defaultShowPasswordButton_clicked(self, checked): |
57 """ |
58 """ |
58 Private slot to switch the default password visibility |
59 Private slot to switch the default password visibility |
59 of the default password. |
60 of the default password. |
60 |
61 |
61 @param checked state of the push button (boolean) |
62 @param checked state of the push button |
|
63 @type bool |
62 """ |
64 """ |
63 if checked: |
65 if checked: |
64 self.defaultPasswordEdit.setEchoMode(QLineEdit.EchoMode.Normal) |
66 self.defaultPasswordEdit.setEchoMode(QLineEdit.EchoMode.Normal) |
65 else: |
67 else: |
66 self.defaultPasswordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
68 self.defaultPasswordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
69 def on_defaultPushShowPasswordButton_clicked(self, checked): |
71 def on_defaultPushShowPasswordButton_clicked(self, checked): |
70 """ |
72 """ |
71 Private slot to switch the default password visibility |
73 Private slot to switch the default password visibility |
72 of the default push password. |
74 of the default push password. |
73 |
75 |
74 @param checked state of the push button (boolean) |
76 @param checked state of the push button |
|
77 @type bool |
75 """ |
78 """ |
76 if checked: |
79 if checked: |
77 self.defaultPushPasswordEdit.setEchoMode(QLineEdit.EchoMode.Normal) |
80 self.defaultPushPasswordEdit.setEchoMode(QLineEdit.EchoMode.Normal) |
78 else: |
81 else: |
79 self.defaultPushPasswordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
82 self.defaultPushPasswordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
80 |
83 |
81 def getData(self): |
84 def getData(self): |
82 """ |
85 """ |
83 Public method to get the data entered into the dialog. |
86 Public method to get the data entered into the dialog. |
84 |
87 |
85 @return tuple giving the default and default push URLs (tuple of |
88 @return tuple giving the default and default push URLs |
86 two strings) |
89 @rtype tuple of (str, str) |
87 """ |
90 """ |
88 defaultUrl = QUrl.fromUserInput(self.defaultUrlEdit.text()) |
91 defaultUrl = QUrl.fromUserInput(self.defaultUrlEdit.text()) |
89 username = self.defaultUserEdit.text() |
92 username = self.defaultUserEdit.text() |
90 password = self.defaultPasswordEdit.text() |
93 password = self.defaultPasswordEdit.text() |
91 if username: |
94 if username: |
107 |
110 |
108 def getLargefilesData(self): |
111 def getLargefilesData(self): |
109 """ |
112 """ |
110 Public method to get the data for the largefiles extension. |
113 Public method to get the data for the largefiles extension. |
111 |
114 |
112 @return tuple with the minimum file size (integer) and file patterns |
115 @return tuple with the minimum file size and file patterns. None as value |
113 (list of string). None as value denote to use the default value. |
116 denote to use the default value. |
|
117 @rtype tuple of (int, list of str) |
114 """ |
118 """ |
115 if self.__withLargefiles: |
119 if self.__withLargefiles: |
116 lfDefaults = getLargefilesDefaults() |
120 lfDefaults = getLargefilesDefaults() |
117 if self.lfFileSizeSpinBox.value() == lfDefaults["minsize"]: |
121 if self.lfFileSizeSpinBox.value() == lfDefaults["minsize"]: |
118 minsize = None |
122 minsize = None |