14 |
14 |
15 class UicCompilerOptionsDialog(QDialog, Ui_UicCompilerOptionsDialog): |
15 class UicCompilerOptionsDialog(QDialog, Ui_UicCompilerOptionsDialog): |
16 """ |
16 """ |
17 Class implementing a dialog to enter some non-common uic compiler options. |
17 Class implementing a dialog to enter some non-common uic compiler options. |
18 """ |
18 """ |
|
19 |
19 def __init__(self, compilerOptions, compiler, parent=None): |
20 def __init__(self, compilerOptions, compiler, parent=None): |
20 """ |
21 """ |
21 Constructor |
22 Constructor |
22 |
23 |
23 @param compilerOptions dictionary containing the uic compiler options |
24 @param compilerOptions dictionary containing the uic compiler options |
24 @type dict |
25 @type dict |
25 @param compiler name of the uic compiler executable |
26 @param compiler name of the uic compiler executable |
26 @type str |
27 @type str |
27 @param parent reference to the parent widget |
28 @param parent reference to the parent widget |
28 @type QWidget |
29 @type QWidget |
29 """ |
30 """ |
30 super().__init__(parent) |
31 super().__init__(parent) |
31 self.setupUi(self) |
32 self.setupUi(self) |
32 |
33 |
33 self.packageEdit.setText(compilerOptions["Package"]) |
34 self.packageEdit.setText(compilerOptions["Package"]) |
34 self.packageRootEdit.setText(compilerOptions["PackagesRoot"]) |
35 self.packageRootEdit.setText(compilerOptions["PackagesRoot"]) |
35 self.suffixEdit.setText(compilerOptions["RcSuffix"]) |
36 self.suffixEdit.setText(compilerOptions["RcSuffix"]) |
36 |
37 |
37 self.packageGroup.setEnabled('uic5' in compiler) |
38 self.packageGroup.setEnabled("uic5" in compiler) |
38 self.suffixGroup.setEnabled('uic6' not in compiler) |
39 self.suffixGroup.setEnabled("uic6" not in compiler) |
39 |
40 |
40 msh = self.minimumSizeHint() |
41 msh = self.minimumSizeHint() |
41 self.resize(max(self.width(), msh.width()), msh.height()) |
42 self.resize(max(self.width(), msh.width()), msh.height()) |
42 |
43 |
43 def getData(self): |
44 def getData(self): |
44 """ |
45 """ |
45 Public method to get the entered data. |
46 Public method to get the entered data. |
46 |
47 |
47 @return tuple containing the package, the rc-file suffix and the |
48 @return tuple containing the package, the rc-file suffix and the |
48 project relative root of the packages directory |
49 project relative root of the packages directory |
49 @rtype tuple of (str, str, str) |
50 @rtype tuple of (str, str, str) |
50 """ |
51 """ |
51 return ( |
52 return ( |