DataViews/CodeMetricsDialog.py

changeset 5736
000ea446ff4b
parent 5597
3d88d53f8c2b
child 6048
82ad8ec9548c
equal deleted inserted replaced
5735:f606dbe20be6 5736:000ea446ff4b
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 import fnmatch 13 import fnmatch
14 14
15 from PyQt5.QtCore import pyqtSlot, Qt, QLocale, qVersion 15 from PyQt5.QtCore import pyqtSlot, Qt, QLocale
16 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMenu, QHeaderView, \ 16 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMenu, QHeaderView, \
17 QTreeWidgetItem, QApplication 17 QTreeWidgetItem, QApplication
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
23 24
24 25
25 class CodeMetricsDialog(QDialog, Ui_CodeMetricsDialog): 26 class CodeMetricsDialog(QDialog, Ui_CodeMetricsDialog):
26 """ 27 """
27 Class implementing a dialog to display the code metrics. 28 Class implementing a dialog to display the code metrics.
233 self.cancelled = True 234 self.cancelled = True
234 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 235 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
235 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) 236 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
236 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 237 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
237 238
238 if qVersion() >= "5.0.0": 239 if qVersionTuple() >= (5, 0, 0):
239 self.resultList.header().setSectionResizeMode( 240 self.resultList.header().setSectionResizeMode(
240 QHeaderView.Interactive) 241 QHeaderView.Interactive)
241 self.summaryList.header().setSectionResizeMode( 242 self.summaryList.header().setSectionResizeMode(
242 QHeaderView.Interactive) 243 QHeaderView.Interactive)
243 else: 244 else:

eric ide

mercurial