9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import QFileInfo, QRegExp, Qt, pyqtSlot, qVersion |
12 from PyQt4.QtCore import QFileInfo, QRegExp, Qt, pyqtSlot, qVersion |
13 from PyQt4.QtGui import QWidget, QDialog, QApplication, QClipboard, QTextCursor, \ |
13 from PyQt4.QtGui import QWidget, QDialog, QApplication, QClipboard, QTextCursor, \ |
14 QDialogButtonBox, QMainWindow, QVBoxLayout, QTableWidgetItem |
14 QDialogButtonBox, QVBoxLayout, QTableWidgetItem |
15 |
15 |
16 from E5Gui import E5MessageBox, E5FileDialog |
16 from E5Gui import E5MessageBox, E5FileDialog |
|
17 from E5Gui.E5MainWindow import E5MainWindow |
17 |
18 |
18 from .Ui_QRegExpWizardDialog import Ui_QRegExpWizardWidget |
19 from .Ui_QRegExpWizardDialog import Ui_QRegExpWizardWidget |
19 |
20 |
20 from .QRegExpWizardRepeatDialog import QRegExpWizardRepeatDialog |
21 from .QRegExpWizardRepeatDialog import QRegExpWizardRepeatDialog |
21 from .QRegExpWizardCharactersDialog import QRegExpWizardCharactersDialog |
22 from .QRegExpWizardCharactersDialog import QRegExpWizardCharactersDialog |
22 |
23 |
23 import UI.PixmapCache |
24 import UI.PixmapCache |
24 |
25 |
25 import Utilities |
26 import Utilities |
|
27 import Preferences |
26 |
28 |
27 |
29 |
28 class QRegExpWizardWidget(QWidget, Ui_QRegExpWizardWidget): |
30 class QRegExpWizardWidget(QWidget, Ui_QRegExpWizardWidget): |
29 """ |
31 """ |
30 Class implementing the QRegExp wizard dialog. |
32 Class implementing the QRegExp wizard dialog. |
646 @return generated code (string) |
648 @return generated code (string) |
647 """ |
649 """ |
648 return self.cw.getCode(indLevel, indString) |
650 return self.cw.getCode(indLevel, indString) |
649 |
651 |
650 |
652 |
651 class QRegExpWizardWindow(QMainWindow): |
653 class QRegExpWizardWindow(E5MainWindow): |
652 """ |
654 """ |
653 Main window class for the standalone dialog. |
655 Main window class for the standalone dialog. |
654 """ |
656 """ |
655 def __init__(self, parent=None): |
657 def __init__(self, parent=None): |
656 """ |
658 """ |
662 self.cw = QRegExpWizardWidget(self, fromEric=False) |
664 self.cw = QRegExpWizardWidget(self, fromEric=False) |
663 size = self.cw.size() |
665 size = self.cw.size() |
664 self.setCentralWidget(self.cw) |
666 self.setCentralWidget(self.cw) |
665 self.resize(size) |
667 self.resize(size) |
666 |
668 |
|
669 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) |
|
670 |
667 self.cw.buttonBox.accepted[()].connect(self.close) |
671 self.cw.buttonBox.accepted[()].connect(self.close) |
668 self.cw.buttonBox.rejected[()].connect(self.close) |
672 self.cw.buttonBox.rejected[()].connect(self.close) |