10 |
10 |
11 import os |
11 import os |
12 |
12 |
13 from PyQt5.QtCore import QFileInfo, QRegExp, Qt, pyqtSlot |
13 from PyQt5.QtCore import QFileInfo, QRegExp, Qt, pyqtSlot |
14 from PyQt5.QtGui import QClipboard, QTextCursor |
14 from PyQt5.QtGui import QClipboard, QTextCursor |
15 from PyQt5.QtWidgets import QWidget, QDialog, QApplication, QDialogButtonBox, \ |
15 from PyQt5.QtWidgets import ( |
16 QVBoxLayout, QTableWidgetItem |
16 QWidget, QDialog, QApplication, QDialogButtonBox, QVBoxLayout, |
|
17 QTableWidgetItem |
|
18 ) |
17 |
19 |
18 from E5Gui import E5MessageBox, E5FileDialog |
20 from E5Gui import E5MessageBox, E5FileDialog |
19 from E5Gui.E5MainWindow import E5MainWindow |
21 from E5Gui.E5MainWindow import E5MainWindow |
20 |
22 |
21 from .Ui_QRegExpWizardDialog import Ui_QRegExpWizardWidget |
23 from .Ui_QRegExpWizardDialog import Ui_QRegExpWizardWidget |
233 @pyqtSlot() |
235 @pyqtSlot() |
234 def on_charButton_clicked(self): |
236 def on_charButton_clicked(self): |
235 """ |
237 """ |
236 Private slot to handle the characters toolbutton. |
238 Private slot to handle the characters toolbutton. |
237 """ |
239 """ |
238 from .QRegExpWizardCharactersDialog import \ |
240 from .QRegExpWizardCharactersDialog import ( |
239 QRegExpWizardCharactersDialog |
241 QRegExpWizardCharactersDialog |
|
242 ) |
240 dlg = QRegExpWizardCharactersDialog( |
243 dlg = QRegExpWizardCharactersDialog( |
241 mode=QRegExpWizardCharactersDialog.RegExpMode, parent=self) |
244 mode=QRegExpWizardCharactersDialog.RegExpMode, parent=self) |
242 if dlg.exec_() == QDialog.Accepted: |
245 if dlg.exec_() == QDialog.Accepted: |
243 self.__insertString(dlg.getCharacters()) |
246 self.__insertString(dlg.getCharacters()) |
244 |
247 |
245 @pyqtSlot() |
248 @pyqtSlot() |
246 def on_wildcardCharButton_clicked(self): |
249 def on_wildcardCharButton_clicked(self): |
247 """ |
250 """ |
248 Private slot to handle the wildcard characters toolbutton. |
251 Private slot to handle the wildcard characters toolbutton. |
249 """ |
252 """ |
250 from .QRegExpWizardCharactersDialog import \ |
253 from .QRegExpWizardCharactersDialog import ( |
251 QRegExpWizardCharactersDialog |
254 QRegExpWizardCharactersDialog |
|
255 ) |
252 dlg = QRegExpWizardCharactersDialog( |
256 dlg = QRegExpWizardCharactersDialog( |
253 mode=QRegExpWizardCharactersDialog.WildcardMode, parent=self) |
257 mode=QRegExpWizardCharactersDialog.WildcardMode, parent=self) |
254 if dlg.exec_() == QDialog.Accepted: |
258 if dlg.exec_() == QDialog.Accepted: |
255 self.__insertString(dlg.getCharacters()) |
259 self.__insertString(dlg.getCharacters()) |
256 |
260 |
271 @pyqtSlot() |
275 @pyqtSlot() |
272 def on_w3cCharButton_clicked(self): |
276 def on_w3cCharButton_clicked(self): |
273 """ |
277 """ |
274 Private slot to handle the wildcard characters toolbutton. |
278 Private slot to handle the wildcard characters toolbutton. |
275 """ |
279 """ |
276 from .QRegExpWizardCharactersDialog import \ |
280 from .QRegExpWizardCharactersDialog import ( |
277 QRegExpWizardCharactersDialog |
281 QRegExpWizardCharactersDialog |
|
282 ) |
278 dlg = QRegExpWizardCharactersDialog( |
283 dlg = QRegExpWizardCharactersDialog( |
279 mode=QRegExpWizardCharactersDialog.W3CMode, parent=self) |
284 mode=QRegExpWizardCharactersDialog.W3CMode, parent=self) |
280 if dlg.exec_() == QDialog.Accepted: |
285 if dlg.exec_() == QDialog.Accepted: |
281 self.__insertString(dlg.getCharacters()) |
286 self.__insertString(dlg.getCharacters()) |
282 |
287 |