18 |
18 |
19 from .Ui_CodeMetricsDialog import Ui_CodeMetricsDialog |
19 from .Ui_CodeMetricsDialog import Ui_CodeMetricsDialog |
20 from . import CodeMetrics |
20 from . import CodeMetrics |
21 |
21 |
22 import Utilities |
22 import Utilities |
23 from Globals import qVersionTuple |
|
24 |
23 |
25 |
24 |
26 class CodeMetricsDialog(QDialog, Ui_CodeMetricsDialog): |
25 class CodeMetricsDialog(QDialog, Ui_CodeMetricsDialog): |
27 """ |
26 """ |
28 Class implementing a dialog to display the code metrics. |
27 Class implementing a dialog to display the code metrics. |
234 self.cancelled = True |
233 self.cancelled = True |
235 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
234 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
236 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
235 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
237 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
236 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
238 |
237 |
239 if qVersionTuple() >= (5, 0, 0): |
238 self.resultList.header().setSectionResizeMode(QHeaderView.Interactive) |
240 self.resultList.header().setSectionResizeMode( |
239 self.summaryList.header().setSectionResizeMode(QHeaderView.Interactive) |
241 QHeaderView.Interactive) |
|
242 self.summaryList.header().setSectionResizeMode( |
|
243 QHeaderView.Interactive) |
|
244 else: |
|
245 self.resultList.header().setResizeMode(QHeaderView.Interactive) |
|
246 self.summaryList.header().setResizeMode(QHeaderView.Interactive) |
|
247 |
240 |
248 def on_buttonBox_clicked(self, button): |
241 def on_buttonBox_clicked(self, button): |
249 """ |
242 """ |
250 Private slot called by a button of the button box clicked. |
243 Private slot called by a button of the button box clicked. |
251 |
244 |