forked from Public/monero-gui
Merge pull request #115
d95e4a3 Write support for tx notes (moneromooo.monero)
This commit is contained in:
@@ -31,6 +31,15 @@ quint64 PendingTransaction::fee() const
|
||||
return m_pimpl->fee();
|
||||
}
|
||||
|
||||
QList<QString> PendingTransaction::txid() const
|
||||
{
|
||||
QList<QString> list;
|
||||
std::vector<std::string> txid = m_pimpl->txid();
|
||||
for (const auto &t: txid)
|
||||
list.append(QString::fromStdString(t));
|
||||
return list;
|
||||
}
|
||||
|
||||
PendingTransaction::PendingTransaction(Bitmonero::PendingTransaction *pt, QObject *parent)
|
||||
: QObject(parent), m_pimpl(pt)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ class PendingTransaction : public QObject
|
||||
Q_PROPERTY(quint64 amount READ amount)
|
||||
Q_PROPERTY(quint64 dust READ dust)
|
||||
Q_PROPERTY(quint64 fee READ fee)
|
||||
Q_PROPERTY(QList<QString> txid READ txid)
|
||||
|
||||
public:
|
||||
enum Status {
|
||||
@@ -39,6 +40,7 @@ public:
|
||||
quint64 amount() const;
|
||||
quint64 dust() const;
|
||||
quint64 fee() const;
|
||||
QList<QString> txid() const;
|
||||
private:
|
||||
explicit PendingTransaction(Bitmonero::PendingTransaction * pt, QObject *parent = 0);
|
||||
|
||||
|
||||
@@ -260,6 +260,15 @@ void Wallet::setPaymentId(const QString &paymentId)
|
||||
m_paymentId = paymentId;
|
||||
}
|
||||
|
||||
bool Wallet::setUserNote(const QString &txid, const QString ¬e)
|
||||
{
|
||||
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
|
||||
}
|
||||
|
||||
QString Wallet::getUserNote(const QString &txid) const
|
||||
{
|
||||
return QString::fromStdString(m_walletImpl->getUserNote(txid.toStdString()));
|
||||
}
|
||||
|
||||
Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent)
|
||||
: QObject(parent)
|
||||
|
||||
@@ -138,6 +138,9 @@ public:
|
||||
|
||||
void setPaymentId(const QString &paymentId);
|
||||
|
||||
Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e);
|
||||
Q_INVOKABLE QString getUserNote(const QString &txid) const;
|
||||
|
||||
// TODO: setListenter() when it implemented in API
|
||||
signals:
|
||||
// emitted on every event happened with wallet
|
||||
|
||||
Reference in New Issue
Block a user