22 QDialogButtonBox, |
22 QDialogButtonBox, |
23 QVBoxLayout, |
23 QVBoxLayout, |
24 QTableWidgetItem, |
24 QTableWidgetItem, |
25 ) |
25 ) |
26 |
26 |
27 from EricWidgets import EricMessageBox, EricFileDialog |
27 from eric7.EricWidgets import EricMessageBox, EricFileDialog |
28 from EricWidgets.EricMainWindow import EricMainWindow |
28 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
29 |
29 |
30 from .Ui_QRegularExpressionWizardDialog import Ui_QRegularExpressionWizardDialog |
30 from .Ui_QRegularExpressionWizardDialog import Ui_QRegularExpressionWizardDialog |
31 |
31 |
32 import UI.PixmapCache |
32 from eric7.EricGui import EricPixmapCache |
33 |
33 |
34 import Globals |
34 from eric7 import Globals, Preferences, Utilities |
35 import Utilities |
|
36 import Preferences |
|
37 |
35 |
38 |
36 |
39 class QRegularExpressionWizardWidget(QWidget, Ui_QRegularExpressionWizardDialog): |
37 class QRegularExpressionWizardWidget(QWidget, Ui_QRegularExpressionWizardDialog): |
40 """ |
38 """ |
41 Class implementing the QRegularExpression wizard dialog. |
39 Class implementing the QRegularExpression wizard dialog. |
50 """ |
48 """ |
51 super().__init__(parent) |
49 super().__init__(parent) |
52 self.setupUi(self) |
50 self.setupUi(self) |
53 |
51 |
54 # initialize icons of the tool buttons |
52 # initialize icons of the tool buttons |
55 self.commentButton.setIcon(UI.PixmapCache.getIcon("comment")) |
53 self.commentButton.setIcon(EricPixmapCache.getIcon("comment")) |
56 self.charButton.setIcon(UI.PixmapCache.getIcon("characters")) |
54 self.charButton.setIcon(EricPixmapCache.getIcon("characters")) |
57 self.anycharButton.setIcon(UI.PixmapCache.getIcon("anychar")) |
55 self.anycharButton.setIcon(EricPixmapCache.getIcon("anychar")) |
58 self.repeatButton.setIcon(UI.PixmapCache.getIcon("repeat")) |
56 self.repeatButton.setIcon(EricPixmapCache.getIcon("repeat")) |
59 self.nonGroupButton.setIcon(UI.PixmapCache.getIcon("nongroup")) |
57 self.nonGroupButton.setIcon(EricPixmapCache.getIcon("nongroup")) |
60 self.atomicGroupButton.setIcon(UI.PixmapCache.getIcon("atomicgroup")) |
58 self.atomicGroupButton.setIcon(EricPixmapCache.getIcon("atomicgroup")) |
61 self.groupButton.setIcon(UI.PixmapCache.getIcon("group")) |
59 self.groupButton.setIcon(EricPixmapCache.getIcon("group")) |
62 self.namedGroupButton.setIcon(UI.PixmapCache.getIcon("namedgroup")) |
60 self.namedGroupButton.setIcon(EricPixmapCache.getIcon("namedgroup")) |
63 self.namedReferenceButton.setIcon(UI.PixmapCache.getIcon("namedreference")) |
61 self.namedReferenceButton.setIcon(EricPixmapCache.getIcon("namedreference")) |
64 self.altnButton.setIcon(UI.PixmapCache.getIcon("altn")) |
62 self.altnButton.setIcon(EricPixmapCache.getIcon("altn")) |
65 self.beglineButton.setIcon(UI.PixmapCache.getIcon("begline")) |
63 self.beglineButton.setIcon(EricPixmapCache.getIcon("begline")) |
66 self.endlineButton.setIcon(UI.PixmapCache.getIcon("endline")) |
64 self.endlineButton.setIcon(EricPixmapCache.getIcon("endline")) |
67 self.wordboundButton.setIcon(UI.PixmapCache.getIcon("wordboundary")) |
65 self.wordboundButton.setIcon(EricPixmapCache.getIcon("wordboundary")) |
68 self.nonwordboundButton.setIcon(UI.PixmapCache.getIcon("nonwordboundary")) |
66 self.nonwordboundButton.setIcon(EricPixmapCache.getIcon("nonwordboundary")) |
69 self.poslookaheadButton.setIcon(UI.PixmapCache.getIcon("poslookahead")) |
67 self.poslookaheadButton.setIcon(EricPixmapCache.getIcon("poslookahead")) |
70 self.neglookaheadButton.setIcon(UI.PixmapCache.getIcon("neglookahead")) |
68 self.neglookaheadButton.setIcon(EricPixmapCache.getIcon("neglookahead")) |
71 self.poslookbehindButton.setIcon(UI.PixmapCache.getIcon("poslookbehind")) |
69 self.poslookbehindButton.setIcon(EricPixmapCache.getIcon("poslookbehind")) |
72 self.neglookbehindButton.setIcon(UI.PixmapCache.getIcon("neglookbehind")) |
70 self.neglookbehindButton.setIcon(EricPixmapCache.getIcon("neglookbehind")) |
73 self.undoButton.setIcon(UI.PixmapCache.getIcon("editUndo")) |
71 self.undoButton.setIcon(EricPixmapCache.getIcon("editUndo")) |
74 self.redoButton.setIcon(UI.PixmapCache.getIcon("editRedo")) |
72 self.redoButton.setIcon(EricPixmapCache.getIcon("editRedo")) |
75 |
73 |
76 self.namedGroups = re.compile(r"""\(?P<([^>]+)>""").findall |
74 self.namedGroups = re.compile(r"""\(?P<([^>]+)>""").findall |
77 |
75 |
78 # start the PyQt6 server part |
76 # start the PyQt6 server part |
79 self.__pyqt6Available = False |
77 self.__pyqt6Available = False |