1 #include "addresstablemodel.h"
3 const QString AddressTableModel::Send = "S";
4 const QString AddressTableModel::Receive = "R";
6 AddressTableModel::AddressTableModel(QObject *parent) :
7 QAbstractTableModel(parent)
12 int AddressTableModel::rowCount(const QModelIndex &parent) const
17 int AddressTableModel::columnCount(const QModelIndex &parent) const
22 QVariant AddressTableModel::data(const QModelIndex &index, int role) const
27 if(role == Qt::DisplayRole)
29 /* index.row(), index.column() */
31 if(index.column() == Address)
32 return "1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN";
35 } else if (role == Qt::UserRole)
37 switch(index.row() % 2)
40 case 1: return Receive;
46 QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation, int role) const
51 Qt::ItemFlags AddressTableModel::flags(const QModelIndex &index) const
54 return Qt::ItemIsEnabled;
56 return QAbstractTableModel::flags(index);