46 @param ui reference to the user interface object (UI.UserInterface) |
46 @param ui reference to the user interface object (UI.UserInterface) |
47 """ |
47 """ |
48 super(FileDialogWizard, self).__init__(ui) |
48 super(FileDialogWizard, self).__init__(ui) |
49 self.__ui = ui |
49 self.__ui = ui |
50 |
50 |
51 # PyQt4 or PyQt5 |
51 # PyQt5 |
52 self.__pyqtRe = re.compile(r"(?:import|from)\s+PyQt([45])") |
52 self.__pyqtRe = re.compile(r"(?:import|from)\s+PyQt([5])") |
53 |
53 |
54 def activate(self): |
54 def activate(self): |
55 """ |
55 """ |
56 Public method to activate this plugin. |
56 Public method to activate this plugin. |
57 |
57 |
122 Private method to display a dialog and get the code. |
122 Private method to display a dialog and get the code. |
123 |
123 |
124 @param editor reference to the current editor |
124 @param editor reference to the current editor |
125 @type Editor |
125 @type Editor |
126 @param variant variant of code to be generated |
126 @param variant variant of code to be generated |
127 (-1 = E5FileDialog, 0 = unknown, 4 = PyQt4, 5 = PyQt5) |
127 (-1 = E5FileDialog, 0 = unknown, 5 = PyQt5) |
128 @type int |
128 @type int |
129 @return the generated code (string) |
129 @return the generated code (string) |
130 """ |
130 """ |
131 from WizardPlugins.FileDialogWizard.FileDialogWizardDialog import ( |
131 from WizardPlugins.FileDialogWizard.FileDialogWizardDialog import ( |
132 FileDialogWizardDialog |
132 FileDialogWizardDialog |