Add mining screen

We want to make it easy for people to mine
This commit is contained in:
moneromooo.monero
2016-12-28 21:20:05 +00:00
parent 1cd7dd622f
commit 94e8f3ac4c
6 changed files with 233 additions and 29 deletions

View File

@@ -227,6 +227,21 @@ double WalletManager::miningHashRate() const
return m_pimpl->miningHashRate();
}
bool WalletManager::isMining() const
{
return m_pimpl->isMining();
}
bool WalletManager::startMining(const QString &address, quint32 threads)
{
return m_pimpl->startMining(address.toStdString(), threads);
}
bool WalletManager::stopMining()
{
return m_pimpl->stopMining();
}
QString WalletManager::resolveOpenAlias(const QString &address) const
{
bool dnssec_valid = false;

View File

@@ -103,6 +103,10 @@ public:
Q_INVOKABLE quint64 blockchainTargetHeight() const;
Q_INVOKABLE double miningHashRate() const;
Q_INVOKABLE bool isMining() const;
Q_INVOKABLE bool startMining(const QString &address, quint32 threads);
Q_INVOKABLE bool stopMining();
// QML missing such functionality, implementing these helpers here
Q_INVOKABLE QString urlToLocalPath(const QUrl &url) const;
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;