9 |
9 |
10 from PyQt6.QtCore import pyqtSlot, Qt, QByteArray, QRegularExpression |
10 from PyQt6.QtCore import pyqtSlot, Qt, QByteArray, QRegularExpression |
11 from PyQt6.QtGui import QRegularExpressionValidator |
11 from PyQt6.QtGui import QRegularExpressionValidator |
12 from PyQt6.QtWidgets import QWidget |
12 from PyQt6.QtWidgets import QWidget |
13 |
13 |
14 from EricGui.EricAction import EricAction |
14 from eric7.EricGui.EricAction import EricAction |
15 from EricWidgets import EricMessageBox |
15 from eric7.EricWidgets import EricMessageBox |
16 |
16 |
17 import UI.PixmapCache |
17 from eric7.EricGui import EricPixmapCache |
18 |
18 |
19 |
19 |
20 class HexEditSearchReplaceWidget(QWidget): |
20 class HexEditSearchReplaceWidget(QWidget): |
21 """ |
21 """ |
22 Class implementing a search and replace widget for the hex editor. |
22 Class implementing a search and replace widget for the hex editor. |
78 from .Ui_HexEditSearchWidget import Ui_HexEditSearchWidget |
78 from .Ui_HexEditSearchWidget import Ui_HexEditSearchWidget |
79 |
79 |
80 self.__ui = Ui_HexEditSearchWidget() |
80 self.__ui = Ui_HexEditSearchWidget() |
81 self.__ui.setupUi(self) |
81 self.__ui.setupUi(self) |
82 |
82 |
83 self.__ui.closeButton.setIcon(UI.PixmapCache.getIcon("close")) |
83 self.__ui.closeButton.setIcon(EricPixmapCache.getIcon("close")) |
84 self.__ui.findPrevButton.setIcon(UI.PixmapCache.getIcon("1leftarrow")) |
84 self.__ui.findPrevButton.setIcon(EricPixmapCache.getIcon("1leftarrow")) |
85 self.__ui.findNextButton.setIcon(UI.PixmapCache.getIcon("1rightarrow")) |
85 self.__ui.findNextButton.setIcon(EricPixmapCache.getIcon("1rightarrow")) |
86 |
86 |
87 if replace: |
87 if replace: |
88 self.__ui.replaceButton.setIcon(UI.PixmapCache.getIcon("editReplace")) |
88 self.__ui.replaceButton.setIcon(EricPixmapCache.getIcon("editReplace")) |
89 self.__ui.replaceSearchButton.setIcon( |
89 self.__ui.replaceSearchButton.setIcon( |
90 UI.PixmapCache.getIcon("editReplaceSearch") |
90 EricPixmapCache.getIcon("editReplaceSearch") |
91 ) |
91 ) |
92 self.__ui.replaceAllButton.setIcon(UI.PixmapCache.getIcon("editReplaceAll")) |
92 self.__ui.replaceAllButton.setIcon( |
|
93 EricPixmapCache.getIcon("editReplaceAll") |
|
94 ) |
93 |
95 |
94 for dataFormat in formatOrder: |
96 for dataFormat in formatOrder: |
95 formatStr, validator = self.__formatAndValidators[dataFormat] |
97 formatStr, validator = self.__formatAndValidators[dataFormat] |
96 self.__ui.findFormatCombo.addItem(formatStr, dataFormat) |
98 self.__ui.findFormatCombo.addItem(formatStr, dataFormat) |
97 if replace: |
99 if replace: |