MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / data

Method data

src/bitmessageqt/foldertree.py:198–220  ·  view source on GitHub ↗
(self, column, role)

Source from the content-addressed store, hash-verified

196 return ret
197
198 def data(self, column, role):
199 if column == 0:
200 if role == QtCore.Qt.DisplayRole:
201 if self.unreadCount > 0 and not self.isExpanded():
202 return self._getLabel() + self._getAddressBracket(True)
203 else:
204 return self._getLabel() + self._getAddressBracket(False)
205 elif role == QtCore.Qt.EditRole:
206 return self._getLabel()
207 elif role == QtCore.Qt.ToolTipRole:
208 return self._getLabel() + self._getAddressBracket(False)
209 elif role == QtCore.Qt.DecorationRole:
210 if self.address is None:
211 return avatarize(self._getLabel().encode('utf8'))
212 else:
213 return avatarize(self.address)
214 elif role == QtCore.Qt.FontRole:
215 font = QtGui.QFont()
216 font.setBold(self.unreadCount > 0)
217 return font
218 elif role == QtCore.Qt.ForegroundRole:
219 return self.accountBrush()
220 return super(Ui_AddressWidget, self).data(column, role)
221
222 def setData(self, column, role, value):
223 if role == QtCore.Qt.EditRole and self.type != AccountMixin.SUBSCRIPTION:

Callers

nothing calls this directly

Calls 6

_getLabelMethod · 0.95
_getAddressBracketMethod · 0.95
avatarizeFunction · 0.85
accountBrushMethod · 0.80
encodeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected