Project/CreateDialogCodeDialog.py

changeset 2408
dc3a7c9d8f6e
parent 2302
f29e9405c851
child 2492
91ab554e3465
equal deleted inserted replaced
2407:b98cc8ee1142 2408:dc3a7c9d8f6e
16 from PyQt4 import uic 16 from PyQt4 import uic
17 17
18 from E5Gui.E5Application import e5App 18 from E5Gui.E5Application import e5App
19 from E5Gui import E5MessageBox 19 from E5Gui import E5MessageBox
20 20
21 from .NewDialogClassDialog import NewDialogClassDialog
22 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog 21 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog
23
24 from Utilities import ModuleParser
25 22
26 from eric5config import getConfig 23 from eric5config import getConfig
27 24
28 pyqtSignatureRole = Qt.UserRole + 1 25 pyqtSignatureRole = Qt.UserRole + 1
29 pythonSignatureRole = Qt.UserRole + 2 26 pythonSignatureRole = Qt.UserRole + 2
79 splitExt = os.path.splitext(self.srcFile) 76 splitExt = os.path.splitext(self.srcFile)
80 if len(splitExt) == 2: 77 if len(splitExt) == 2:
81 exts = [splitExt[1]] 78 exts = [splitExt[1]]
82 else: 79 else:
83 exts = None 80 exts = None
81 from Utilities import ModuleParser
84 self.__module = ModuleParser.readModule(self.srcFile, extensions=exts, 82 self.__module = ModuleParser.readModule(self.srcFile, extensions=exts,
85 caching=False) 83 caching=False)
86 except ImportError: 84 except ImportError:
87 pass 85 pass
88 86
504 Private slot called to enter the data for a new dialog class. 502 Private slot called to enter the data for a new dialog class.
505 """ 503 """
506 path, file = os.path.split(self.srcFile) 504 path, file = os.path.split(self.srcFile)
507 objName = self.__objectName() 505 objName = self.__objectName()
508 if objName: 506 if objName:
507 from .NewDialogClassDialog import NewDialogClassDialog
509 dlg = NewDialogClassDialog(objName, file, path, self) 508 dlg = NewDialogClassDialog(objName, file, path, self)
510 if dlg.exec_() == QDialog.Accepted: 509 if dlg.exec_() == QDialog.Accepted:
511 className, fileName = dlg.getData() 510 className, fileName = dlg.getData()
512 511
513 self.classNameCombo.clear() 512 self.classNameCombo.clear()

eric ide

mercurial