5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to generate code for a Qt5 dialog. |
7 Module implementing a dialog to generate code for a Qt5 dialog. |
8 """ |
8 """ |
9 |
9 |
|
10 import contextlib |
|
11 import json |
10 import os |
12 import os |
11 import json |
|
12 import contextlib |
|
13 |
13 |
14 from PyQt6.QtCore import ( |
14 from PyQt6.QtCore import ( |
15 pyqtSlot, |
|
16 Qt, |
|
17 QMetaObject, |
15 QMetaObject, |
|
16 QProcess, |
|
17 QProcessEnvironment, |
18 QRegularExpression, |
18 QRegularExpression, |
19 QSortFilterProxyModel, |
19 QSortFilterProxyModel, |
20 QProcess, |
20 Qt, |
21 QProcessEnvironment, |
21 pyqtSlot, |
22 ) |
22 ) |
23 from PyQt6.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor |
23 from PyQt6.QtGui import QBrush, QColor, QStandardItem, QStandardItemModel |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
25 |
25 |
26 |
26 from eric7 import Globals, Preferences |
|
27 from eric7.EricWidgets import EricMessageBox |
27 from eric7.EricWidgets.EricApplication import ericApp |
28 from eric7.EricWidgets.EricApplication import ericApp |
28 from eric7.EricWidgets import EricMessageBox |
29 from eric7.Globals import getConfig |
29 |
30 |
|
31 from .NewDialogClassDialog import NewDialogClassDialog |
30 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
32 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
31 from .NewDialogClassDialog import NewDialogClassDialog |
|
32 |
|
33 from eric7.Globals import getConfig |
|
34 |
|
35 from eric7 import Globals, Preferences |
|
36 |
|
37 |
33 |
38 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
34 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
39 pythonSignatureRole = Qt.ItemDataRole.UserRole + 2 |
35 pythonSignatureRole = Qt.ItemDataRole.UserRole + 2 |
40 rubySignatureRole = Qt.ItemDataRole.UserRole + 3 |
36 rubySignatureRole = Qt.ItemDataRole.UserRole + 3 |
41 returnTypeRole = Qt.ItemDataRole.UserRole + 4 |
37 returnTypeRole = Qt.ItemDataRole.UserRole + 4 |