History: print address book description if available

This commit is contained in:
moneromooo.monero
2016-12-24 16:21:39 +00:00
parent d8f9e7360f
commit eff31f07d9
6 changed files with 43 additions and 0 deletions

View File

@@ -68,3 +68,8 @@ quint64 AddressBook::count() const
{
return m_rows.size();
}
int AddressBook::lookupPaymentID(const QString &payment_id) const
{
return m_addressBookImpl->lookupPaymentID(payment_id.toStdString());
}

View File

@@ -22,6 +22,7 @@ public:
quint64 count() const;
Q_INVOKABLE QString errorString() const;
Q_INVOKABLE int errorCode() const;
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const;
enum ErrorCode {
Status_Ok,

View File

@@ -63,6 +63,11 @@ bool AddressBookModel::deleteRow(int row)
m_addressBook->deleteRow(row);
}
int AddressBookModel::lookupPaymentID(const QString &payment_id) const
{
return m_addressBook->lookupPaymentID(payment_id);
}
QHash<int, QByteArray> AddressBookModel::roleNames() const
{
QHash<int, QByteArray> roleNames = QAbstractListModel::roleNames();

View File

@@ -24,6 +24,7 @@ public:
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool deleteRow(int row);
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const;
virtual QHash<int, QByteArray> roleNames() const override;
public slots: