7 Module implementing a dialog to create getter and setter method names. |
7 Module implementing a dialog to create getter and setter method names. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot |
12 from PyQt5.QtCore import pyqtSlot |
13 from PyQt4.QtGui import QDialog |
13 from PyQt5.QtWidgets import QDialog |
14 |
14 |
15 from Ui_GetterSetterDialog import Ui_GetterSetterDialog |
15 from Ui_GetterSetterDialog import Ui_GetterSetterDialog |
16 |
16 |
17 |
17 |
18 class GetterSetterDialog(QDialog, Ui_GetterSetterDialog): |
18 class GetterSetterDialog(QDialog, Ui_GetterSetterDialog): |
38 self.resize(max(self.width(), msh.width()), msh.height()) |
38 self.resize(max(self.width(), msh.width()), msh.height()) |
39 |
39 |
40 @pyqtSlot(bool) |
40 @pyqtSlot(bool) |
41 def on_typeCheckBox_toggled(self, checked): |
41 def on_typeCheckBox_toggled(self, checked): |
42 """ |
42 """ |
43 Slot to react to changes of the type checkbox. |
43 Private slot to react to changes of the type checkbox. |
44 |
44 |
45 @param checked state of the checkbox (boolean) |
45 @param checked state of the checkbox (boolean) |
46 """ |
46 """ |
47 if checked: |
47 if checked: |
48 self.getterEdit.setText("get_{0}".format(self.__fieldName)) |
48 self.getterEdit.setText("get_{0}".format(self.__fieldName)) |