6 """ |
6 """ |
7 Module implementing the Cooperation configuration page. |
7 Module implementing the Cooperation configuration page. |
8 """ |
8 """ |
9 |
9 |
10 |
10 |
11 from PyQt5.QtCore import pyqtSlot, QRegExp |
11 from PyQt5.QtCore import pyqtSlot, QRegularExpression |
12 from PyQt5.QtGui import QRegExpValidator, QValidator |
12 from PyQt5.QtGui import QRegularExpressionValidator, QValidator |
13 |
13 |
14 from .ConfigurationPageBase import ConfigurationPageBase |
14 from .ConfigurationPageBase import ConfigurationPageBase |
15 from .Ui_CooperationPage import Ui_CooperationPage |
15 from .Ui_CooperationPage import Ui_CooperationPage |
16 |
16 |
17 import Preferences |
17 import Preferences |
27 """ |
27 """ |
28 super(CooperationPage, self).__init__() |
28 super(CooperationPage, self).__init__() |
29 self.setupUi(self) |
29 self.setupUi(self) |
30 self.setObjectName("CooperationPage") |
30 self.setObjectName("CooperationPage") |
31 |
31 |
32 self.__bannedUserValidator = QRegExpValidator( |
32 self.__bannedUserValidator = QRegularExpressionValidator( |
33 QRegExp(r"[a-zA-Z0-9.-]+@" |
33 QRegularExpression( |
34 r"(?:(?:2(?:[0-4][0-9]|5[0-5])|[01]?[0-9]{1,2})\.){3}" |
34 r"[a-zA-Z0-9.-]+@" |
35 r"(?:2(?:[0-4][0-9]|5[0-5])|[01]?[0-9]{1,2})"), |
35 r"(?:(?:2(?:[0-4][0-9]|5[0-5])|[01]?[0-9]{1,2})\.){3}" |
|
36 r"(?:2(?:[0-4][0-9]|5[0-5])|[01]?[0-9]{1,2})"), |
36 self.bannedUserEdit) |
37 self.bannedUserEdit) |
37 self.bannedUserEdit.setValidator(self.__bannedUserValidator) |
38 self.bannedUserEdit.setValidator(self.__bannedUserValidator) |
38 |
39 |
39 # set initial values |
40 # set initial values |
40 self.autostartCheckBox.setChecked( |
41 self.autostartCheckBox.setChecked( |