36 lines
998 B
C++
36 lines
998 B
C++
|
// Copyright (c) 2011-2015 The Cryptonote developers
|
||
|
// Distributed under the MIT/X11 software license, see the accompanying
|
||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||
|
|
||
|
#include <QClipboard>
|
||
|
|
||
|
#include "ReceiveFrame.h"
|
||
|
#include "WalletAdapter.h"
|
||
|
|
||
|
#include "ui_receiveframe.h"
|
||
|
|
||
|
namespace WalletGui {
|
||
|
|
||
|
ReceiveFrame::ReceiveFrame(QWidget* _parent) : QFrame(_parent), m_ui(new Ui::ReceiveFrame) {
|
||
|
m_ui->setupUi(this);
|
||
|
connect(&WalletAdapter::instance(), &WalletAdapter::updateWalletAddressSignal, this, &ReceiveFrame::updateWalletAddress);
|
||
|
connect(&WalletAdapter::instance(), &WalletAdapter::walletCloseCompletedSignal, this, &ReceiveFrame::reset);
|
||
|
}
|
||
|
|
||
|
ReceiveFrame::~ReceiveFrame() {
|
||
|
}
|
||
|
|
||
|
void ReceiveFrame::updateWalletAddress(const QString& _address) {
|
||
|
m_ui->m_addressEdit->setText(_address);
|
||
|
}
|
||
|
|
||
|
void ReceiveFrame::reset() {
|
||
|
m_ui->m_addressEdit->clear();
|
||
|
}
|
||
|
|
||
|
void ReceiveFrame::copyAddress() {
|
||
|
QApplication::clipboard()->setText(m_ui->m_addressEdit->text());
|
||
|
}
|
||
|
|
||
|
}
|