Wallet: moneySpent, moneyReceived, newBlock signals

pull/2/head
Ilya Kitaev 8 years ago
parent 86a6bfbff1
commit 7e769b3a87

@ -1,8 +1,10 @@
#!/bin/bash
MONERO_URL=https://github.com/monero-project/monero.git
MONERO_BRANCH=master
# MONERO_URL=https://github.com/monero-project/monero.git
# MONERO_BRANCH=master
MONERO_URL=https://github.com/mbg033/monero.git
MONERO_BRANCH=develop
# thanks to SO: http://stackoverflow.com/a/20283965/4118915
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
pushd $(pwd)

@ -25,18 +25,22 @@ public:
virtual void moneySpent(const std::string &txId, uint64_t amount)
{
// TODO
Q_UNUSED(txId)
Q_UNUSED(amount)
qDebug() << __FUNCTION__;
emit m_wallet->moneySpent(QString::fromStdString(txId), amount);
}
virtual void moneyReceived(const std::string &txId, uint64_t amount)
{
// TODO
Q_UNUSED(txId)
Q_UNUSED(amount)
qDebug() << __FUNCTION__;
emit m_wallet->moneyReceived(QString::fromStdString(txId), amount);
}
virtual void newBlock(uint64_t height)
{
qDebug() << __FUNCTION__;
emit m_wallet->newBlock(height);
}
virtual void updated()

@ -113,12 +113,18 @@ public:
// TODO: setListenter() when it implemented in API
signals:
// emitted on every event happened with wallet
// (money sent/received, new block)
void updated();
// emitted when refresh process finished (could take a long time)
// signalling only after we
void refreshed();
void moneySpent(const QString &txId, quint64 amount);
void moneyReceived(const QString &txId, quint64 amount);
void newBlock(quint64 height);
private:
Wallet(Bitmonero::Wallet *w, QObject * parent = 0);