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, parent=None):
'''
Constructor
'''
super(SentListModel, self).__init__(parent)
self.transactions = account.transactions_sent()
return len(self.transactions)
if role == Qt.DisplayRole:
return value
return Qt.ItemIsSelectable | Qt.ItemIsEnabled