src/eric7/Debugger/VariablesViewer.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
626 indentation *= indentCount 626 indentation *= indentCount
627 else: 627 else:
628 indentation = 0 628 indentation = 0
629 # Check if text is longer than available space 629 # Check if text is longer than available space
630 fontMetrics = QFontMetrics(self.treeView.font()) 630 fontMetrics = QFontMetrics(self.treeView.font())
631 try: 631 textSize = fontMetrics.horizontalAdvance(tooltip) + indentation + 5
632 textSize = fontMetrics.horizontalAdvance(tooltip) 632 # How to determine border size?
633 except AttributeError:
634 textSize = fontMetrics.width(tooltip)
635 textSize += indentation + 5 # How to determine border size?
636 header = self.treeView.header() 633 header = self.treeView.header()
637 if textSize >= header.sectionSize(column): 634 if textSize >= header.sectionSize(column):
638 return tooltip 635 return tooltip
639 else: 636 else:
640 QToolTip.hideText() 637 QToolTip.hideText()
1113 Private method to show details about a variable. 1110 Private method to show details about a variable.
1114 1111
1115 @param index reference to the variable item 1112 @param index reference to the variable item
1116 @type QModelIndex 1113 @type QModelIndex
1117 """ 1114 """
1115 from .VariableDetailDialog import VariableDetailDialog
1116
1118 node = self.proxyModel.mapToSource(index).internalPointer() 1117 node = self.proxyModel.mapToSource(index).internalPointer()
1119 1118
1120 val = node.value 1119 val = node.value
1121 vtype = node.type 1120 vtype = node.type
1122 name = node.name 1121 name = node.name
1147 nlist.insert(0, "{0}.".format(pname)) 1146 nlist.insert(0, "{0}.".format(pname))
1148 par = par.parent 1147 par = par.parent
1149 1148
1150 name = "".join(nlist) 1149 name = "".join(nlist)
1151 # now show the dialog 1150 # now show the dialog
1152 from .VariableDetailDialog import VariableDetailDialog
1153
1154 dlg = VariableDetailDialog(name, vtype, val) 1151 dlg = VariableDetailDialog(name, vtype, val)
1155 dlg.exec() 1152 dlg.exec()
1156 1153
1157 def __configure(self): 1154 def __configure(self):
1158 """ 1155 """

eric ide

mercurial