18 # Start-Of-Header |
18 # Start-Of-Header |
19 name = "PySide to PyQt4 (and vice versa) Plug-in" |
19 name = "PySide to PyQt4 (and vice versa) Plug-in" |
20 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
20 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
21 autoactivate = True |
21 autoactivate = True |
22 deactivateable = True |
22 deactivateable = True |
23 version = "0.3.0" |
23 version = "0.4.0" |
24 className = "PySide2PyQtPlugin" |
24 className = "PySide2PyQtPlugin" |
25 packageName = "PySide2PyQt" |
25 packageName = "PySide2PyQt" |
26 shortDescription = "Convert PySide file to PyQt4 and vice versa" |
26 shortDescription = "Convert PySide file to PyQt4 and vice versa" |
27 longDescription = \ |
27 longDescription = \ |
28 """This plug-in implements a tool to convert a PySide file""" \ |
28 """This plug-in implements a tool to convert a PySide file""" \ |
121 """ |
121 """ |
122 if name != "Tools": |
122 if name != "Tools": |
123 return |
123 return |
124 |
124 |
125 editor = e5App().getObject("ViewManager").activeWindow() |
125 editor = e5App().getObject("ViewManager").activeWindow() |
126 if editor is None: |
|
127 return |
|
128 |
126 |
129 if not menu.isEmpty(): |
127 if not menu.isEmpty(): |
130 menu.addSeparator() |
128 menu.addSeparator() |
131 |
129 |
132 menu.addAction(self.tr("PySide to PyQt4"), self.__pyside2Pyqt) |
130 menu.addAction(self.tr("PySide to PyQt4"), self.__pyside2Pyqt)\ |
133 menu.addAction(self.tr("PyQt4 to PySide"), self.__pyqt2Pyside) |
131 .setEnabled(editor is not None) |
|
132 menu.addAction(self.tr("PyQt4 to PySide"), self.__pyqt2Pyside)\ |
|
133 .setEnabled(editor is not None) |
134 |
134 |
135 def __editorOpened(self, editor): |
135 def __editorOpened(self, editor): |
136 """ |
136 """ |
137 Private slot called, when a new editor was opened. |
137 Private slot called, when a new editor was opened. |
138 |
138 |