"git@git.duniter.org:Processus42/monnaie-libre-fr.git" did not exist on "66e1e5bf1cd569c1e077830d808566fb79d3f9fa"
Newer
Older
'''
Created on 5 févr. 2014
@author: inso
'''
import logging
from PyQt5.QtCore import QAbstractListModel, Qt
class SentListModel(QAbstractListModel):
'''
A Qt abstract item model to display communities in a tree
'''
def __init__(self, account, community, parent=None):
'''
Constructor
'''
super(SentListModel, self).__init__(parent)
self.account = account
self.community = community
return len(self.account.transactions_sent(self.community))
if role == Qt.DisplayRole:
transactions = self.account.transactions_sent(self.community)
value = transactions[row].get_sender_text()
return value
return Qt.ItemIsSelectable | Qt.ItemIsEnabled