r1
This commit is contained in:
@@ -0,0 +1,299 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include "config/agrarian-config.h"
|
||||
#endif
|
||||
|
||||
#include "addressbookpage.h"
|
||||
#include "ui_addressbookpage.h"
|
||||
|
||||
#include "addresstablemodel.h"
|
||||
#include "bitcoingui.h"
|
||||
#include "csvmodelwriter.h"
|
||||
#include "editaddressdialog.h"
|
||||
#include "guiutil.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
|
||||
ui(new Ui::AddressBookPage),
|
||||
model(0),
|
||||
mode(mode),
|
||||
tab(tab)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
|
||||
ui->newAddress->setIcon(QIcon());
|
||||
ui->copyAddress->setIcon(QIcon());
|
||||
ui->deleteAddress->setIcon(QIcon());
|
||||
ui->exportButton->setIcon(QIcon());
|
||||
#endif
|
||||
|
||||
switch (mode) {
|
||||
case ForSelection:
|
||||
switch (tab) {
|
||||
case SendingTab:
|
||||
setWindowTitle(tr("Choose the address to send coins to"));
|
||||
break;
|
||||
case ReceivingTab:
|
||||
setWindowTitle(tr("Choose the address to receive coins with"));
|
||||
break;
|
||||
}
|
||||
connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept()));
|
||||
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
ui->tableView->setFocus();
|
||||
ui->closeButton->setText(tr("C&hoose"));
|
||||
ui->exportButton->hide();
|
||||
break;
|
||||
case ForEditing:
|
||||
switch (tab) {
|
||||
case SendingTab:
|
||||
setWindowTitle(tr("Sending addresses"));
|
||||
break;
|
||||
case ReceivingTab:
|
||||
setWindowTitle(tr("Receiving addresses"));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch (tab) {
|
||||
case SendingTab:
|
||||
ui->labelExplanation->setText(tr("These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins."));
|
||||
ui->deleteAddress->setVisible(true);
|
||||
break;
|
||||
case ReceivingTab:
|
||||
ui->labelExplanation->setText(tr("These are your Agrarian addresses for receiving payments. It is recommended to use a new receiving address for each transaction."));
|
||||
ui->deleteAddress->setVisible(false);
|
||||
break;
|
||||
}
|
||||
|
||||
// Context menu actions
|
||||
QAction* copyAddressAction = new QAction(tr("&Copy Address"), this);
|
||||
QAction* copyLabelAction = new QAction(tr("Copy &Label"), this);
|
||||
QAction* editAction = new QAction(tr("&Edit"), this);
|
||||
deleteAction = new QAction(ui->deleteAddress->text(), this);
|
||||
|
||||
// Build context menu
|
||||
contextMenu = new QMenu();
|
||||
contextMenu->addAction(copyAddressAction);
|
||||
contextMenu->addAction(copyLabelAction);
|
||||
contextMenu->addAction(editAction);
|
||||
if (tab == SendingTab)
|
||||
contextMenu->addAction(deleteAction);
|
||||
contextMenu->addSeparator();
|
||||
|
||||
// Connect signals for context menu actions
|
||||
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyAddress_clicked()));
|
||||
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction()));
|
||||
connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction()));
|
||||
connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteAddress_clicked()));
|
||||
|
||||
connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
|
||||
|
||||
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
}
|
||||
|
||||
AddressBookPage::~AddressBookPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AddressBookPage::setModel(AddressTableModel* model)
|
||||
{
|
||||
this->model = model;
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
proxyModel = new QSortFilterProxyModel(this);
|
||||
proxyModel->setSourceModel(model);
|
||||
proxyModel->setDynamicSortFilter(true);
|
||||
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
switch (tab) {
|
||||
case ReceivingTab:
|
||||
// Receive filter
|
||||
proxyModel->setFilterRole(AddressTableModel::TypeRole);
|
||||
proxyModel->setFilterFixedString(AddressTableModel::Receive);
|
||||
break;
|
||||
case SendingTab:
|
||||
// Send filter
|
||||
proxyModel->setFilterRole(AddressTableModel::TypeRole);
|
||||
proxyModel->setFilterFixedString(AddressTableModel::Send);
|
||||
break;
|
||||
}
|
||||
ui->tableView->setModel(proxyModel);
|
||||
ui->tableView->sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
// Set column widths
|
||||
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
|
||||
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
|
||||
|
||||
connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||
this, SLOT(selectionChanged()));
|
||||
|
||||
// Select row for newly created address
|
||||
connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(selectNewAddress(QModelIndex, int, int)));
|
||||
|
||||
selectionChanged();
|
||||
}
|
||||
|
||||
void AddressBookPage::on_copyAddress_clicked()
|
||||
{
|
||||
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address);
|
||||
}
|
||||
|
||||
void AddressBookPage::onCopyLabelAction()
|
||||
{
|
||||
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Label);
|
||||
}
|
||||
|
||||
void AddressBookPage::onEditAction()
|
||||
{
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
if (!ui->tableView->selectionModel())
|
||||
return;
|
||||
QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows();
|
||||
if (indexes.isEmpty())
|
||||
return;
|
||||
|
||||
EditAddressDialog dlg(
|
||||
tab == SendingTab ?
|
||||
EditAddressDialog::EditSendingAddress :
|
||||
EditAddressDialog::EditReceivingAddress,
|
||||
this);
|
||||
dlg.setModel(model);
|
||||
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
||||
dlg.loadRow(origIndex.row());
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void AddressBookPage::on_newAddress_clicked()
|
||||
{
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
EditAddressDialog dlg(
|
||||
tab == SendingTab ?
|
||||
EditAddressDialog::NewSendingAddress :
|
||||
EditAddressDialog::NewReceivingAddress,
|
||||
this);
|
||||
dlg.setModel(model);
|
||||
if (dlg.exec()) {
|
||||
newAddressToSelect = dlg.getAddress();
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBookPage::on_deleteAddress_clicked()
|
||||
{
|
||||
QTableView* table = ui->tableView;
|
||||
if (!table->selectionModel())
|
||||
return;
|
||||
|
||||
QModelIndexList indexes = table->selectionModel()->selectedRows();
|
||||
if (!indexes.isEmpty()) {
|
||||
table->model()->removeRow(indexes.at(0).row());
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBookPage::selectionChanged()
|
||||
{
|
||||
// Set button states based on selected tab and selection
|
||||
QTableView* table = ui->tableView;
|
||||
if (!table->selectionModel())
|
||||
return;
|
||||
|
||||
if (table->selectionModel()->hasSelection()) {
|
||||
switch (tab) {
|
||||
case SendingTab:
|
||||
// In sending tab, allow deletion of selection
|
||||
ui->deleteAddress->setEnabled(true);
|
||||
ui->deleteAddress->setVisible(true);
|
||||
deleteAction->setEnabled(true);
|
||||
break;
|
||||
case ReceivingTab:
|
||||
// Deleting receiving addresses, however, is not allowed
|
||||
ui->deleteAddress->setEnabled(false);
|
||||
ui->deleteAddress->setVisible(false);
|
||||
deleteAction->setEnabled(false);
|
||||
break;
|
||||
}
|
||||
ui->copyAddress->setEnabled(true);
|
||||
} else {
|
||||
ui->deleteAddress->setEnabled(false);
|
||||
ui->copyAddress->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBookPage::done(int retval)
|
||||
{
|
||||
QTableView* table = ui->tableView;
|
||||
if (!table->selectionModel() || !table->model())
|
||||
return;
|
||||
|
||||
// Figure out which address was selected, and return it
|
||||
QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address);
|
||||
|
||||
foreach (QModelIndex index, indexes) {
|
||||
QVariant address = table->model()->data(index);
|
||||
returnValue = address.toString();
|
||||
}
|
||||
|
||||
if (returnValue.isEmpty()) {
|
||||
// If no address entry selected, return rejected
|
||||
retval = Rejected;
|
||||
}
|
||||
|
||||
QDialog::done(retval);
|
||||
}
|
||||
|
||||
void AddressBookPage::on_exportButton_clicked()
|
||||
{
|
||||
// CSV is currently the only supported format
|
||||
QString filename = GUIUtil::getSaveFileName(this,
|
||||
tr("Export Address List"), QString(),
|
||||
tr("Comma separated file (*.csv)"), NULL);
|
||||
|
||||
if (filename.isNull())
|
||||
return;
|
||||
|
||||
CSVModelWriter writer(filename);
|
||||
|
||||
// name, column, role
|
||||
writer.setModel(proxyModel);
|
||||
writer.addColumn("Label", AddressTableModel::Label, Qt::EditRole);
|
||||
writer.addColumn("Address", AddressTableModel::Address, Qt::EditRole);
|
||||
|
||||
if (!writer.write()) {
|
||||
QMessageBox::critical(this, tr("Exporting Failed"),
|
||||
tr("There was an error trying to save the address list to %1. Please try again.").arg(filename));
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBookPage::contextualMenu(const QPoint& point)
|
||||
{
|
||||
QModelIndex index = ui->tableView->indexAt(point);
|
||||
if (index.isValid()) {
|
||||
contextMenu->exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBookPage::selectNewAddress(const QModelIndex& parent, int begin, int /*end*/)
|
||||
{
|
||||
QModelIndex idx = proxyModel->mapFromSource(model->index(begin, AddressTableModel::Address, parent));
|
||||
if (idx.isValid() && (idx.data(Qt::EditRole).toString() == newAddressToSelect)) {
|
||||
// Select row of newly created address, once
|
||||
ui->tableView->setFocus();
|
||||
ui->tableView->selectRow(idx.row());
|
||||
newAddressToSelect.clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H
|
||||
#define BITCOIN_QT_ADDRESSBOOKPAGE_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class AddressTableModel;
|
||||
class OptionsModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class AddressBookPage;
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QItemSelection;
|
||||
class QMenu;
|
||||
class QModelIndex;
|
||||
class QSortFilterProxyModel;
|
||||
class QTableView;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Widget that shows a list of sending or receiving addresses.
|
||||
*/
|
||||
class AddressBookPage : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Tabs {
|
||||
SendingTab = 0,
|
||||
ReceivingTab = 1
|
||||
};
|
||||
|
||||
enum Mode {
|
||||
ForSelection, /**< Open address book to pick address */
|
||||
ForEditing /**< Open address book for editing */
|
||||
};
|
||||
|
||||
explicit AddressBookPage(Mode mode, Tabs tab, QWidget* parent);
|
||||
~AddressBookPage();
|
||||
|
||||
void setModel(AddressTableModel* model);
|
||||
const QString& getReturnValue() const { return returnValue; }
|
||||
|
||||
public slots:
|
||||
void done(int retval);
|
||||
|
||||
private:
|
||||
Ui::AddressBookPage* ui;
|
||||
AddressTableModel* model;
|
||||
Mode mode;
|
||||
Tabs tab;
|
||||
QString returnValue;
|
||||
QSortFilterProxyModel* proxyModel;
|
||||
QMenu* contextMenu;
|
||||
QAction* deleteAction; // to be able to explicitly disable it
|
||||
QString newAddressToSelect;
|
||||
|
||||
private slots:
|
||||
/** Delete currently selected address entry */
|
||||
void on_deleteAddress_clicked();
|
||||
/** Create a new address for receiving coins and / or add a new address book entry */
|
||||
void on_newAddress_clicked();
|
||||
/** Copy address of currently selected address entry to clipboard */
|
||||
void on_copyAddress_clicked();
|
||||
/** Copy label of currently selected address entry to clipboard (no button) */
|
||||
void onCopyLabelAction();
|
||||
/** Edit currently selected address entry (no button) */
|
||||
void onEditAction();
|
||||
/** Export button clicked */
|
||||
void on_exportButton_clicked();
|
||||
|
||||
/** Set button states based on selected tab and selection */
|
||||
void selectionChanged();
|
||||
/** Spawn contextual menu (right mouse menu) for address book entry */
|
||||
void contextualMenu(const QPoint& point);
|
||||
/** New entry/entries were added to address table */
|
||||
void selectNewAddress(const QModelIndex& parent, int begin, int /*end*/);
|
||||
|
||||
signals:
|
||||
void sendCoins(QString addr);
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_ADDRESSBOOKPAGE_H
|
||||
@@ -0,0 +1,457 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2019 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "addresstablemodel.h"
|
||||
|
||||
#include "guiutil.h"
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include "base58.h"
|
||||
#include "wallet/wallet.h"
|
||||
#include "askpassphrasedialog.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFont>
|
||||
|
||||
const QString AddressTableModel::Send = "S";
|
||||
const QString AddressTableModel::Receive = "R";
|
||||
const QString AddressTableModel::Zerocoin = "X";
|
||||
|
||||
struct AddressTableEntry {
|
||||
enum Type {
|
||||
Sending,
|
||||
Receiving,
|
||||
Zerocoin,
|
||||
Hidden /* QSortFilterProxyModel will filter these out */
|
||||
};
|
||||
|
||||
Type type;
|
||||
QString label;
|
||||
QString address;
|
||||
QString pubcoin;
|
||||
|
||||
AddressTableEntry() {}
|
||||
AddressTableEntry(Type type, const QString &pubcoin): type(type), pubcoin(pubcoin) {}
|
||||
AddressTableEntry(Type type, const QString& label, const QString& address) : type(type), label(label), address(address) {}
|
||||
};
|
||||
|
||||
struct AddressTableEntryLessThan {
|
||||
bool operator()(const AddressTableEntry& a, const AddressTableEntry& b) const
|
||||
{
|
||||
return a.address < b.address;
|
||||
}
|
||||
bool operator()(const AddressTableEntry& a, const QString& b) const
|
||||
{
|
||||
return a.address < b;
|
||||
}
|
||||
bool operator()(const QString& a, const AddressTableEntry& b) const
|
||||
{
|
||||
return a < b.address;
|
||||
}
|
||||
};
|
||||
|
||||
/* Determine address type from address purpose */
|
||||
static AddressTableEntry::Type translateTransactionType(const QString& strPurpose, bool isMine)
|
||||
{
|
||||
AddressTableEntry::Type addressType = AddressTableEntry::Hidden;
|
||||
// "refund" addresses aren't shown, and change addresses aren't in mapAddressBook at all.
|
||||
if (strPurpose == "send")
|
||||
addressType = AddressTableEntry::Sending;
|
||||
else if (strPurpose == "receive")
|
||||
addressType = AddressTableEntry::Receiving;
|
||||
else if (strPurpose == "unknown" || strPurpose == "") // if purpose not set, guess
|
||||
addressType = (isMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending);
|
||||
return addressType;
|
||||
}
|
||||
|
||||
// Private implementation
|
||||
class AddressTablePriv
|
||||
{
|
||||
public:
|
||||
CWallet* wallet;
|
||||
QList<AddressTableEntry> cachedAddressTable;
|
||||
AddressTableModel* parent;
|
||||
|
||||
AddressTablePriv(CWallet* wallet, AddressTableModel* parent) : wallet(wallet), parent(parent) {}
|
||||
|
||||
void refreshAddressTable()
|
||||
{
|
||||
cachedAddressTable.clear();
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
for (const PAIRTYPE(CTxDestination, CAddressBookData) & item : wallet->mapAddressBook) {
|
||||
const CBitcoinAddress& address = item.first;
|
||||
bool fMine = IsMine(*wallet, address.Get());
|
||||
AddressTableEntry::Type addressType = translateTransactionType(
|
||||
QString::fromStdString(item.second.purpose), fMine);
|
||||
const std::string& strName = item.second.name;
|
||||
cachedAddressTable.append(AddressTableEntry(addressType,
|
||||
QString::fromStdString(strName),
|
||||
QString::fromStdString(address.ToString())));
|
||||
}
|
||||
}
|
||||
// qLowerBound() and qUpperBound() require our cachedAddressTable list to be sorted in asc order
|
||||
// Even though the map is already sorted this re-sorting step is needed because the originating map
|
||||
// is sorted by binary address, not by base58() address.
|
||||
qSort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan());
|
||||
}
|
||||
|
||||
void updateEntry(const QString& address, const QString& label, bool isMine, const QString& purpose, int status)
|
||||
{
|
||||
// Find address / label in model
|
||||
QList<AddressTableEntry>::iterator lower = qLowerBound(
|
||||
cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan());
|
||||
QList<AddressTableEntry>::iterator upper = qUpperBound(
|
||||
cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan());
|
||||
int lowerIndex = (lower - cachedAddressTable.begin());
|
||||
int upperIndex = (upper - cachedAddressTable.begin());
|
||||
bool inModel = (lower != upper);
|
||||
AddressTableEntry::Type newEntryType = translateTransactionType(purpose, isMine);
|
||||
|
||||
switch (status) {
|
||||
case CT_NEW:
|
||||
if (inModel) {
|
||||
qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_NEW, but entry is already in model";
|
||||
break;
|
||||
}
|
||||
parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex);
|
||||
cachedAddressTable.insert(lowerIndex, AddressTableEntry(newEntryType, label, address));
|
||||
parent->endInsertRows();
|
||||
break;
|
||||
case CT_UPDATED:
|
||||
if (!inModel) {
|
||||
qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_UPDATED, but entry is not in model";
|
||||
break;
|
||||
}
|
||||
lower->type = newEntryType;
|
||||
lower->label = label;
|
||||
parent->emitDataChanged(lowerIndex);
|
||||
break;
|
||||
case CT_DELETED:
|
||||
if (!inModel) {
|
||||
qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_DELETED, but entry is not in model";
|
||||
break;
|
||||
}
|
||||
parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex - 1);
|
||||
cachedAddressTable.erase(lower, upper);
|
||||
parent->endRemoveRows();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void updateEntry(const QString &pubCoin, const QString &isUsed, int status)
|
||||
{
|
||||
// Find address / label in model
|
||||
QList<AddressTableEntry>::iterator lower = qLowerBound(
|
||||
cachedAddressTable.begin(), cachedAddressTable.end(), pubCoin, AddressTableEntryLessThan());
|
||||
QList<AddressTableEntry>::iterator upper = qUpperBound(
|
||||
cachedAddressTable.begin(), cachedAddressTable.end(), pubCoin, AddressTableEntryLessThan());
|
||||
int lowerIndex = (lower - cachedAddressTable.begin());
|
||||
bool inModel = (lower != upper);
|
||||
AddressTableEntry::Type newEntryType = AddressTableEntry::Zerocoin;
|
||||
|
||||
switch(status)
|
||||
{
|
||||
case CT_NEW:
|
||||
if(inModel)
|
||||
{
|
||||
qWarning() << "AddressTablePriv_ZC::updateEntry : Warning: Got CT_NEW, but entry is already in model";
|
||||
}
|
||||
parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex);
|
||||
cachedAddressTable.insert(lowerIndex, AddressTableEntry(newEntryType, isUsed, pubCoin));
|
||||
parent->endInsertRows();
|
||||
break;
|
||||
case CT_UPDATED:
|
||||
if(!inModel)
|
||||
{
|
||||
qWarning() << "AddressTablePriv_ZC::updateEntry : Warning: Got CT_UPDATED, but entry is not in model";
|
||||
break;
|
||||
}
|
||||
lower->type = newEntryType;
|
||||
lower->label = isUsed;
|
||||
parent->emitDataChanged(lowerIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int size()
|
||||
{
|
||||
return cachedAddressTable.size();
|
||||
}
|
||||
|
||||
AddressTableEntry* index(int idx)
|
||||
{
|
||||
if (idx >= 0 && idx < cachedAddressTable.size()) {
|
||||
return &cachedAddressTable[idx];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
AddressTableModel::AddressTableModel(CWallet* wallet, WalletModel* parent) : QAbstractTableModel(parent), walletModel(parent), wallet(wallet), priv(0)
|
||||
{
|
||||
columns << tr("Label") << tr("Address");
|
||||
priv = new AddressTablePriv(wallet, this);
|
||||
priv->refreshAddressTable();
|
||||
}
|
||||
|
||||
AddressTableModel::~AddressTableModel()
|
||||
{
|
||||
delete priv;
|
||||
}
|
||||
|
||||
int AddressTableModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return priv->size();
|
||||
}
|
||||
|
||||
int AddressTableModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
QVariant AddressTableModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
AddressTableEntry* rec = static_cast<AddressTableEntry*>(index.internalPointer());
|
||||
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
switch (index.column()) {
|
||||
case Label:
|
||||
if (rec->label.isEmpty() && role == Qt::DisplayRole) {
|
||||
return tr("(no label)");
|
||||
} else {
|
||||
return rec->label;
|
||||
}
|
||||
case Address:
|
||||
return rec->address;
|
||||
}
|
||||
} else if (role == Qt::FontRole) {
|
||||
QFont font;
|
||||
if (index.column() == Address) {
|
||||
font = GUIUtil::bitcoinAddressFont();
|
||||
}
|
||||
return font;
|
||||
} else if (role == TypeRole) {
|
||||
switch (rec->type) {
|
||||
case AddressTableEntry::Sending:
|
||||
return Send;
|
||||
case AddressTableEntry::Receiving:
|
||||
return Receive;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool AddressTableModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return false;
|
||||
AddressTableEntry* rec = static_cast<AddressTableEntry*>(index.internalPointer());
|
||||
std::string strPurpose = (rec->type == AddressTableEntry::Sending ? "send" : "receive");
|
||||
editStatus = OK;
|
||||
|
||||
if (role == Qt::EditRole) {
|
||||
LOCK(wallet->cs_wallet); /* For SetAddressBook / DelAddressBook */
|
||||
CTxDestination curAddress = CBitcoinAddress(rec->address.toStdString()).Get();
|
||||
if (index.column() == Label) {
|
||||
// Do nothing, if old label == new label
|
||||
if (rec->label == value.toString()) {
|
||||
editStatus = NO_CHANGES;
|
||||
return false;
|
||||
}
|
||||
wallet->SetAddressBook(curAddress, value.toString().toStdString(), strPurpose);
|
||||
} else if (index.column() == Address) {
|
||||
CTxDestination newAddress = CBitcoinAddress(value.toString().toStdString()).Get();
|
||||
// Refuse to set invalid address, set error status and return false
|
||||
if (boost::get<CNoDestination>(&newAddress)) {
|
||||
editStatus = INVALID_ADDRESS;
|
||||
return false;
|
||||
}
|
||||
// Do nothing, if old address == new address
|
||||
else if (newAddress == curAddress) {
|
||||
editStatus = NO_CHANGES;
|
||||
return false;
|
||||
}
|
||||
// Check for duplicate addresses to prevent accidental deletion of addresses, if you try
|
||||
// to paste an existing address over another address (with a different label)
|
||||
else if (wallet->mapAddressBook.count(newAddress)) {
|
||||
editStatus = DUPLICATE_ADDRESS;
|
||||
return false;
|
||||
}
|
||||
// Double-check that we're not overwriting a receiving address
|
||||
else if (rec->type == AddressTableEntry::Sending) {
|
||||
// Remove old entry
|
||||
wallet->DelAddressBook(curAddress);
|
||||
// Add new entry with new address
|
||||
wallet->SetAddressBook(newAddress, rec->label.toStdString(), strPurpose);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (orientation == Qt::Horizontal) {
|
||||
if (role == Qt::DisplayRole && section < columns.size()) {
|
||||
return columns[section];
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Qt::ItemFlags AddressTableModel::flags(const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return 0;
|
||||
AddressTableEntry* rec = static_cast<AddressTableEntry*>(index.internalPointer());
|
||||
|
||||
Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
||||
// Can edit address and label for sending addresses,
|
||||
// and only label for receiving addresses.
|
||||
if (rec->type == AddressTableEntry::Sending ||
|
||||
(rec->type == AddressTableEntry::Receiving && index.column() == Label)) {
|
||||
retval |= Qt::ItemIsEditable;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
QModelIndex AddressTableModel::index(int row, int column, const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
AddressTableEntry* data = priv->index(row);
|
||||
if (data) {
|
||||
return createIndex(row, column, priv->index(row));
|
||||
} else {
|
||||
return QModelIndex();
|
||||
}
|
||||
}
|
||||
|
||||
void AddressTableModel::updateEntry(const QString& address,
|
||||
const QString& label,
|
||||
bool isMine,
|
||||
const QString& purpose,
|
||||
int status)
|
||||
{
|
||||
// Update address book model from Agrarian core
|
||||
priv->updateEntry(address, label, isMine, purpose, status);
|
||||
}
|
||||
|
||||
|
||||
void AddressTableModel::updateEntry(const QString &pubCoin, const QString &isUsed, int status)
|
||||
{
|
||||
// Update stealth address book model from Bitcoin core
|
||||
priv->updateEntry(pubCoin, isUsed, status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString AddressTableModel::addRow(const QString& type, const QString& label, const QString& address)
|
||||
{
|
||||
std::string strLabel = label.toStdString();
|
||||
std::string strAddress = address.toStdString();
|
||||
|
||||
editStatus = OK;
|
||||
|
||||
if (type == Send) {
|
||||
if (!walletModel->validateAddress(address)) {
|
||||
editStatus = INVALID_ADDRESS;
|
||||
return QString();
|
||||
}
|
||||
// Check for duplicate addresses
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
if (wallet->mapAddressBook.count(CBitcoinAddress(strAddress).Get())) {
|
||||
editStatus = DUPLICATE_ADDRESS;
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
} else if (type == Receive) {
|
||||
// Generate a new address to associate with given label
|
||||
CPubKey newKey;
|
||||
if (!wallet->GetKeyFromPool(newKey)) {
|
||||
WalletModel::UnlockContext ctx(walletModel->requestUnlock(AskPassphraseDialog::Context::Unlock_Full, true));
|
||||
if (!ctx.isValid()) {
|
||||
// Unlock wallet failed or was cancelled
|
||||
editStatus = WALLET_UNLOCK_FAILURE;
|
||||
return QString();
|
||||
}
|
||||
if (!wallet->GetKeyFromPool(newKey)) {
|
||||
editStatus = KEY_GENERATION_FAILURE;
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
strAddress = CBitcoinAddress(newKey.GetID()).ToString();
|
||||
} else {
|
||||
return QString();
|
||||
}
|
||||
|
||||
// Add entry
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->SetAddressBook(CBitcoinAddress(strAddress).Get(), strLabel,
|
||||
(type == Send ? "send" : "receive"));
|
||||
}
|
||||
return QString::fromStdString(strAddress);
|
||||
}
|
||||
|
||||
bool AddressTableModel::removeRows(int row, int count, const QModelIndex& parent)
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
AddressTableEntry* rec = priv->index(row);
|
||||
if (count != 1 || !rec || rec->type == AddressTableEntry::Receiving) {
|
||||
// Can only remove one row at a time, and cannot remove rows not in model.
|
||||
// Also refuse to remove receiving addresses.
|
||||
return false;
|
||||
}
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->DelAddressBook(CBitcoinAddress(rec->address.toStdString()).Get());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Look up label for address in address book, if not found return empty string.
|
||||
*/
|
||||
QString AddressTableModel::labelForAddress(const QString& address) const
|
||||
{
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
CBitcoinAddress address_parsed(address.toStdString());
|
||||
std::map<CTxDestination, CAddressBookData>::iterator mi = wallet->mapAddressBook.find(address_parsed.Get());
|
||||
if (mi != wallet->mapAddressBook.end()) {
|
||||
return QString::fromStdString(mi->second.name);
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
int AddressTableModel::lookupAddress(const QString& address) const
|
||||
{
|
||||
QModelIndexList lst = match(index(0, Address, QModelIndex()),
|
||||
Qt::EditRole, address, 1, Qt::MatchExactly);
|
||||
if (lst.isEmpty()) {
|
||||
return -1;
|
||||
} else {
|
||||
return lst.at(0).row();
|
||||
}
|
||||
}
|
||||
|
||||
void AddressTableModel::emitDataChanged(int idx)
|
||||
{
|
||||
emit dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length() - 1, QModelIndex()));
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_ADDRESSTABLEMODEL_H
|
||||
#define BITCOIN_QT_ADDRESSTABLEMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QStringList>
|
||||
|
||||
class AddressTablePriv;
|
||||
class WalletModel;
|
||||
|
||||
class CWallet;
|
||||
|
||||
/**
|
||||
Qt model of the address book in the core. This allows views to access and modify the address book.
|
||||
*/
|
||||
class AddressTableModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AddressTableModel(CWallet* wallet, WalletModel* parent = 0);
|
||||
~AddressTableModel();
|
||||
|
||||
enum ColumnIndex {
|
||||
Label = 0, /**< User specified label */
|
||||
Address = 1 /**< Bitcoin address */
|
||||
};
|
||||
|
||||
enum RoleIndex {
|
||||
TypeRole = Qt::UserRole /**< Type of address (#Send or #Receive) */
|
||||
};
|
||||
|
||||
/** Return status of edit/insert operation */
|
||||
enum EditStatus {
|
||||
OK, /**< Everything ok */
|
||||
NO_CHANGES, /**< No changes were made during edit operation */
|
||||
INVALID_ADDRESS, /**< Unparseable address */
|
||||
DUPLICATE_ADDRESS, /**< Address already in address book */
|
||||
WALLET_UNLOCK_FAILURE, /**< Wallet could not be unlocked to create new receiving address */
|
||||
KEY_GENERATION_FAILURE /**< Generating a new public key for a receiving address failed */
|
||||
};
|
||||
|
||||
static const QString Send; /**< Specifies send address */
|
||||
static const QString Receive; /**< Specifies receive address */
|
||||
static const QString Zerocoin; /**< Specifies stealth address */
|
||||
|
||||
/** @name Methods overridden from QAbstractTableModel
|
||||
@{*/
|
||||
int rowCount(const QModelIndex& parent) const;
|
||||
int columnCount(const QModelIndex& parent) const;
|
||||
QVariant data(const QModelIndex& index, int role) const;
|
||||
bool setData(const QModelIndex& index, const QVariant& value, int role);
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex& parent) const;
|
||||
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const;
|
||||
/*@}*/
|
||||
|
||||
/* Add an address to the model.
|
||||
Returns the added address on success, and an empty string otherwise.
|
||||
*/
|
||||
QString addRow(const QString& type, const QString& label, const QString& address);
|
||||
|
||||
/* Look up label for address in address book, if not found return empty string.
|
||||
*/
|
||||
QString labelForAddress(const QString& address) const;
|
||||
|
||||
/* Look up row index of an address in the model.
|
||||
Return -1 if not found.
|
||||
*/
|
||||
int lookupAddress(const QString& address) const;
|
||||
|
||||
EditStatus getEditStatus() const { return editStatus; }
|
||||
|
||||
private:
|
||||
WalletModel* walletModel;
|
||||
CWallet* wallet;
|
||||
AddressTablePriv* priv;
|
||||
QStringList columns;
|
||||
EditStatus editStatus;
|
||||
|
||||
/** Notify listeners that data changed. */
|
||||
void emitDataChanged(int index);
|
||||
|
||||
public slots:
|
||||
/* Update address list from core.
|
||||
*/
|
||||
void updateEntry(const QString& address, const QString& label, bool isMine, const QString& purpose, int status);
|
||||
void updateEntry(const QString &pubCoin, const QString &isUsed, int status);
|
||||
friend class AddressTablePriv;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_ADDRESSTABLEMODEL_H
|
||||
@@ -0,0 +1,647 @@
|
||||
// Copyright (c) 2009-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2019 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include "config/agrarian-config.h"
|
||||
#endif
|
||||
|
||||
#include "bitcoingui.h"
|
||||
|
||||
#include "clientmodel.h"
|
||||
#include "guiconstants.h"
|
||||
#include "guiutil.h"
|
||||
#include "intro.h"
|
||||
#include "net.h"
|
||||
#include "networkstyle.h"
|
||||
#include "optionsmodel.h"
|
||||
#include "splashscreen.h"
|
||||
#include "utilitydialog.h"
|
||||
#include "winshutdownmonitor.h"
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
#include "paymentserver.h"
|
||||
#include "walletmodel.h"
|
||||
#endif
|
||||
#include "masternodeconfig.h"
|
||||
|
||||
#include "init.h"
|
||||
#include "main.h"
|
||||
#include "rpc/server.h"
|
||||
#include "guiinterface.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
#include "wallet/wallet.h"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QLibraryInfo>
|
||||
#include <QLocale>
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
#include <QSettings>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
|
||||
#if defined(QT_STATICPLUGIN)
|
||||
#include <QtPlugin>
|
||||
#if QT_VERSION < 0x050400
|
||||
Q_IMPORT_PLUGIN(AccessibleFactory)
|
||||
#endif
|
||||
#if defined(QT_QPA_PLATFORM_XCB)
|
||||
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
|
||||
#elif defined(QT_QPA_PLATFORM_WINDOWS)
|
||||
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
|
||||
#elif defined(QT_QPA_PLATFORM_COCOA)
|
||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Declare meta types used for QMetaObject::invokeMethod
|
||||
Q_DECLARE_METATYPE(bool*)
|
||||
Q_DECLARE_METATYPE(CAmount)
|
||||
|
||||
static void InitMessage(const std::string& message)
|
||||
{
|
||||
LogPrintf("init message: %s\n", message);
|
||||
}
|
||||
|
||||
/*
|
||||
Translate string to current locale using Qt.
|
||||
*/
|
||||
static std::string Translate(const char* psz)
|
||||
{
|
||||
return QCoreApplication::translate("agrarian-core", psz).toStdString();
|
||||
}
|
||||
|
||||
static QString GetLangTerritory()
|
||||
{
|
||||
QSettings settings;
|
||||
// Get desired locale (e.g. "de_DE")
|
||||
// 1) System default language
|
||||
QString lang_territory = QLocale::system().name();
|
||||
// 2) Language from QSettings
|
||||
QString lang_territory_qsettings = settings.value("language", "").toString();
|
||||
if (!lang_territory_qsettings.isEmpty())
|
||||
lang_territory = lang_territory_qsettings;
|
||||
// 3) -lang command line argument
|
||||
lang_territory = QString::fromStdString(GetArg("-lang", lang_territory.toStdString()));
|
||||
return lang_territory;
|
||||
}
|
||||
|
||||
/** Set up translations */
|
||||
static void initTranslations(QTranslator& qtTranslatorBase, QTranslator& qtTranslator, QTranslator& translatorBase, QTranslator& translator)
|
||||
{
|
||||
// Remove old translators
|
||||
QApplication::removeTranslator(&qtTranslatorBase);
|
||||
QApplication::removeTranslator(&qtTranslator);
|
||||
QApplication::removeTranslator(&translatorBase);
|
||||
QApplication::removeTranslator(&translator);
|
||||
|
||||
// Get desired locale (e.g. "de_DE")
|
||||
// 1) System default language
|
||||
QString lang_territory = GetLangTerritory();
|
||||
|
||||
// Convert to "de" only by truncating "_DE"
|
||||
QString lang = lang_territory;
|
||||
lang.truncate(lang_territory.lastIndexOf('_'));
|
||||
|
||||
// Load language files for configured locale:
|
||||
// - First load the translator for the base language, without territory
|
||||
// - Then load the more specific locale translator
|
||||
|
||||
// Load e.g. qt_de.qm
|
||||
if (qtTranslatorBase.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
QApplication::installTranslator(&qtTranslatorBase);
|
||||
|
||||
// Load e.g. qt_de_DE.qm
|
||||
if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
QApplication::installTranslator(&qtTranslator);
|
||||
|
||||
// Load e.g. bitcoin_de.qm (shortcut "de" needs to be defined in agrarian.qrc)
|
||||
if (translatorBase.load(lang, ":/translations/"))
|
||||
QApplication::installTranslator(&translatorBase);
|
||||
|
||||
// Load e.g. bitcoin_de_DE.qm (shortcut "de_DE" needs to be defined in agrarian.qrc)
|
||||
if (translator.load(lang_territory, ":/translations/"))
|
||||
QApplication::installTranslator(&translator);
|
||||
}
|
||||
|
||||
/* qDebug() message handler --> debug.log */
|
||||
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
||||
{
|
||||
Q_UNUSED(context);
|
||||
const char* category = (type == QtDebugMsg) ? "qt" : NULL;
|
||||
LogPrint(category, "GUI: %s\n", msg.toStdString());
|
||||
}
|
||||
|
||||
/** Class encapsulating Agrarian Core startup and shutdown.
|
||||
* Allows running startup and shutdown in a different thread from the UI thread.
|
||||
*/
|
||||
class BitcoinCore : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BitcoinCore();
|
||||
|
||||
public slots:
|
||||
void initialize();
|
||||
void shutdown();
|
||||
void restart(QStringList args);
|
||||
|
||||
signals:
|
||||
void initializeResult(int retval);
|
||||
void shutdownResult(int retval);
|
||||
void runawayException(const QString& message);
|
||||
|
||||
private:
|
||||
/// Flag indicating a restart
|
||||
bool execute_restart;
|
||||
|
||||
/// Pass fatal exception message to UI thread
|
||||
void handleRunawayException(std::exception* e);
|
||||
};
|
||||
|
||||
/** Main Agrarian application object */
|
||||
class BitcoinApplication : public QApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BitcoinApplication(int& argc, char** argv);
|
||||
~BitcoinApplication();
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
/// Create payment server
|
||||
void createPaymentServer();
|
||||
#endif
|
||||
/// Create options model
|
||||
void createOptionsModel();
|
||||
/// Create main window
|
||||
void createWindow(const NetworkStyle* networkStyle);
|
||||
/// Create splash screen
|
||||
void createSplashScreen(const NetworkStyle* networkStyle);
|
||||
|
||||
/// Request core initialization
|
||||
void requestInitialize();
|
||||
/// Request core shutdown
|
||||
void requestShutdown();
|
||||
|
||||
/// Get process return value
|
||||
int getReturnValue() { return returnValue; }
|
||||
|
||||
/// Get window identifier of QMainWindow (BitcoinGUI)
|
||||
WId getMainWinId() const;
|
||||
|
||||
public slots:
|
||||
void initializeResult(int retval);
|
||||
void shutdownResult(int retval);
|
||||
/// Handle runaway exceptions. Shows a message box with the problem and quits the program.
|
||||
void handleRunawayException(const QString& message);
|
||||
|
||||
signals:
|
||||
void requestedInitialize();
|
||||
void requestedRestart(QStringList args);
|
||||
void requestedShutdown();
|
||||
void stopThread();
|
||||
void splashFinished(QWidget* window);
|
||||
|
||||
private:
|
||||
QThread* coreThread;
|
||||
OptionsModel* optionsModel;
|
||||
ClientModel* clientModel;
|
||||
BitcoinGUI* window;
|
||||
QTimer* pollShutdownTimer;
|
||||
#ifdef ENABLE_WALLET
|
||||
PaymentServer* paymentServer;
|
||||
WalletModel* walletModel;
|
||||
#endif
|
||||
int returnValue;
|
||||
|
||||
void startThread();
|
||||
};
|
||||
|
||||
#include "agrarian.moc"
|
||||
|
||||
BitcoinCore::BitcoinCore() : QObject()
|
||||
{
|
||||
}
|
||||
|
||||
void BitcoinCore::handleRunawayException(std::exception* e)
|
||||
{
|
||||
PrintExceptionContinue(e, "Runaway exception");
|
||||
emit runawayException(QString::fromStdString(strMiscWarning));
|
||||
}
|
||||
|
||||
void BitcoinCore::initialize()
|
||||
{
|
||||
execute_restart = true;
|
||||
|
||||
try {
|
||||
qDebug() << __func__ << ": Running AppInit2 in thread";
|
||||
int rv = AppInit2();
|
||||
emit initializeResult(rv);
|
||||
} catch (std::exception& e) {
|
||||
handleRunawayException(&e);
|
||||
} catch (...) {
|
||||
handleRunawayException(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void BitcoinCore::restart(QStringList args)
|
||||
{
|
||||
if (execute_restart) { // Only restart 1x, no matter how often a user clicks on a restart-button
|
||||
execute_restart = false;
|
||||
try {
|
||||
qDebug() << __func__ << ": Running Restart in thread";
|
||||
Interrupt();
|
||||
PrepareShutdown();
|
||||
qDebug() << __func__ << ": Shutdown finished";
|
||||
emit shutdownResult(1);
|
||||
CExplicitNetCleanup::callCleanup();
|
||||
QProcess::startDetached(QApplication::applicationFilePath(), args);
|
||||
qDebug() << __func__ << ": Restart initiated...";
|
||||
QApplication::quit();
|
||||
} catch (std::exception& e) {
|
||||
handleRunawayException(&e);
|
||||
} catch (...) {
|
||||
handleRunawayException(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BitcoinCore::shutdown()
|
||||
{
|
||||
try {
|
||||
qDebug() << __func__ << ": Running Shutdown in thread";
|
||||
Interrupt();
|
||||
Shutdown();
|
||||
qDebug() << __func__ << ": Shutdown finished";
|
||||
emit shutdownResult(1);
|
||||
} catch (std::exception& e) {
|
||||
handleRunawayException(&e);
|
||||
} catch (...) {
|
||||
handleRunawayException(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
BitcoinApplication::BitcoinApplication(int& argc, char** argv) : QApplication(argc, argv),
|
||||
coreThread(0),
|
||||
optionsModel(0),
|
||||
clientModel(0),
|
||||
window(0),
|
||||
pollShutdownTimer(0),
|
||||
#ifdef ENABLE_WALLET
|
||||
paymentServer(0),
|
||||
walletModel(0),
|
||||
#endif
|
||||
returnValue(0)
|
||||
{
|
||||
setQuitOnLastWindowClosed(false);
|
||||
}
|
||||
|
||||
BitcoinApplication::~BitcoinApplication()
|
||||
{
|
||||
if (coreThread) {
|
||||
qDebug() << __func__ << ": Stopping thread";
|
||||
emit stopThread();
|
||||
coreThread->wait();
|
||||
qDebug() << __func__ << ": Stopped thread";
|
||||
}
|
||||
|
||||
delete window;
|
||||
window = 0;
|
||||
#ifdef ENABLE_WALLET
|
||||
delete paymentServer;
|
||||
paymentServer = 0;
|
||||
#endif
|
||||
// Delete Qt-settings if user clicked on "Reset Options"
|
||||
QSettings settings;
|
||||
if (optionsModel && optionsModel->resetSettings) {
|
||||
settings.clear();
|
||||
settings.sync();
|
||||
}
|
||||
delete optionsModel;
|
||||
optionsModel = 0;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
void BitcoinApplication::createPaymentServer()
|
||||
{
|
||||
paymentServer = new PaymentServer(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
void BitcoinApplication::createOptionsModel()
|
||||
{
|
||||
optionsModel = new OptionsModel();
|
||||
}
|
||||
|
||||
void BitcoinApplication::createWindow(const NetworkStyle* networkStyle)
|
||||
{
|
||||
window = new BitcoinGUI(networkStyle, 0);
|
||||
|
||||
pollShutdownTimer = new QTimer(window);
|
||||
connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
|
||||
pollShutdownTimer->start(200);
|
||||
}
|
||||
|
||||
void BitcoinApplication::createSplashScreen(const NetworkStyle* networkStyle)
|
||||
{
|
||||
SplashScreen* splash = new SplashScreen(0, networkStyle);
|
||||
// We don't hold a direct pointer to the splash screen after creation, so use
|
||||
// Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
|
||||
splash->setAttribute(Qt::WA_DeleteOnClose);
|
||||
splash->show();
|
||||
connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
|
||||
}
|
||||
|
||||
void BitcoinApplication::startThread()
|
||||
{
|
||||
if (coreThread)
|
||||
return;
|
||||
coreThread = new QThread(this);
|
||||
BitcoinCore* executor = new BitcoinCore();
|
||||
executor->moveToThread(coreThread);
|
||||
|
||||
/* communication to and from thread */
|
||||
connect(executor, SIGNAL(initializeResult(int)), this, SLOT(initializeResult(int)));
|
||||
connect(executor, SIGNAL(shutdownResult(int)), this, SLOT(shutdownResult(int)));
|
||||
connect(executor, SIGNAL(runawayException(QString)), this, SLOT(handleRunawayException(QString)));
|
||||
connect(this, SIGNAL(requestedInitialize()), executor, SLOT(initialize()));
|
||||
connect(this, SIGNAL(requestedShutdown()), executor, SLOT(shutdown()));
|
||||
connect(window, SIGNAL(requestedRestart(QStringList)), executor, SLOT(restart(QStringList)));
|
||||
/* make sure executor object is deleted in its own thread */
|
||||
connect(this, SIGNAL(stopThread()), executor, SLOT(deleteLater()));
|
||||
connect(this, SIGNAL(stopThread()), coreThread, SLOT(quit()));
|
||||
|
||||
coreThread->start();
|
||||
}
|
||||
|
||||
void BitcoinApplication::requestInitialize()
|
||||
{
|
||||
qDebug() << __func__ << ": Requesting initialize";
|
||||
startThread();
|
||||
emit requestedInitialize();
|
||||
}
|
||||
|
||||
void BitcoinApplication::requestShutdown()
|
||||
{
|
||||
qDebug() << __func__ << ": Requesting shutdown";
|
||||
startThread();
|
||||
window->hide();
|
||||
window->setClientModel(0);
|
||||
pollShutdownTimer->stop();
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
window->removeAllWallets();
|
||||
delete walletModel;
|
||||
walletModel = 0;
|
||||
#endif
|
||||
delete clientModel;
|
||||
clientModel = 0;
|
||||
|
||||
// Show a simple window indicating shutdown status
|
||||
ShutdownWindow::showShutdownWindow(window);
|
||||
|
||||
// Request shutdown from core thread
|
||||
emit requestedShutdown();
|
||||
}
|
||||
|
||||
void BitcoinApplication::initializeResult(int retval)
|
||||
{
|
||||
qDebug() << __func__ << ": Initialization result: " << retval;
|
||||
// Set exit result: 0 if successful, 1 if failure
|
||||
returnValue = retval ? 0 : 1;
|
||||
if (retval) {
|
||||
#ifdef ENABLE_WALLET
|
||||
PaymentServer::LoadRootCAs();
|
||||
paymentServer->setOptionsModel(optionsModel);
|
||||
#endif
|
||||
|
||||
clientModel = new ClientModel(optionsModel);
|
||||
window->setClientModel(clientModel);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain) {
|
||||
walletModel = new WalletModel(pwalletMain, optionsModel);
|
||||
|
||||
window->addWallet(BitcoinGUI::DEFAULT_WALLET, walletModel);
|
||||
window->setCurrentWallet(BitcoinGUI::DEFAULT_WALLET);
|
||||
|
||||
connect(walletModel, SIGNAL(coinsSent(CWallet*, SendCoinsRecipient, QByteArray)),
|
||||
paymentServer, SLOT(fetchPaymentACK(CWallet*, const SendCoinsRecipient&, QByteArray)));
|
||||
}
|
||||
#endif
|
||||
|
||||
// If -min option passed, start window minimized.
|
||||
if (GetBoolArg("-min", false)) {
|
||||
window->showMinimized();
|
||||
} else {
|
||||
window->show();
|
||||
}
|
||||
emit splashFinished(window);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
// Now that initialization/startup is done, process any command-line
|
||||
// Agrarian: URIs or payment requests:
|
||||
connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
|
||||
window, SLOT(handlePaymentRequest(SendCoinsRecipient)));
|
||||
connect(window, SIGNAL(receivedURI(QString)),
|
||||
paymentServer, SLOT(handleURIOrFile(QString)));
|
||||
connect(paymentServer, SIGNAL(message(QString, QString, unsigned int)),
|
||||
window, SLOT(message(QString, QString, unsigned int)));
|
||||
QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
|
||||
#endif
|
||||
} else {
|
||||
quit(); // Exit main loop
|
||||
}
|
||||
}
|
||||
|
||||
void BitcoinApplication::shutdownResult(int retval)
|
||||
{
|
||||
qDebug() << __func__ << ": Shutdown result: " << retval;
|
||||
quit(); // Exit main loop after shutdown finished
|
||||
}
|
||||
|
||||
void BitcoinApplication::handleRunawayException(const QString& message)
|
||||
{
|
||||
QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Agrarian can no longer continue safely and will quit.") + QString("\n\n") + message);
|
||||
::exit(1);
|
||||
}
|
||||
|
||||
WId BitcoinApplication::getMainWinId() const
|
||||
{
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
return window->winId();
|
||||
}
|
||||
|
||||
#ifndef BITCOIN_QT_TEST
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
SetupEnvironment();
|
||||
|
||||
/// 1. Parse command-line options. These take precedence over anything else.
|
||||
// Command-line options take precedence:
|
||||
ParseParameters(argc, argv);
|
||||
|
||||
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
|
||||
|
||||
/// 2. Basic Qt initialization (not dependent on parameters or configuration)
|
||||
Q_INIT_RESOURCE(agrarian_locale);
|
||||
Q_INIT_RESOURCE(agrarian);
|
||||
|
||||
BitcoinApplication app(argc, argv);
|
||||
#if QT_VERSION > 0x050100
|
||||
// Generate high-dpi pixmaps
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
#if QT_VERSION >= 0x050600
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#endif
|
||||
|
||||
// Register meta types used for QMetaObject::invokeMethod
|
||||
qRegisterMetaType<bool*>();
|
||||
// Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
|
||||
// IMPORTANT if it is no longer a typedef use the normal variant above
|
||||
qRegisterMetaType<CAmount>("CAmount");
|
||||
|
||||
/// 3. Application identification
|
||||
// must be set before OptionsModel is initialized or translations are loaded,
|
||||
// as it is used to locate QSettings
|
||||
QApplication::setOrganizationName(QAPP_ORG_NAME);
|
||||
QApplication::setOrganizationDomain(QAPP_ORG_DOMAIN);
|
||||
QApplication::setApplicationName(QAPP_APP_NAME_DEFAULT);
|
||||
GUIUtil::SubstituteFonts(GetLangTerritory());
|
||||
|
||||
/// 4. Initialization of translations, so that intro dialog is in user's language
|
||||
// Now that QSettings are accessible, initialize translations
|
||||
QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator;
|
||||
initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);
|
||||
uiInterface.Translate.connect(Translate);
|
||||
|
||||
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
|
||||
// but before showing splash screen.
|
||||
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
||||
HelpMessageDialog help(NULL, mapArgs.count("-version"));
|
||||
help.showOrPrint();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// 5. Now that settings and translations are available, ask user for data directory
|
||||
// User language is set up: pick a data directory
|
||||
if (!Intro::pickDataDirectory())
|
||||
return 0;
|
||||
|
||||
/// 6. Determine availability of data directory and parse agrarian.conf
|
||||
/// - Do not call GetDataDir(true) before this step finishes
|
||||
if (!boost::filesystem::is_directory(GetDataDir(false))) {
|
||||
QMessageBox::critical(0, QObject::tr("Agrarian Core"),
|
||||
QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
|
||||
return 1;
|
||||
}
|
||||
try {
|
||||
ReadConfigFile(mapArgs, mapMultiArgs);
|
||||
} catch (std::exception& e) {
|
||||
QMessageBox::critical(0, QObject::tr("Agrarian Core"),
|
||||
QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// 7. Determine network (and switch to network specific options)
|
||||
// - Do not call Params() before this step
|
||||
// - Do this after parsing the configuration file, as the network can be switched there
|
||||
// - QSettings() will use the new application name after this, resulting in network-specific settings
|
||||
// - Needs to be done before createOptionsModel
|
||||
|
||||
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
|
||||
if (!SelectParamsFromCommandLine()) {
|
||||
QMessageBox::critical(0, QObject::tr("Agrarian Core"), QObject::tr("Error: Invalid combination of -regtest and -testnet."));
|
||||
return 1;
|
||||
}
|
||||
#ifdef ENABLE_WALLET
|
||||
// Parse URIs on command line -- this can affect Params()
|
||||
PaymentServer::ipcParseCommandLine(argc, argv);
|
||||
#endif
|
||||
|
||||
QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
|
||||
assert(!networkStyle.isNull());
|
||||
// Allow for separate UI settings for testnets
|
||||
QApplication::setApplicationName(networkStyle->getAppName());
|
||||
// Re-initialize translations after changing application name (language in network-specific settings can be different)
|
||||
initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
/// 7a. parse masternode.conf
|
||||
string strErr;
|
||||
if (!masternodeConfig.read(strErr)) {
|
||||
QMessageBox::critical(0, QObject::tr("Agrarian Core"),
|
||||
QObject::tr("Error reading masternode configuration file: %1").arg(strErr.c_str()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// 8. URI IPC sending
|
||||
// - Do this early as we don't want to bother initializing if we are just calling IPC
|
||||
// - Do this *after* setting up the data directory, as the data directory hash is used in the name
|
||||
// of the server.
|
||||
// - Do this after creating app and setting up translations, so errors are
|
||||
// translated properly.
|
||||
if (PaymentServer::ipcSendCommandLine())
|
||||
exit(0);
|
||||
|
||||
// Start up the payment server early, too, so impatient users that click on
|
||||
// agrarian: links repeatedly have their payment requests routed to this process:
|
||||
app.createPaymentServer();
|
||||
#endif
|
||||
|
||||
/// 9. Main GUI initialization
|
||||
// Install global event filter that makes sure that long tooltips can be word-wrapped
|
||||
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
|
||||
#if defined(Q_OS_WIN)
|
||||
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
|
||||
qApp->installNativeEventFilter(new WinShutdownMonitor());
|
||||
#endif
|
||||
// Install qDebug() message handler to route to debug.log
|
||||
qInstallMessageHandler(DebugMessageHandler);
|
||||
// Load GUI settings from QSettings
|
||||
app.createOptionsModel();
|
||||
|
||||
// Subscribe to global signals from core
|
||||
uiInterface.InitMessage.connect(InitMessage);
|
||||
|
||||
if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
|
||||
app.createSplashScreen(networkStyle.data());
|
||||
|
||||
try {
|
||||
app.createWindow(networkStyle.data());
|
||||
app.requestInitialize();
|
||||
#if defined(Q_OS_WIN)
|
||||
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Agrarian Core didn't yet exit safely..."), (HWND)app.getMainWinId());
|
||||
#endif
|
||||
app.exec();
|
||||
app.requestShutdown();
|
||||
app.exec();
|
||||
} catch (std::exception& e) {
|
||||
PrintExceptionContinue(&e, "Runaway exception");
|
||||
app.handleRunawayException(QString::fromStdString(strMiscWarning));
|
||||
} catch (...) {
|
||||
PrintExceptionContinue(NULL, "Runaway exception");
|
||||
app.handleRunawayException(QString::fromStdString(strMiscWarning));
|
||||
}
|
||||
return app.getReturnValue();
|
||||
}
|
||||
#endif // BITCOIN_QT_TEST
|
||||
@@ -0,0 +1,124 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/icons">
|
||||
<file alias="bitcoin">res/icons/bitcoin.png</file>
|
||||
<file alias="address-book">res/icons/address-book.png</file>
|
||||
<file alias="quit">res/icons/quit.png</file>
|
||||
<file alias="send">res/icons/send.png</file>
|
||||
<file alias="send_dark">res/icons/send_dark.png</file>
|
||||
<file alias="connect_0">res/icons/connect0_16.png</file>
|
||||
<file alias="connect_1">res/icons/connect1_16.png</file>
|
||||
<file alias="connect_2">res/icons/connect2_16.png</file>
|
||||
<file alias="connect_3">res/icons/connect3_16.png</file>
|
||||
<file alias="connect_4">res/icons/connect4_16.png</file>
|
||||
<file alias="transaction_0">res/icons/transaction0.png</file>
|
||||
<file alias="transaction_confirmed">res/icons/transaction2.png</file>
|
||||
<file alias="transaction_conflicted">res/icons/transaction_conflicted.png</file>
|
||||
<file alias="transaction_1">res/icons/clock1.png</file>
|
||||
<file alias="transaction_2">res/icons/clock2.png</file>
|
||||
<file alias="transaction_3">res/icons/clock3.png</file>
|
||||
<file alias="transaction_4">res/icons/clock4.png</file>
|
||||
<file alias="transaction_5">res/icons/clock5.png</file>
|
||||
<file alias="eye">res/icons/eye.png</file>
|
||||
<file alias="eye_minus">res/icons/eye_minus.png</file>
|
||||
<file alias="eye_plus">res/icons/eye_plus.png</file>
|
||||
<file alias="options">res/icons/configure.png</file>
|
||||
<file alias="receiving_addresses">res/icons/receive.png</file>
|
||||
<file alias="receiving_addresses_dark">res/icons/receive_dark.png</file>
|
||||
<file alias="privacy">res/icons/privacy.png</file>
|
||||
<file alias="editpaste">res/icons/editpaste.png</file>
|
||||
<file alias="editcopy">res/icons/editcopy.png</file>
|
||||
<file alias="add">res/icons/add.png</file>
|
||||
<file alias="bitcoin_testnet">res/icons/bitcoin_testnet.png</file>
|
||||
<file alias="bitcoin_regtest">res/icons/bitcoin_regtest.png</file>
|
||||
<file alias="edit">res/icons/edit.png</file>
|
||||
<file alias="history">res/icons/history.png</file>
|
||||
<file alias="overview">res/icons/overview.png</file>
|
||||
<file alias="masternodes">res/icons/masternodes.png</file>
|
||||
<file alias="governance">res/icons/governance.png</file>
|
||||
<file alias="governance_dark">res/icons/governance_dark.png</file>
|
||||
<file alias="export">res/icons/export.png</file>
|
||||
<file alias="synced">res/icons/synced.png</file>
|
||||
<file alias="remove">res/icons/remove.png</file>
|
||||
<file alias="tx_mined">res/icons/tx_mined.png</file>
|
||||
<file alias="tx_input">res/icons/tx_input.png</file>
|
||||
<file alias="tx_output">res/icons/tx_output.png</file>
|
||||
<file alias="tx_inout">res/icons/tx_inout.png</file>
|
||||
<file alias="unit_agrarian">res/icons/unit_agrarian.png</file>
|
||||
<file alias="unit_magrarian">res/icons/unit_magrarian.png</file>
|
||||
<file alias="unit_uagrarian">res/icons/unit_uagrarian.png</file>
|
||||
<file alias="unit_tagrarian">res/icons/unit_tagrarian.png</file>
|
||||
<file alias="unit_tmagrarian">res/icons/unit_tmagrarian.png</file>
|
||||
<file alias="unit_tuagrarian">res/icons/unit_tuagrarian.png</file>
|
||||
<file alias="lock_closed">res/icons/lock_closed.png</file>
|
||||
<file alias="lock_open">res/icons/lock_open.png</file>
|
||||
<file alias="key">res/icons/key.png</file>
|
||||
<file alias="filesave">res/icons/filesave.png</file>
|
||||
<file alias="qrcode">res/icons/qrcode.png</file>
|
||||
<file alias="debugwindow">res/icons/debugwindow.png</file>
|
||||
<file alias="browse">res/icons/browse.png</file>
|
||||
<file alias="staking_active">res/icons/staking_active.png</file>
|
||||
<file alias="staking_inactive">res/icons/staking_inactive.png</file>
|
||||
<file alias="automint_active">res/icons/automint_active.png</file>
|
||||
<file alias="explorer">res/icons/explorer.png</file>
|
||||
<file alias="automint_inactive">res/icons/automint_inactive.png</file>
|
||||
<file alias="yesvote">res/icons/yesvote.png</file>
|
||||
<file alias="novote">res/icons/novote.png</file>
|
||||
<file alias="abstainvote">res/icons/abstainvote.png</file>
|
||||
<file alias="onion">res/icons/onion.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/css">
|
||||
<file alias="default">res/css/default.css</file>
|
||||
</qresource>
|
||||
<qresource prefix="/images">
|
||||
<file alias="about">res/images/about.png</file>
|
||||
<file alias="agrarian_logo_horizontal">res/images/agrarian_logo_horizontal.png</file>
|
||||
<file alias="downArrow">res/images/downArrow_dark.png</file>
|
||||
<file alias="downArrow_small">res/images/downArrow_small_dark.png</file>
|
||||
<file alias="downArrow_small_white">res/images/downArrow_small.png</file>
|
||||
<file alias="upArrow_small">res/images/upArrow_small_dark.png</file>
|
||||
<file alias="upArrow_small_white">res/images/upArrow_small.png</file>
|
||||
<file alias="leftArrow_small">res/images/leftArrow_small_dark.png</file>
|
||||
<file alias="rightArrow_small">res/images/rightArrow_small_dark.png</file>
|
||||
<file alias="qtreeview_selected">res/images/qtreeview_selected.png</file>
|
||||
<file alias="splash">res/images/splash.png</file>
|
||||
<file alias="splash_testnet">res/images/splash_testnet.png</file>
|
||||
<file alias="splash_regtest">res/images/splash_regtest.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/movies">
|
||||
<file alias="spinner-000">res/movies/spinner-000.png</file>
|
||||
<file alias="spinner-001">res/movies/spinner-001.png</file>
|
||||
<file alias="spinner-002">res/movies/spinner-002.png</file>
|
||||
<file alias="spinner-003">res/movies/spinner-003.png</file>
|
||||
<file alias="spinner-004">res/movies/spinner-004.png</file>
|
||||
<file alias="spinner-005">res/movies/spinner-005.png</file>
|
||||
<file alias="spinner-006">res/movies/spinner-006.png</file>
|
||||
<file alias="spinner-007">res/movies/spinner-007.png</file>
|
||||
<file alias="spinner-008">res/movies/spinner-008.png</file>
|
||||
<file alias="spinner-009">res/movies/spinner-009.png</file>
|
||||
<file alias="spinner-010">res/movies/spinner-010.png</file>
|
||||
<file alias="spinner-011">res/movies/spinner-011.png</file>
|
||||
<file alias="spinner-012">res/movies/spinner-012.png</file>
|
||||
<file alias="spinner-013">res/movies/spinner-013.png</file>
|
||||
<file alias="spinner-014">res/movies/spinner-014.png</file>
|
||||
<file alias="spinner-015">res/movies/spinner-015.png</file>
|
||||
<file alias="spinner-016">res/movies/spinner-016.png</file>
|
||||
<file alias="spinner-017">res/movies/spinner-017.png</file>
|
||||
<file alias="spinner-018">res/movies/spinner-018.png</file>
|
||||
<file alias="spinner-019">res/movies/spinner-019.png</file>
|
||||
<file alias="spinner-020">res/movies/spinner-020.png</file>
|
||||
<file alias="spinner-021">res/movies/spinner-021.png</file>
|
||||
<file alias="spinner-022">res/movies/spinner-022.png</file>
|
||||
<file alias="spinner-023">res/movies/spinner-023.png</file>
|
||||
<file alias="spinner-024">res/movies/spinner-024.png</file>
|
||||
<file alias="spinner-025">res/movies/spinner-025.png</file>
|
||||
<file alias="spinner-026">res/movies/spinner-026.png</file>
|
||||
<file alias="spinner-027">res/movies/spinner-027.png</file>
|
||||
<file alias="spinner-028">res/movies/spinner-028.png</file>
|
||||
<file alias="spinner-029">res/movies/spinner-029.png</file>
|
||||
<file alias="spinner-030">res/movies/spinner-030.png</file>
|
||||
<file alias="spinner-031">res/movies/spinner-031.png</file>
|
||||
<file alias="spinner-032">res/movies/spinner-032.png</file>
|
||||
<file alias="spinner-033">res/movies/spinner-033.png</file>
|
||||
<file alias="spinner-034">res/movies/spinner-034.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/translations">
|
||||
<file alias="bg">locale/agrarian_bg.qm</file>
|
||||
<file alias="ca">locale/agrarian_ca.qm</file>
|
||||
<file alias="cs">locale/agrarian_cs.qm</file>
|
||||
<file alias="da">locale/agrarian_da.qm</file>
|
||||
<file alias="de">locale/agrarian_de.qm</file>
|
||||
<file alias="en">locale/agrarian_en.qm</file>
|
||||
<file alias="en_GB">locale/agrarian_en_GB.qm</file>
|
||||
<file alias="en_US">locale/agrarian_en_US.qm</file>
|
||||
<file alias="eo">locale/agrarian_eo.qm</file>
|
||||
<file alias="es">locale/agrarian_es.qm</file>
|
||||
<file alias="es_ES">locale/agrarian_es_ES.qm</file>
|
||||
<file alias="fi">locale/agrarian_fi.qm</file>
|
||||
<file alias="fr_FR">locale/agrarian_fr_FR.qm</file>
|
||||
<file alias="hi_IN">locale/agrarian_hi_IN.qm</file>
|
||||
<file alias="hr">locale/agrarian_hr.qm</file>
|
||||
<file alias="hr_HR">locale/agrarian_hr_HR.qm</file>
|
||||
<file alias="it">locale/agrarian_it.qm</file>
|
||||
<file alias="ja">locale/agrarian_ja.qm</file>
|
||||
<file alias="ko_KR">locale/agrarian_ko_KR.qm</file>
|
||||
<file alias="lt_LT">locale/agrarian_lt_LT.qm</file>
|
||||
<file alias="nl">locale/agrarian_nl.qm</file>
|
||||
<file alias="pl">locale/agrarian_pl.qm</file>
|
||||
<file alias="pt">locale/agrarian_pt.qm</file>
|
||||
<file alias="pt_BR">locale/agrarian_pt_BR.qm</file>
|
||||
<file alias="ro_RO">locale/agrarian_ro_RO.qm</file>
|
||||
<file alias="ru">locale/agrarian_ru.qm</file>
|
||||
<file alias="sk">locale/agrarian_sk.qm</file>
|
||||
<file alias="sv">locale/agrarian_sv.qm</file>
|
||||
<file alias="tr">locale/agrarian_tr.qm</file>
|
||||
<file alias="uk">locale/agrarian_uk.qm</file>
|
||||
<file alias="vi">locale/agrarian_vi.qm</file>
|
||||
<file alias="zh_CN">locale/agrarian_zh_CN.qm</file>
|
||||
<file alias="zh_TW">locale/agrarian_zh_TW.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,505 @@
|
||||
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
// Automatically generated by extract_strings.py
|
||||
#ifdef __GNUC__
|
||||
#define UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define UNUSED
|
||||
#endif
|
||||
static const char UNUSED *agrarian_strings[] = {
|
||||
QT_TRANSLATE_NOOP("agrarian-core", " mints deleted\n"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", " mints updated, "),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", " unconfirmed transactions removed\n"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
|
||||
"= drop tx meta data)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Allow JSON-RPC connections from specified source. Valid for <ip> are a "
|
||||
"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
|
||||
"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Bind to given address and always listen on it. Use [host]:port notation for "
|
||||
"IPv6"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Bind to given address and whitelist peers connecting to it. Use [host]:port "
|
||||
"notation for IPv6"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Bind to given address to listen for JSON-RPC connections. Use [host]:port "
|
||||
"notation for IPv6. This option can be specified multiple times (default: "
|
||||
"bind to all interfaces)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Calculated accumulator checkpoint is not what is recorded by block index"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Cannot obtain a lock on data directory %s. Agrarian Core is probably already "
|
||||
"running."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Change automatic finalized budget voting behavior. mode=auto: Vote for only "
|
||||
"exact finalized budget match to my generated budget. (string, default: auto)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Continuously rate-limit free transactions to <n>*1000 bytes per minute "
|
||||
"(default:%u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Create new files with system default permissions, instead of umask 077 (only "
|
||||
"effective with disabled wallet functionality)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Delete all wallet transactions and only recover those parts of the "
|
||||
"blockchain through -rescan on startup"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Delete all zerocoin spends and mints that have been recorded to the "
|
||||
"blockchain database and reindex them (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Disable all Agrarian specific functionality (Masternodes, Zerocoin, SwiftX, "
|
||||
"Budgeting) (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Distributed under the MIT software license, see the accompanying file "
|
||||
"COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable SwiftX, show confirmations for locked transactions (bool, default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable automatic Zerocoin minting from specific addresses (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable automatic wallet backups triggered after each zAGR minting (0-1, "
|
||||
"default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable or disable staking functionality for AGR inputs (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable or disable staking functionality for zAGR inputs (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enable spork administration functionality with the appropriate private key."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Enter regression test mode, which uses a special chain in which blocks can "
|
||||
"be solved instantly."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: Listening for incoming connections failed (listen returned error %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: The transaction is larger than the maximum allowed transaction size!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: The transaction was rejected! This might happen if some of the coins "
|
||||
"in your wallet were already spent, such as if you used a copy of wallet.dat "
|
||||
"and coins were spent in the copy but not marked as spent here."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: This transaction requires a transaction fee of at least %s because of "
|
||||
"its amount, complexity, or use of recently received funds!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: Unsupported argument -checklevel found. Checklevel must be level 4."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Error: Unsupported argument -socks found. Setting SOCKS version isn't "
|
||||
"possible anymore, only SOCKS5 proxies are supported."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Execute command when a relevant alert is received or we see a really long "
|
||||
"fork (%s in cmd is replaced by message)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Execute command when a wallet transaction changes (%s in cmd is replaced by "
|
||||
"TxID)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Execute command when the best block changes (%s in cmd is replaced by block "
|
||||
"hash)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Execute command when the best block changes and its size is over (%s in cmd "
|
||||
"is replaced by block hash, %d with the block size)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Failed to find coin set amongst held coins with less than maxNumber of Spends"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Fees (in AGR/Kb) smaller than this are considered zero fee for relaying "
|
||||
"(default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Fees (in AGR/Kb) smaller than this are considered zero fee for transaction "
|
||||
"creation (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Flush database activity from memory pool to disk log every <n> megabytes "
|
||||
"(default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"If paytxfee is not set, include enough fee so transactions begin "
|
||||
"confirmation on average within n blocks (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"In rare cases, a spend with 7 coins exceeds our maximum allowable "
|
||||
"transaction size, please retry spend using 6 or less coins"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"In this mode -genproclimit controls how many blocks are generated "
|
||||
"immediately."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Insufficient or insufficient confirmed funds, you might need to wait a few "
|
||||
"minutes and try again."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay "
|
||||
"fee of %s to prevent stuck transactions)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Keep the specified amount available for spending at all times (default: 0)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Log transaction priority and fee per kB when mining blocks (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Maintain a full transaction index, used by the getrawtransaction rpc call "
|
||||
"(default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Maximum average size of an index occurrence in the block spam filter "
|
||||
"(default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Maximum size of data in data carrier transactions we relay and mine "
|
||||
"(default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Maximum size of the list of indexes in the block spam filter (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Maximum total fees to use in a single wallet transaction, setting too low "
|
||||
"may abort large transactions (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Obfuscation uses exact denominated amounts to send funds, you might simply "
|
||||
"need to anonymize some more coins."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Output debugging information (default: %u, supplying <category> is optional)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Preferred Denomination for automatically minted Zerocoin "
|
||||
"(1/5/10/50/100/500/1000/5000), 0 for no preference. default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
|
||||
"unless -connect)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Randomize credentials for every proxy connection. This enables Tor stream "
|
||||
"isolation (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Require high priority for relaying free or low-fee transactions (default:%u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Send trace/debug info to console instead of debug.log file (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Set the number of included blocks to precompute per cycle. (minimum: %d) "
|
||||
"(maximum: %d) (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
|
||||
"leave that many cores free, default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Set the number of threads for coin generation if enabled (-1 = all cores, "
|
||||
"default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Show N confirmations for a successfully locked transaction (0-9999, default: "
|
||||
"%u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Specify custom backup path to add a copy of any automatic zAGR backup. If "
|
||||
"set as dir, every backup generates a timestamped file. If set as file, will "
|
||||
"rewrite to that file every backup. If backuppath is set as well, 4 backups "
|
||||
"will happen"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Specify custom backup path to add a copy of any wallet backup. If set as "
|
||||
"dir, every backup generates a timestamped file. If set as file, will rewrite "
|
||||
"to that file every backup."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Support filtering of blocks and transaction with bloom filters (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"SwiftX requires inputs with at least 6 confirmations, you might need to wait "
|
||||
"a few minutes and try again."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"The block database contains a block which appears to be from the future. "
|
||||
"This may be due to your computer's date and time being set incorrectly. Only "
|
||||
"rebuild the block database if you are sure that your computer's date and "
|
||||
"time are correct"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"This is a pre-release test build - use at your own risk - do not use for "
|
||||
"staking or merchant applications!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"This product includes software developed by the OpenSSL Project for use in "
|
||||
"the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
|
||||
"written by Eric Young and UPnP software written by Thomas Bernard."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Total length of network version string (%i) exceeds maximum length (%i). "
|
||||
"Reduce the number or size of uacomments."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Unable to bind to %s on this computer. Agrarian Core is probably already running."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Unable to locate enough Obfuscation denominated funds for this transaction."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Unable to locate enough Obfuscation non-denominated funds for this "
|
||||
"transaction that are not equal 10000 AGR."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Unable to locate enough funds for this transaction that are not equal 10000 "
|
||||
"AGR."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: "
|
||||
"%s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: -maxtxfee is set very high! Fees this large could be paid on a "
|
||||
"single transaction."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: -paytxfee is set very high! This is the transaction fee you will "
|
||||
"pay if you send a transaction."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: Please check that your computer's date and time are correct! If "
|
||||
"your clock is wrong Agrarian Core will not work properly."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: The network does not appear to fully agree! Some miners appear to "
|
||||
"be experiencing issues."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: We do not appear to fully agree with our peers! You may need to "
|
||||
"upgrade, or other nodes may need to upgrade."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: error reading wallet.dat! All keys read correctly, but transaction "
|
||||
"data or address book entries might be missing or incorrect."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as "
|
||||
"wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect "
|
||||
"you should restore from a backup."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Whitelist peers connecting from the given netmask or IP address. Can be "
|
||||
"specified multiple times."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"Whitelisted peers cannot be DoS banned and their transactions are always "
|
||||
"relayed, even if they are already in the mempool, useful e.g. for a gateway"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", ""
|
||||
"You must specify a masternodeprivkey in the configuration. Please see "
|
||||
"documentation for help."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "(51336 could be used only on mainnet)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "(default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "(default: 1)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "(must be 51336 for mainnet)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "<category> can be:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Accept command line and JSON-RPC commands"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Accept public REST requests (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Add a node to connect to and attempt to keep the connection open"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Adding Wrapped Serials supply..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Always query for peer addresses via DNS lookup (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Append comment to the user agent string"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Attempt to force blockchain corruption recovery"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Attempt to recover private keys from a corrupt wallet.dat"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Automatically create Tor hidden service (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Block creation options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Calculating missing accumulators..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot create public spend input"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot downgrade wallet"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot resolve -bind address: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot resolve -externalip address: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot resolve -whitebind address: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Cannot write default address"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "CoinSpend: Accumulator witness does not verify"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "CoinSpend: failed check"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Connect only to the specified node(s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Connect through SOCKS5 proxy"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Connect to a node to retrieve peer addresses, and disconnect"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Connection options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Copyright (C) 2014-%i The Dash Core Developers"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Copyright (C) 2015-%i The PIVX Core Developers"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Corrupted block database detected"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Could not parse masternode.conf"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Couldn't generate the accumulator witness"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Debugging/Testing options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Delete blockchain folders and resync from scratch"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Disable OS notifications for incoming transactions (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Disable safemode, override a real safe mode event (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Display the stake modifier calculations in the debug.log file."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Display verbose coin stake messages in the debug.log file."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Do not load the wallet and disable wallet RPC calls"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Do you want to rebuild the block database now?"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Done loading"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable automatic Zerocoin minting (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable precomputation of zAGR spends and stakes (0-1, default %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish hash block in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish hash transaction (locked via SwiftX) in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish hash transaction in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish raw block in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish raw transaction (locked via SwiftX) in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable publish raw transaction in <address>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable staking functionality (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Enable the client to act as a masternode (0-1, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error initializing block database"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error initializing wallet database environment %s!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error loading block database"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error loading wallet.dat"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error loading wallet.dat: Wallet corrupted"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error loading wallet.dat: Wallet requires newer version of Agrarian Core"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error opening block database"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error reading from database, shutting down."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error recovering public key."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error writing zerocoinDB to disk"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: A fatal internal error occured, see debug.log for details"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: A fatal internal error occurred, see debug.log for details"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: Disk space is low!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: No valid utxo!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: Unsupported argument -tor found, use -onion."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Error: Wallet locked, unable to create transaction!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to calculate accumulator checkpoint"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to create mint"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to find Zerocoins in wallet.dat"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to listen on any port. Use -listen=0 if you want this."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to parse host:port string"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to parse public spend"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to read block"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to select a zerocoin"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to wipe zerocoinDB"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Failed to write coin serial number into wallet"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Fee (in AGR/kB) to add to transactions you send (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Force safe mode (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Generate coins (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "How many blocks to check at startup (default: %u, 0 = all)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "If <category> is not supplied, output all debugging information."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Importing..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Imports blocks from external blk000??.dat file"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Include IP addresses in debug output (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Information"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Initialization sanity check failed. Agrarian Core is shutting down."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Insufficient funds"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Insufficient funds."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid -onion address or hostname: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -maxtxfee=<amount>: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount for -reservebalance=<amount>"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid amount"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid masternodeprivkey. Please see documenation."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid netmask specified in -whitelist: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid port detected in masternode.conf"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Invalid private key."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Limit size of signature cache to <n> entries (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Line: %d"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading addresses..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading block index..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading budget cache..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading masternode cache..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading masternode payment cache..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading sporks..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading wallet... (%3.2f %%)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Loading wallet..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Location of the auth cookie (default: data dir)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Lock masternodes from masternode configuration file (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Lookup(): Invalid -proxy address or hostname: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Maintain at most <n> connections to peers (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Masternode options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Mint did not make it into blockchain"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Need address because change is not exact"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Need to specify a port with -whitebind: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Node relay options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Not enough file descriptors available."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Number of automatic wallet backups (default: 10)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Number of custom location backups to retain (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Only accept block chain matching built-in checkpoints (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Password for JSON-RPC connections"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Percentage of automatically minted Zerocoin (1-100, default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Preparing for resync..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Prepend debug output with timestamp (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Print version and exit"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Pubcoin not found in mint tx"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "RPC server options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Randomly drop 1 of every <n> network messages"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Randomly fuzz 1 of every <n> network messages"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Rebuild block chain index from current blk000??.dat files"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Recalculating AGR supply..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Recalculating minted ZAGR..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Recalculating spent ZAGR..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Receive and display P2P network alerts (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Reindex the AGR and zAGR money supply statistics"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Reindex the accumulator database"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Reindexing zerocoin database..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Reindexing zerocoin failed"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Relay and mine data carrier transactions (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Relay non-P2SH multisig (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Rescan the block chain for missing wallet transactions"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Rescanning..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "ResetMintZerocoin finished: "),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "ResetSpentZerocoin finished: "),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Run a thread to flush wallet periodically (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Run in the background as a daemon and accept commands"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Selected coins value is less than payment target"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Send transactions as zero-fee transactions if possible (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Session timed out."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set external address:port to get to this masternode (example: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set key pool size to <n> (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set maximum block size in bytes (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set minimum block size in bytes (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set the Maximum reorg depth (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set the masternode private key"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Set the number of threads to service RPC calls (default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Show all debugging options (usage: --help -help-debug)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Signing failed."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Signing timed out."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Signing transaction failed"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify configuration file (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify data directory"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify masternode configuration file (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify pid file (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify wallet file (within data directory)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Specify your own public address"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Spend Valid"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Spend unconfirmed change when sending transactions (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Staking options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Stop running after importing blocks from disk (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Support the zerocoin light node protocol (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "SwiftX options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronization failed"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronization finished"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronization pending..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronizing budgets..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronizing masternode winners..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronizing masternodes..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Synchronizing sporks..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Syncing zAGR wallet..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "The coin spend has been used"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "The transaction did not verify"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "This help message"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "This is experimental software."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "This is intended for regression testing tools and app development."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Too many spends needed"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Tor control port password (default: empty)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Tor control port to use if onion listening enabled (default: %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction Created"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction Mint Started"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction amount too small"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction amounts must be positive"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction too large for fee policy"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Transaction too large"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Trying to spend an already spent serial #, try again."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unable to bind to %s on this computer (bind returned error %s)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unable to find transaction containing mint %s"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unable to find transaction containing mint, txHash: %s"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unable to sign spork message, wrong key?"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unable to start HTTP server. See debug log for details."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Unknown network specified in -onlynet: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Upgrade wallet to latest format"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Use UPnP to map the listening port (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Use UPnP to map the listening port (default: 1 when listening)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Use a custom max chain reorganization depth (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Use block spam filter (default: %u)"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Use the test network"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "User Agent comment (%s) contains unsafe characters."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Username for JSON-RPC connections"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Value is below the smallest available denomination (= 1) of zAGR"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Verifying blocks..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Verifying wallet..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Wallet %s resides outside data directory %s"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Wallet needed to be rewritten: restart Agrarian Core to complete"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Wallet options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Wallet window title"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Warning"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Warning: This version is obsolete, upgrade required!"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Warning: Unsupported argument -benchmark ignored, use -debug=bench."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Warning: Unsupported argument -debugnet ignored, use -debug=net."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "You don't have enough Zerocoins in your wallet"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "You need to rebuild the database using -reindex to change -txindex"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Zapping all transactions from wallet..."),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "ZeroMQ notification options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "Zerocoin options:"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "could not get lock on cs_spendcache"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "isValid(): Invalid -proxy address or hostname: '%s'"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "on startup"),
|
||||
QT_TRANSLATE_NOOP("agrarian-core", "wallet.dat corrupt, salvage failed"),
|
||||
};
|
||||
@@ -0,0 +1,253 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "askpassphrasedialog.h"
|
||||
#include "ui_askpassphrasedialog.h"
|
||||
|
||||
#include "guiconstants.h"
|
||||
#include "guiutil.h"
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include "allocators.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
|
||||
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget* parent, WalletModel* model, Context context) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
|
||||
ui(new Ui::AskPassphraseDialog),
|
||||
mode(mode),
|
||||
model(model),
|
||||
context(context),
|
||||
fCapsLock(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setStyleSheet(GUIUtil::loadStyleSheet());
|
||||
|
||||
ui->passEdit1->setMinimumSize(ui->passEdit1->sizeHint());
|
||||
ui->passEdit2->setMinimumSize(ui->passEdit2->sizeHint());
|
||||
ui->passEdit3->setMinimumSize(ui->passEdit3->sizeHint());
|
||||
|
||||
ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE);
|
||||
ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE);
|
||||
ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE);
|
||||
|
||||
// Setup Caps Lock detection.
|
||||
ui->passEdit1->installEventFilter(this);
|
||||
ui->passEdit2->installEventFilter(this);
|
||||
ui->passEdit3->installEventFilter(this);
|
||||
|
||||
this->model = model;
|
||||
|
||||
switch (mode) {
|
||||
case Mode::Encrypt: // Ask passphrase x2
|
||||
ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
|
||||
ui->passLabel1->hide();
|
||||
ui->passEdit1->hide();
|
||||
setWindowTitle(tr("Encrypt wallet"));
|
||||
break;
|
||||
case Mode::UnlockAnonymize:
|
||||
ui->anonymizationCheckBox->show();
|
||||
case Mode::Unlock: // Ask passphrase
|
||||
ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet."));
|
||||
ui->passLabel2->hide();
|
||||
ui->passEdit2->hide();
|
||||
ui->passLabel3->hide();
|
||||
ui->passEdit3->hide();
|
||||
setWindowTitle(tr("Unlock wallet"));
|
||||
break;
|
||||
case Mode::Decrypt: // Ask passphrase
|
||||
ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet."));
|
||||
ui->passLabel2->hide();
|
||||
ui->passEdit2->hide();
|
||||
ui->passLabel3->hide();
|
||||
ui->passEdit3->hide();
|
||||
setWindowTitle(tr("Decrypt wallet"));
|
||||
break;
|
||||
case Mode::ChangePass: // Ask old passphrase + new passphrase x2
|
||||
setWindowTitle(tr("Change passphrase"));
|
||||
ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet."));
|
||||
break;
|
||||
}
|
||||
|
||||
// Set checkbox "For anonymization, automint, and staking only" depending on from where we were called
|
||||
if (context == Context::Unlock_Menu || context == Context::Mint_zAGR || context == Context::BIP_38 || context == Context::UI_Vote) {
|
||||
ui->anonymizationCheckBox->setChecked(true);
|
||||
}
|
||||
else {
|
||||
ui->anonymizationCheckBox->setChecked(false);
|
||||
}
|
||||
|
||||
// It doesn't make sense to show the checkbox for sending AGR because you wouldn't check it anyway.
|
||||
if (context == Context::Send_AGR || context == Context::Send_zAGR) {
|
||||
ui->anonymizationCheckBox->hide();
|
||||
}
|
||||
|
||||
textChanged();
|
||||
connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
|
||||
connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
|
||||
connect(ui->passEdit3, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
|
||||
}
|
||||
|
||||
AskPassphraseDialog::~AskPassphraseDialog()
|
||||
{
|
||||
// Attempt to overwrite text so that they do not linger around in memory
|
||||
ui->passEdit1->setText(QString(" ").repeated(ui->passEdit1->text().size()));
|
||||
ui->passEdit2->setText(QString(" ").repeated(ui->passEdit2->text().size()));
|
||||
ui->passEdit3->setText(QString(" ").repeated(ui->passEdit3->text().size()));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AskPassphraseDialog::accept()
|
||||
{
|
||||
SecureString oldpass, newpass1, newpass2;
|
||||
if (!model)
|
||||
return;
|
||||
oldpass.reserve(MAX_PASSPHRASE_SIZE);
|
||||
newpass1.reserve(MAX_PASSPHRASE_SIZE);
|
||||
newpass2.reserve(MAX_PASSPHRASE_SIZE);
|
||||
// TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string)
|
||||
// Alternately, find a way to make this input mlock()'d to begin with.
|
||||
oldpass.assign(ui->passEdit1->text().toStdString().c_str());
|
||||
newpass1.assign(ui->passEdit2->text().toStdString().c_str());
|
||||
newpass2.assign(ui->passEdit3->text().toStdString().c_str());
|
||||
|
||||
switch (mode) {
|
||||
case Mode::Encrypt: {
|
||||
if (newpass1.empty() || newpass2.empty()) {
|
||||
// Cannot encrypt with empty passphrase
|
||||
break;
|
||||
}
|
||||
QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"),
|
||||
tr("Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR AGR</b>!") + "<br><br>" + tr("Are you sure you wish to encrypt your wallet?"),
|
||||
QMessageBox::Yes | QMessageBox::Cancel,
|
||||
QMessageBox::Cancel);
|
||||
if (retval == QMessageBox::Yes) {
|
||||
if (newpass1 == newpass2) {
|
||||
if (model->setWalletEncrypted(true, newpass1)) {
|
||||
QMessageBox::warning(this, tr("Wallet encrypted"),
|
||||
"<qt>" +
|
||||
tr("Agrarian will close now to finish the encryption process. "
|
||||
"Remember that encrypting your wallet cannot fully protect "
|
||||
"your AGRs from being stolen by malware infecting your computer.") +
|
||||
"<br><br><b>" +
|
||||
tr("IMPORTANT: Any previous backups you have made of your wallet file "
|
||||
"should be replaced with the newly generated, encrypted wallet file. "
|
||||
"For security reasons, previous backups of the unencrypted wallet file "
|
||||
"will become useless as soon as you start using the new, encrypted wallet.") +
|
||||
"</b></qt>");
|
||||
QApplication::quit();
|
||||
} else {
|
||||
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
||||
tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted."));
|
||||
}
|
||||
QDialog::accept(); // Success
|
||||
} else {
|
||||
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
||||
tr("The supplied passphrases do not match."));
|
||||
}
|
||||
} else {
|
||||
QDialog::reject(); // Cancelled
|
||||
}
|
||||
} break;
|
||||
case Mode::UnlockAnonymize:
|
||||
case Mode::Unlock:
|
||||
if (!model->setWalletLocked(false, oldpass, ui->anonymizationCheckBox->isChecked())) {
|
||||
QMessageBox::critical(this, tr("Wallet unlock failed"),
|
||||
tr("The passphrase entered for the wallet decryption was incorrect."));
|
||||
} else {
|
||||
QDialog::accept(); // Success
|
||||
}
|
||||
break;
|
||||
case Mode::Decrypt:
|
||||
if (!model->setWalletEncrypted(false, oldpass)) {
|
||||
QMessageBox::critical(this, tr("Wallet decryption failed"),
|
||||
tr("The passphrase entered for the wallet decryption was incorrect."));
|
||||
} else {
|
||||
QDialog::accept(); // Success
|
||||
}
|
||||
break;
|
||||
case Mode::ChangePass:
|
||||
if (newpass1 == newpass2) {
|
||||
if (model->changePassphrase(oldpass, newpass1)) {
|
||||
QMessageBox::information(this, tr("Wallet encrypted"),
|
||||
tr("Wallet passphrase was successfully changed."));
|
||||
QDialog::accept(); // Success
|
||||
} else {
|
||||
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
||||
tr("The passphrase entered for the wallet decryption was incorrect."));
|
||||
}
|
||||
} else {
|
||||
QMessageBox::critical(this, tr("Wallet encryption failed"),
|
||||
tr("The supplied passphrases do not match."));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void AskPassphraseDialog::textChanged()
|
||||
{
|
||||
// Validate input, set Ok button to enabled when acceptable
|
||||
bool acceptable = false;
|
||||
switch (mode) {
|
||||
case Mode::Encrypt: // New passphrase x2
|
||||
acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
|
||||
break;
|
||||
case Mode::UnlockAnonymize: // Old passphrase x1
|
||||
case Mode::Unlock: // Old passphrase x1
|
||||
case Mode::Decrypt:
|
||||
acceptable = !ui->passEdit1->text().isEmpty();
|
||||
break;
|
||||
case Mode::ChangePass: // Old passphrase x1, new passphrase x2
|
||||
acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty();
|
||||
break;
|
||||
}
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(acceptable);
|
||||
}
|
||||
|
||||
bool AskPassphraseDialog::event(QEvent* event)
|
||||
{
|
||||
// Detect Caps Lock key press.
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
||||
if (ke->key() == Qt::Key_CapsLock) {
|
||||
fCapsLock = !fCapsLock;
|
||||
}
|
||||
if (fCapsLock) {
|
||||
ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!"));
|
||||
} else {
|
||||
ui->capsLabel->clear();
|
||||
}
|
||||
}
|
||||
return QWidget::event(event);
|
||||
}
|
||||
|
||||
bool AskPassphraseDialog::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
/* Detect Caps Lock.
|
||||
* There is no good OS-independent way to check a key state in Qt, but we
|
||||
* can detect Caps Lock by checking for the following condition:
|
||||
* Shift key is down and the result is a lower case character, or
|
||||
* Shift key is not down and the result is an upper case character.
|
||||
*/
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
||||
QString str = ke->text();
|
||||
if (str.length() != 0) {
|
||||
const QChar* psz = str.unicode();
|
||||
bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0;
|
||||
if ((fShift && *psz >= 'a' && *psz <= 'z') || (!fShift && *psz >= 'A' && *psz <= 'Z')) {
|
||||
fCapsLock = true;
|
||||
ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!"));
|
||||
} else if (psz->isLetter()) {
|
||||
fCapsLock = false;
|
||||
ui->capsLabel->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
return QDialog::eventFilter(object, event);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_ASKPASSPHRASEDIALOG_H
|
||||
#define BITCOIN_QT_ASKPASSPHRASEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class WalletModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class AskPassphraseDialog;
|
||||
}
|
||||
|
||||
/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase.
|
||||
*/
|
||||
class AskPassphraseDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class Mode {
|
||||
Encrypt, /**< Ask passphrase twice and encrypt */
|
||||
UnlockAnonymize, /**< Ask passphrase and unlock only for anonymization */
|
||||
Unlock, /**< Ask passphrase and unlock */
|
||||
ChangePass, /**< Ask old passphrase + new passphrase twice */
|
||||
Decrypt /**< Ask passphrase and decrypt wallet */
|
||||
};
|
||||
|
||||
// Context from where / for what the passphrase dialog was called to set the status of the checkbox
|
||||
// Partly redundant to Mode above, but offers more flexibility for future enhancements
|
||||
enum class Context {
|
||||
Unlock_Menu, /** Unlock wallet from menu */
|
||||
Unlock_Full, /** Wallet needs to be fully unlocked */
|
||||
Encrypt, /** Encrypt unencrypted wallet */
|
||||
ToggleLock, /** Toggle wallet lock state */
|
||||
ChangePass, /** Change passphrase */
|
||||
Send_AGR, /** Send AGR */
|
||||
Send_zAGR, /** Send zAGR */
|
||||
Mint_zAGR, /** Mint zAGR */
|
||||
BIP_38, /** BIP38 menu */
|
||||
Multi_Sig, /** Multi-Signature dialog */
|
||||
Sign_Message, /** Sign/verify message dialog */
|
||||
UI_Vote, /** Governance Tab UI Voting */
|
||||
};
|
||||
|
||||
explicit AskPassphraseDialog(Mode mode, QWidget* parent, WalletModel* model, Context context);
|
||||
~AskPassphraseDialog();
|
||||
|
||||
void accept();
|
||||
|
||||
private:
|
||||
Ui::AskPassphraseDialog* ui;
|
||||
Mode mode;
|
||||
WalletModel* model;
|
||||
Context context;
|
||||
bool fCapsLock;
|
||||
|
||||
private slots:
|
||||
void textChanged();
|
||||
|
||||
protected:
|
||||
bool event(QEvent* event);
|
||||
bool eventFilter(QObject* object, QEvent* event);
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_ASKPASSPHRASEDIALOG_H
|
||||
@@ -0,0 +1,185 @@
|
||||
// Copyright (c) 2011-2015 The Bitcoin Core developers
|
||||
// Copyright (c) 2018 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "bantablemodel.h"
|
||||
|
||||
#include "clientmodel.h"
|
||||
#include "guiconstants.h"
|
||||
#include "guiutil.h"
|
||||
|
||||
#include "sync.h"
|
||||
#include "utiltime.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
||||
bool BannedNodeLessThan::operator()(const CCombinedBan& left, const CCombinedBan& right) const
|
||||
{
|
||||
const CCombinedBan* pLeft = &left;
|
||||
const CCombinedBan* pRight = &right;
|
||||
|
||||
if (order == Qt::DescendingOrder)
|
||||
std::swap(pLeft, pRight);
|
||||
|
||||
switch(column)
|
||||
{
|
||||
case BanTableModel::Address:
|
||||
return pLeft->subnet.ToString().compare(pRight->subnet.ToString()) < 0;
|
||||
case BanTableModel::Bantime:
|
||||
return pLeft->banEntry.nBanUntil < pRight->banEntry.nBanUntil;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// private implementation
|
||||
class BanTablePriv
|
||||
{
|
||||
public:
|
||||
/** Local cache of peer information */
|
||||
QList<CCombinedBan> cachedBanlist;
|
||||
/** Column to sort nodes by */
|
||||
int sortColumn;
|
||||
/** Order (ascending or descending) to sort nodes by */
|
||||
Qt::SortOrder sortOrder;
|
||||
|
||||
/** Pull a full list of banned nodes from CNode into our cache */
|
||||
void refreshBanlist()
|
||||
{
|
||||
banmap_t banMap;
|
||||
CNode::GetBanned(banMap);
|
||||
|
||||
cachedBanlist.clear();
|
||||
cachedBanlist.reserve(banMap.size());
|
||||
for (banmap_t::iterator it = banMap.begin(); it != banMap.end(); it++)
|
||||
{
|
||||
CCombinedBan banEntry;
|
||||
banEntry.subnet = (*it).first;
|
||||
banEntry.banEntry = (*it).second;
|
||||
cachedBanlist.append(banEntry);
|
||||
}
|
||||
|
||||
if (sortColumn >= 0)
|
||||
// sort cachedBanlist (use stable sort to prevent rows jumping around unneceesarily)
|
||||
qStableSort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder));
|
||||
}
|
||||
|
||||
int size() const
|
||||
{
|
||||
return cachedBanlist.size();
|
||||
}
|
||||
|
||||
CCombinedBan *index(int idx)
|
||||
{
|
||||
if (idx >= 0 && idx < cachedBanlist.size())
|
||||
return &cachedBanlist[idx];
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
BanTableModel::BanTableModel(ClientModel *parent) :
|
||||
QAbstractTableModel(parent),
|
||||
clientModel(parent)
|
||||
{
|
||||
columns << tr("IP/Netmask") << tr("Banned Until");
|
||||
priv.reset(new BanTablePriv());
|
||||
// default to unsorted
|
||||
priv->sortColumn = -1;
|
||||
|
||||
// load initial data
|
||||
refresh();
|
||||
}
|
||||
|
||||
BanTableModel::~BanTableModel()
|
||||
{
|
||||
// Intentionally left empty
|
||||
}
|
||||
|
||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return priv->size();
|
||||
}
|
||||
|
||||
int BanTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
QVariant BanTableModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if(!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
CCombinedBan *rec = static_cast<CCombinedBan*>(index.internalPointer());
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
switch(index.column())
|
||||
{
|
||||
case Address:
|
||||
return QString::fromStdString(rec->subnet.ToString());
|
||||
case Bantime:
|
||||
QDateTime date = QDateTime::fromMSecsSinceEpoch(0);
|
||||
date = date.addSecs(rec->banEntry.nBanUntil);
|
||||
return date.toString(Qt::SystemLocaleLongDate);
|
||||
}
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant BanTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if(orientation == Qt::Horizontal)
|
||||
{
|
||||
if(role == Qt::DisplayRole && section < columns.size())
|
||||
{
|
||||
return columns[section];
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Qt::ItemFlags BanTableModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if(!index.isValid())
|
||||
return 0;
|
||||
|
||||
Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
||||
return retval;
|
||||
}
|
||||
|
||||
QModelIndex BanTableModel::index(int row, int column, const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
CCombinedBan *data = priv->index(row);
|
||||
|
||||
if (data)
|
||||
return createIndex(row, column, data);
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
void BanTableModel::refresh()
|
||||
{
|
||||
Q_EMIT layoutAboutToBeChanged();
|
||||
priv->refreshBanlist();
|
||||
Q_EMIT layoutChanged();
|
||||
}
|
||||
|
||||
void BanTableModel::sort(int column, Qt::SortOrder order)
|
||||
{
|
||||
priv->sortColumn = column;
|
||||
priv->sortOrder = order;
|
||||
refresh();
|
||||
}
|
||||
|
||||
bool BanTableModel::shouldShow()
|
||||
{
|
||||
if (priv->size() > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin Core developers
|
||||
// Copyright (c) 2018 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BANTABLEMODEL_H
|
||||
#define BITCOIN_QT_BANTABLEMODEL_H
|
||||
|
||||
#include "net.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QStringList>
|
||||
|
||||
class ClientModel;
|
||||
class BanTablePriv;
|
||||
|
||||
struct CCombinedBan {
|
||||
CSubNet subnet;
|
||||
CBanEntry banEntry;
|
||||
};
|
||||
|
||||
class BannedNodeLessThan
|
||||
{
|
||||
public:
|
||||
BannedNodeLessThan(int nColumn, Qt::SortOrder fOrder) :
|
||||
column(nColumn), order(fOrder) {}
|
||||
bool operator()(const CCombinedBan& left, const CCombinedBan& right) const;
|
||||
|
||||
private:
|
||||
int column;
|
||||
Qt::SortOrder order;
|
||||
};
|
||||
|
||||
/**
|
||||
Qt model providing information about connected peers, similar to the
|
||||
"getpeerinfo" RPC call. Used by the rpc console UI.
|
||||
*/
|
||||
class BanTableModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BanTableModel(ClientModel *parent = 0);
|
||||
~BanTableModel();
|
||||
void startAutoRefresh();
|
||||
void stopAutoRefresh();
|
||||
|
||||
enum ColumnIndex {
|
||||
Address = 0,
|
||||
Bantime = 1
|
||||
};
|
||||
|
||||
/** @name Methods overridden from QAbstractTableModel
|
||||
@{*/
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
void sort(int column, Qt::SortOrder order);
|
||||
bool shouldShow();
|
||||
/*@}*/
|
||||
|
||||
public Q_SLOTS:
|
||||
void refresh();
|
||||
|
||||
private:
|
||||
ClientModel *clientModel;
|
||||
QStringList columns;
|
||||
std::unique_ptr<BanTablePriv> priv;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_BANTABLEMODEL_H
|
||||
@@ -0,0 +1,276 @@
|
||||
// Copyright (c) 2017-2019 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "bip38tooldialog.h"
|
||||
#include "ui_bip38tooldialog.h"
|
||||
|
||||
#include "addressbookpage.h"
|
||||
#include "guiutil.h"
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include "base58.h"
|
||||
#include "bip38.h"
|
||||
#include "init.h"
|
||||
#include "wallet/wallet.h"
|
||||
#include "askpassphrasedialog.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <QClipboard>
|
||||
|
||||
Bip38ToolDialog::Bip38ToolDialog(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
|
||||
ui(new Ui::Bip38ToolDialog),
|
||||
model(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->decryptedKeyOut_DEC->setPlaceholderText(tr("Click \"Decrypt Key\" to compute key"));
|
||||
|
||||
GUIUtil::setupAddressWidget(ui->addressIn_ENC, this);
|
||||
ui->addressIn_ENC->installEventFilter(this);
|
||||
ui->passphraseIn_ENC->installEventFilter(this);
|
||||
ui->encryptedKeyOut_ENC->installEventFilter(this);
|
||||
ui->encryptedKeyIn_DEC->installEventFilter(this);
|
||||
ui->passphraseIn_DEC->installEventFilter(this);
|
||||
ui->decryptedKeyOut_DEC->installEventFilter(this);
|
||||
}
|
||||
|
||||
Bip38ToolDialog::~Bip38ToolDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::setModel(WalletModel* model)
|
||||
{
|
||||
this->model = model;
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::setAddress_ENC(const QString& address)
|
||||
{
|
||||
ui->addressIn_ENC->setText(address);
|
||||
ui->passphraseIn_ENC->setFocus();
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::setAddress_DEC(const QString& address)
|
||||
{
|
||||
ui->encryptedKeyIn_DEC->setText(address);
|
||||
ui->passphraseIn_DEC->setFocus();
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::showTab_ENC(bool fShow)
|
||||
{
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
if (fShow)
|
||||
this->show();
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::showTab_DEC(bool fShow)
|
||||
{
|
||||
ui->tabWidget->setCurrentIndex(1);
|
||||
if (fShow)
|
||||
this->show();
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_addressBookButton_ENC_clicked()
|
||||
{
|
||||
if (model && model->getAddressTableModel()) {
|
||||
AddressBookPage dlg(AddressBookPage::ForSelection, AddressBookPage::ReceivingTab, this);
|
||||
dlg.setModel(model->getAddressTableModel());
|
||||
if (dlg.exec()) {
|
||||
setAddress_ENC(dlg.getReturnValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_pasteButton_ENC_clicked()
|
||||
{
|
||||
setAddress_ENC(QApplication::clipboard()->text());
|
||||
}
|
||||
|
||||
QString specialChar = "\"@!#$%&'()*+,-./:;<=>?`{|}~^_[]\\";
|
||||
QString validChar = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + specialChar;
|
||||
bool isValidPassphrase(QString strPassphrase, QString& strInvalid)
|
||||
{
|
||||
for (int i = 0; i < strPassphrase.size(); i++) {
|
||||
if (!validChar.contains(strPassphrase[i], Qt::CaseSensitive)) {
|
||||
if (QString("\"'").contains(strPassphrase[i]))
|
||||
continue;
|
||||
|
||||
strInvalid = strPassphrase[i];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_encryptKeyButton_ENC_clicked()
|
||||
{
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
QString qstrPassphrase = ui->passphraseIn_ENC->text();
|
||||
QString strInvalid;
|
||||
if (!isValidPassphrase(qstrPassphrase, strInvalid)) {
|
||||
ui->statusLabel_ENC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_ENC->setText(tr("The entered passphrase is invalid. ") + strInvalid + QString(" is not valid") + QString(" ") + tr("Allowed: 0-9,a-z,A-Z,") + specialChar);
|
||||
return;
|
||||
}
|
||||
|
||||
CBitcoinAddress addr(ui->addressIn_ENC->text().toStdString());
|
||||
if (!addr.IsValid()) {
|
||||
ui->statusLabel_ENC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_ENC->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
CKeyID keyID;
|
||||
if (!addr.GetKeyID(keyID)) {
|
||||
ui->addressIn_ENC->setValid(false);
|
||||
ui->statusLabel_ENC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_ENC->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
WalletModel::UnlockContext ctx(model->requestUnlock(AskPassphraseDialog::Context::BIP_38, true));
|
||||
if (!ctx.isValid()) {
|
||||
ui->statusLabel_ENC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_ENC->setText(tr("Wallet unlock was cancelled."));
|
||||
return;
|
||||
}
|
||||
|
||||
CKey key;
|
||||
if (!pwalletMain->GetKey(keyID, key)) {
|
||||
ui->statusLabel_ENC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_ENC->setText(tr("Private key for the entered address is not available."));
|
||||
return;
|
||||
}
|
||||
|
||||
std::string encryptedKey = BIP38_Encrypt(addr.ToString(), qstrPassphrase.toStdString(), key.GetPrivKey_256(), key.IsCompressed());
|
||||
ui->encryptedKeyOut_ENC->setText(QString::fromStdString(encryptedKey));
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_copyKeyButton_ENC_clicked()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->encryptedKeyOut_ENC->text());
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_clearButton_ENC_clicked()
|
||||
{
|
||||
ui->addressIn_ENC->clear();
|
||||
ui->passphraseIn_ENC->clear();
|
||||
ui->encryptedKeyOut_ENC->clear();
|
||||
ui->statusLabel_ENC->clear();
|
||||
|
||||
ui->addressIn_ENC->setFocus();
|
||||
}
|
||||
|
||||
CKey key;
|
||||
void Bip38ToolDialog::on_pasteButton_DEC_clicked()
|
||||
{
|
||||
// Paste text from clipboard into recipient field
|
||||
ui->encryptedKeyIn_DEC->setText(QApplication::clipboard()->text());
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_decryptKeyButton_DEC_clicked()
|
||||
{
|
||||
string strPassphrase = ui->passphraseIn_DEC->text().toStdString();
|
||||
string strKey = ui->encryptedKeyIn_DEC->text().toStdString();
|
||||
|
||||
uint256 privKey;
|
||||
bool fCompressed;
|
||||
if (!BIP38_Decrypt(strPassphrase, strKey, privKey, fCompressed)) {
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Failed to decrypt.") + QString(" ") + tr("Please check the key and passphrase and try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
key.Set(privKey.begin(), privKey.end(), fCompressed);
|
||||
CPubKey pubKey = key.GetPubKey();
|
||||
CBitcoinAddress address(pubKey.GetID());
|
||||
|
||||
ui->decryptedKeyOut_DEC->setText(QString::fromStdString(CBitcoinSecret(key).ToString()));
|
||||
ui->addressOut_DEC->setText(QString::fromStdString(address.ToString()));
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_importAddressButton_DEC_clicked()
|
||||
{
|
||||
WalletModel::UnlockContext ctx(model->requestUnlock(AskPassphraseDialog::Context::BIP_38, true));
|
||||
if (!ctx.isValid()) {
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Wallet unlock was cancelled."));
|
||||
return;
|
||||
}
|
||||
|
||||
CBitcoinAddress address(ui->addressOut_DEC->text().toStdString());
|
||||
CPubKey pubkey = key.GetPubKey();
|
||||
|
||||
if (!address.IsValid() || !key.IsValid() || CBitcoinAddress(pubkey.GetID()).ToString() != address.ToString()) {
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Data Not Valid.") + QString(" ") + tr("Please try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
CKeyID vchAddress = pubkey.GetID();
|
||||
{
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Please wait while key is imported"));
|
||||
|
||||
pwalletMain->MarkDirty();
|
||||
pwalletMain->SetAddressBook(vchAddress, "", "receive");
|
||||
|
||||
// Don't throw error in case a key is already there
|
||||
if (pwalletMain->HaveKey(vchAddress)) {
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Key Already Held By Wallet"));
|
||||
return;
|
||||
}
|
||||
|
||||
pwalletMain->mapKeyMetadata[vchAddress].nCreateTime = 1;
|
||||
|
||||
if (!pwalletMain->AddKeyPubKey(key, pubkey)) {
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_DEC->setText(tr("Error Adding Key To Wallet"));
|
||||
return;
|
||||
}
|
||||
|
||||
// whenever a key is imported, we need to scan the whole chain
|
||||
pwalletMain->nTimeFirstKey = 1; // 0 would be considered 'no value'
|
||||
pwalletMain->ScanForWalletTransactions(chainActive.Genesis(), true);
|
||||
}
|
||||
|
||||
ui->statusLabel_DEC->setStyleSheet("QLabel { color: green; }");
|
||||
ui->statusLabel_DEC->setText(tr("Successfully Added Private Key To Wallet"));
|
||||
}
|
||||
|
||||
void Bip38ToolDialog::on_clearButton_DEC_clicked()
|
||||
{
|
||||
ui->encryptedKeyIn_DEC->clear();
|
||||
ui->decryptedKeyOut_DEC->clear();
|
||||
ui->passphraseIn_DEC->clear();
|
||||
ui->statusLabel_DEC->clear();
|
||||
|
||||
ui->encryptedKeyIn_DEC->setFocus();
|
||||
}
|
||||
|
||||
bool Bip38ToolDialog::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::FocusIn) {
|
||||
if (ui->tabWidget->currentIndex() == 0) {
|
||||
/* Clear status message on focus change */
|
||||
ui->statusLabel_ENC->clear();
|
||||
|
||||
/* Select generated signature */
|
||||
if (object == ui->encryptedKeyOut_ENC) {
|
||||
ui->encryptedKeyOut_ENC->selectAll();
|
||||
return true;
|
||||
}
|
||||
} else if (ui->tabWidget->currentIndex() == 1) {
|
||||
/* Clear status message on focus change */
|
||||
ui->statusLabel_DEC->clear();
|
||||
}
|
||||
}
|
||||
return QDialog::eventFilter(object, event);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BIP38DIALOG_H
|
||||
#define BITCOIN_QT_BIP38DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class WalletModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Bip38ToolDialog;
|
||||
}
|
||||
|
||||
class Bip38ToolDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Bip38ToolDialog(QWidget* parent);
|
||||
~Bip38ToolDialog();
|
||||
|
||||
void setModel(WalletModel* model);
|
||||
void setAddress_ENC(const QString& address);
|
||||
void setAddress_DEC(const QString& address);
|
||||
|
||||
void showTab_ENC(bool fShow);
|
||||
void showTab_DEC(bool fShow);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject* object, QEvent* event);
|
||||
|
||||
private:
|
||||
Ui::Bip38ToolDialog* ui;
|
||||
WalletModel* model;
|
||||
|
||||
private slots:
|
||||
/* encrypt key */
|
||||
void on_addressBookButton_ENC_clicked();
|
||||
void on_pasteButton_ENC_clicked();
|
||||
void on_encryptKeyButton_ENC_clicked();
|
||||
void on_copyKeyButton_ENC_clicked();
|
||||
void on_clearButton_ENC_clicked();
|
||||
/* decrypt key */
|
||||
void on_pasteButton_DEC_clicked();
|
||||
void on_decryptKeyButton_DEC_clicked();
|
||||
void on_importAddressButton_DEC_clicked();
|
||||
void on_clearButton_DEC_clicked();
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_BIP38TOOLDIALOG_H
|
||||
@@ -0,0 +1,91 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2017 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "bitcoinaddressvalidator.h"
|
||||
|
||||
#include "base58.h"
|
||||
|
||||
/* Base58 characters are:
|
||||
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||||
|
||||
This is:
|
||||
- All numbers except for '0'
|
||||
- All upper-case letters except for 'I' and 'O'
|
||||
- All lower-case letters except for 'l'
|
||||
*/
|
||||
|
||||
BitcoinAddressEntryValidator::BitcoinAddressEntryValidator(QObject* parent) : QValidator(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QValidator::State BitcoinAddressEntryValidator::validate(QString& input, int& pos) const
|
||||
{
|
||||
Q_UNUSED(pos);
|
||||
|
||||
// Empty address is "intermediate" input
|
||||
if (input.isEmpty())
|
||||
return QValidator::Intermediate;
|
||||
|
||||
// Correction
|
||||
for (int idx = 0; idx < input.size();) {
|
||||
bool removeChar = false;
|
||||
QChar ch = input.at(idx);
|
||||
// Corrections made are very conservative on purpose, to avoid
|
||||
// users unexpectedly getting away with typos that would normally
|
||||
// be detected, and thus sending to the wrong address.
|
||||
switch (ch.unicode()) {
|
||||
// Qt categorizes these as "Other_Format" not "Separator_Space"
|
||||
case 0x200B: // ZERO WIDTH SPACE
|
||||
case 0xFEFF: // ZERO WIDTH NO-BREAK SPACE
|
||||
removeChar = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Remove whitespace
|
||||
if (ch.isSpace())
|
||||
removeChar = true;
|
||||
|
||||
// To next character
|
||||
if (removeChar)
|
||||
input.remove(idx, 1);
|
||||
else
|
||||
++idx;
|
||||
}
|
||||
|
||||
// Validation
|
||||
QValidator::State state = QValidator::Acceptable;
|
||||
for (int idx = 0; idx < input.size(); ++idx) {
|
||||
int ch = input.at(idx).unicode();
|
||||
|
||||
if (((ch >= '0' && ch <= '9') ||
|
||||
(ch >= 'a' && ch <= 'z') ||
|
||||
(ch >= 'A' && ch <= 'Z')) &&
|
||||
ch != 'l' && ch != 'I' && ch != '0' && ch != 'O') {
|
||||
// Alphanumeric and not a 'forbidden' character
|
||||
} else {
|
||||
state = QValidator::Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
BitcoinAddressCheckValidator::BitcoinAddressCheckValidator(QObject* parent) : QValidator(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QValidator::State BitcoinAddressCheckValidator::validate(QString& input, int& pos) const
|
||||
{
|
||||
Q_UNUSED(pos);
|
||||
// Validate the passed Agrarian address
|
||||
CBitcoinAddress addr(input.toStdString());
|
||||
if (addr.IsValid())
|
||||
return QValidator::Acceptable;
|
||||
|
||||
return QValidator::Invalid;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
|
||||
#define BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
|
||||
|
||||
#include <QValidator>
|
||||
|
||||
/** Base58 entry widget validator, checks for valid characters and
|
||||
* removes some whitespace.
|
||||
*/
|
||||
class BitcoinAddressEntryValidator : public QValidator
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BitcoinAddressEntryValidator(QObject* parent);
|
||||
|
||||
State validate(QString& input, int& pos) const;
|
||||
};
|
||||
|
||||
/** Bitcoin address widget validator, checks for a valid bitcoin address.
|
||||
*/
|
||||
class BitcoinAddressCheckValidator : public QValidator
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BitcoinAddressCheckValidator(QObject* parent);
|
||||
|
||||
State validate(QString& input, int& pos) const;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
|
||||
@@ -0,0 +1,303 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "bitcoinamountfield.h"
|
||||
|
||||
#include "bitcoinunits.h"
|
||||
#include "guiconstants.h"
|
||||
#include "guiutil.h"
|
||||
#include "qvaluecombobox.h"
|
||||
|
||||
#include <QAbstractSpinBox>
|
||||
#include <QApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QKeyEvent>
|
||||
#include <QLineEdit>
|
||||
|
||||
/** QSpinBox that uses fixed-point numbers internally and uses our own
|
||||
* formatting/parsing functions.
|
||||
*/
|
||||
class AmountSpinBox : public QAbstractSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AmountSpinBox(QWidget* parent) : QAbstractSpinBox(parent),
|
||||
currentUnit(BitcoinUnits::AGR),
|
||||
singleStep(100000) // satoshis
|
||||
{
|
||||
setAlignment(Qt::AlignRight);
|
||||
|
||||
connect(lineEdit(), SIGNAL(textEdited(QString)), this, SIGNAL(valueChanged()));
|
||||
}
|
||||
|
||||
QValidator::State validate(QString& text, int& pos) const
|
||||
{
|
||||
if (text.isEmpty())
|
||||
return QValidator::Intermediate;
|
||||
bool valid = false;
|
||||
parse(text, &valid);
|
||||
/* Make sure we return Intermediate so that fixup() is called on defocus */
|
||||
return valid ? QValidator::Intermediate : QValidator::Invalid;
|
||||
}
|
||||
|
||||
void fixup(QString& input) const
|
||||
{
|
||||
bool valid = false;
|
||||
CAmount val = parse(input, &valid);
|
||||
if (valid) {
|
||||
input = BitcoinUnits::format(currentUnit, val, false, BitcoinUnits::separatorAlways);
|
||||
lineEdit()->setText(input);
|
||||
}
|
||||
}
|
||||
|
||||
CAmount value(bool* valid_out = 0) const
|
||||
{
|
||||
return parse(text(), valid_out);
|
||||
}
|
||||
|
||||
void setValue(const CAmount& value)
|
||||
{
|
||||
lineEdit()->setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways));
|
||||
emit valueChanged();
|
||||
}
|
||||
|
||||
void stepBy(int steps)
|
||||
{
|
||||
bool valid = false;
|
||||
CAmount val = value(&valid);
|
||||
val = val + steps * singleStep;
|
||||
val = qMin(qMax(val, CAmount(0)), BitcoinUnits::maxMoney());
|
||||
setValue(val);
|
||||
}
|
||||
|
||||
void setDisplayUnit(int unit)
|
||||
{
|
||||
bool valid = false;
|
||||
CAmount val = value(&valid);
|
||||
|
||||
currentUnit = unit;
|
||||
|
||||
if (valid)
|
||||
setValue(val);
|
||||
else
|
||||
clear();
|
||||
}
|
||||
|
||||
void setSingleStep(const CAmount& step)
|
||||
{
|
||||
singleStep = step;
|
||||
}
|
||||
|
||||
QSize minimumSizeHint() const
|
||||
{
|
||||
if (cachedMinimumSizeHint.isEmpty()) {
|
||||
ensurePolished();
|
||||
|
||||
const QFontMetrics fm(fontMetrics());
|
||||
int h = lineEdit()->minimumSizeHint().height();
|
||||
int w = fm.width(BitcoinUnits::format(BitcoinUnits::AGR, BitcoinUnits::maxMoney(), false, BitcoinUnits::separatorAlways));
|
||||
w += 2; // cursor blinking space
|
||||
|
||||
QStyleOptionSpinBox opt;
|
||||
initStyleOption(&opt);
|
||||
QSize hint(w, h);
|
||||
QSize extra(35, 6);
|
||||
opt.rect.setSize(hint + extra);
|
||||
extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt, QStyle::SC_SpinBoxEditField, this).size();
|
||||
// get closer to final result by repeating the calculation
|
||||
opt.rect.setSize(hint + extra);
|
||||
extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt, QStyle::SC_SpinBoxEditField, this).size();
|
||||
hint += extra;
|
||||
hint.setHeight(h);
|
||||
|
||||
opt.rect = rect();
|
||||
|
||||
cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this).expandedTo(QApplication::globalStrut());
|
||||
}
|
||||
return cachedMinimumSizeHint;
|
||||
}
|
||||
|
||||
private:
|
||||
int currentUnit;
|
||||
CAmount singleStep;
|
||||
mutable QSize cachedMinimumSizeHint;
|
||||
|
||||
/**
|
||||
* Parse a string into a number of base monetary units and
|
||||
* return validity.
|
||||
* @note Must return 0 if !valid.
|
||||
*/
|
||||
CAmount parse(const QString& text, bool* valid_out = 0) const
|
||||
{
|
||||
CAmount val = 0;
|
||||
bool valid = BitcoinUnits::parse(currentUnit, text, &val);
|
||||
if (valid) {
|
||||
if (val < 0 || val > BitcoinUnits::maxMoney())
|
||||
valid = false;
|
||||
}
|
||||
if (valid_out)
|
||||
*valid_out = valid;
|
||||
return valid ? val : 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool event(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (keyEvent->key() == Qt::Key_Comma) {
|
||||
// Translate a comma into a period
|
||||
QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count());
|
||||
return QAbstractSpinBox::event(&periodKeyEvent);
|
||||
}
|
||||
}
|
||||
return QAbstractSpinBox::event(event);
|
||||
}
|
||||
|
||||
StepEnabled stepEnabled() const
|
||||
{
|
||||
StepEnabled rv = 0;
|
||||
if (isReadOnly()) // Disable steps when AmountSpinBox is read-only
|
||||
return StepNone;
|
||||
if (text().isEmpty()) // Allow step-up with empty field
|
||||
return StepUpEnabled;
|
||||
bool valid = false;
|
||||
CAmount val = value(&valid);
|
||||
if (valid) {
|
||||
if (val > 0)
|
||||
rv |= StepDownEnabled;
|
||||
if (val < BitcoinUnits::maxMoney())
|
||||
rv |= StepUpEnabled;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
signals:
|
||||
void valueChanged();
|
||||
};
|
||||
|
||||
#include "bitcoinamountfield.moc"
|
||||
|
||||
BitcoinAmountField::BitcoinAmountField(QWidget* parent) : QWidget(parent),
|
||||
amount(0)
|
||||
{
|
||||
this->setObjectName("BitcoinAmountField"); // ID as CSS-reference
|
||||
// For whatever reasons the Gods of Qt-CSS-manipulation won't let us change this class' stylesheet in the CSS file.
|
||||
// Workaround for the people after me:
|
||||
// - name all UI objects, preferably with a unique name
|
||||
// - address those names globally in the CSS file
|
||||
|
||||
amount = new AmountSpinBox(this);
|
||||
// According to the Qt-CSS specs this should work, but doesn't
|
||||
amount->setStyleSheet("QSpinBox::up-button:hover { background-color: #f2f2f2; }"
|
||||
"QSpinBox::down-button:hover { background-color: #f2f2f2; }");
|
||||
amount->setLocale(QLocale::c());
|
||||
amount->installEventFilter(this);
|
||||
amount->setMaximumWidth(170);
|
||||
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->addWidget(amount);
|
||||
unit = new QValueComboBox(this);
|
||||
unit->setModel(new BitcoinUnits(this));
|
||||
layout->addWidget(unit);
|
||||
layout->addStretch(1);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
setLayout(layout);
|
||||
|
||||
setFocusPolicy(Qt::TabFocus);
|
||||
setFocusProxy(amount);
|
||||
|
||||
// If one if the widgets changes, the combined content changes as well
|
||||
connect(amount, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
|
||||
connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int)));
|
||||
|
||||
// Set default based on configuration
|
||||
unitChanged(unit->currentIndex());
|
||||
}
|
||||
|
||||
void BitcoinAmountField::clear()
|
||||
{
|
||||
amount->clear();
|
||||
unit->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setEnabled(bool fEnabled)
|
||||
{
|
||||
amount->setEnabled(fEnabled);
|
||||
unit->setEnabled(fEnabled);
|
||||
}
|
||||
|
||||
bool BitcoinAmountField::validate()
|
||||
{
|
||||
bool valid = false;
|
||||
value(&valid);
|
||||
setValid(valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setValid(bool valid)
|
||||
{
|
||||
if (valid)
|
||||
// According to the Qt-CSS specs this should work, but doesn't
|
||||
amount->setStyleSheet("QSpinBox::up-button:hover { background-color: #f2f2f2 }"
|
||||
"QSpinBox::down-button:hover { background-color: #f2f2f2 }");
|
||||
else
|
||||
amount->setStyleSheet(STYLE_INVALID);
|
||||
}
|
||||
|
||||
bool BitcoinAmountField::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::FocusIn) {
|
||||
// Clear invalid flag on focus
|
||||
setValid(true);
|
||||
}
|
||||
return QWidget::eventFilter(object, event);
|
||||
}
|
||||
|
||||
QWidget* BitcoinAmountField::setupTabChain(QWidget* prev)
|
||||
{
|
||||
QWidget::setTabOrder(prev, amount);
|
||||
QWidget::setTabOrder(amount, unit);
|
||||
return unit;
|
||||
}
|
||||
|
||||
CAmount BitcoinAmountField::value(bool* valid_out) const
|
||||
{
|
||||
return amount->value(valid_out);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setValue(const CAmount& value)
|
||||
{
|
||||
amount->setValue(value);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setReadOnly(bool fReadOnly)
|
||||
{
|
||||
amount->setReadOnly(fReadOnly);
|
||||
unit->setEnabled(!fReadOnly);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::unitChanged(int idx)
|
||||
{
|
||||
// Use description tooltip for current unit for the combobox
|
||||
unit->setToolTip(unit->itemData(idx, Qt::ToolTipRole).toString());
|
||||
|
||||
// Determine new unit ID
|
||||
int newUnit = unit->itemData(idx, BitcoinUnits::UnitRole).toInt();
|
||||
|
||||
amount->setDisplayUnit(newUnit);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setDisplayUnit(int newUnit)
|
||||
{
|
||||
unit->setValue(newUnit);
|
||||
}
|
||||
|
||||
void BitcoinAmountField::setSingleStep(const CAmount& step)
|
||||
{
|
||||
amount->setSingleStep(step);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BITCOINAMOUNTFIELD_H
|
||||
#define BITCOIN_QT_BITCOINAMOUNTFIELD_H
|
||||
|
||||
#include "amount.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class AmountSpinBox;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QValueComboBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Widget for entering bitcoin amounts.
|
||||
*/
|
||||
class BitcoinAmountField : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// ugly hack: for some unknown reason CAmount (instead of qint64) does not work here as expected
|
||||
// discussion: https://github.com/bitcoin/bitcoin/pull/5117
|
||||
Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY valueChanged USER true)
|
||||
|
||||
public:
|
||||
explicit BitcoinAmountField(QWidget* parent = 0);
|
||||
|
||||
CAmount value(bool* value = 0) const;
|
||||
void setValue(const CAmount& value);
|
||||
|
||||
/** Set single step in satoshis **/
|
||||
void setSingleStep(const CAmount& step);
|
||||
|
||||
/** Make read-only **/
|
||||
void setReadOnly(bool fReadOnly);
|
||||
|
||||
/** Mark current value as invalid in UI. */
|
||||
void setValid(bool valid);
|
||||
/** Perform input validation, mark field as invalid if entered value is not valid. */
|
||||
bool validate();
|
||||
|
||||
/** Change unit used to display amount. */
|
||||
void setDisplayUnit(int unit);
|
||||
|
||||
/** Make field empty and ready for new input. */
|
||||
void clear();
|
||||
|
||||
/** Enable/Disable. */
|
||||
void setEnabled(bool fEnabled);
|
||||
|
||||
/** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907),
|
||||
in these cases we have to set it up manually.
|
||||
*/
|
||||
QWidget* setupTabChain(QWidget* prev);
|
||||
|
||||
signals:
|
||||
void valueChanged();
|
||||
|
||||
protected:
|
||||
/** Intercept focus-in event and ',' key presses */
|
||||
bool eventFilter(QObject* object, QEvent* event);
|
||||
|
||||
private:
|
||||
AmountSpinBox* amount;
|
||||
QValueComboBox* unit;
|
||||
|
||||
private slots:
|
||||
void unitChanged(int idx);
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_BITCOINAMOUNTFIELD_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,295 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BITCOINGUI_H
|
||||
#define BITCOIN_QT_BITCOINGUI_H
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include "config/agrarian-config.h"
|
||||
#endif
|
||||
|
||||
#include "amount.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMainWindow>
|
||||
#include <QMap>
|
||||
#include <QMenu>
|
||||
#include <QPoint>
|
||||
#include <QPushButton>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
class ClientModel;
|
||||
class NetworkStyle;
|
||||
class Notificator;
|
||||
class OptionsModel;
|
||||
class BlockExplorer;
|
||||
class RPCConsole;
|
||||
class SendCoinsRecipient;
|
||||
class UnitDisplayStatusBarControl;
|
||||
class WalletFrame;
|
||||
class WalletModel;
|
||||
class MasternodeList;
|
||||
|
||||
class CWallet;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
class QProgressBar;
|
||||
class QProgressDialog;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/**
|
||||
Bitcoin GUI main class. This class represents the main window of the Bitcoin UI. It communicates with both the client and
|
||||
wallet models to give the user an up-to-date view of the current core state.
|
||||
*/
|
||||
class BitcoinGUI : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const QString DEFAULT_WALLET;
|
||||
|
||||
explicit BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent = 0);
|
||||
~BitcoinGUI();
|
||||
|
||||
/** Set the client model.
|
||||
The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic.
|
||||
*/
|
||||
void setClientModel(ClientModel* clientModel);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
/** Set the wallet model.
|
||||
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
|
||||
functionality.
|
||||
*/
|
||||
bool addWallet(const QString& name, WalletModel* walletModel);
|
||||
bool setCurrentWallet(const QString& name);
|
||||
void removeAllWallets();
|
||||
#endif // ENABLE_WALLET
|
||||
bool enableWallet;
|
||||
bool fMultiSend = false;
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent* e);
|
||||
void closeEvent(QCloseEvent* event);
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
void dropEvent(QDropEvent* event);
|
||||
bool eventFilter(QObject* object, QEvent* event);
|
||||
|
||||
private:
|
||||
ClientModel* clientModel;
|
||||
WalletFrame* walletFrame;
|
||||
|
||||
UnitDisplayStatusBarControl* unitDisplayControl;
|
||||
QLabel* labelStakingIcon;
|
||||
QPushButton* labelAutoMintIcon;
|
||||
QPushButton* labelEncryptionIcon;
|
||||
QLabel* labelTorIcon;
|
||||
QPushButton* labelConnectionsIcon;
|
||||
QLabel* labelBlocksIcon;
|
||||
QLabel* progressBarLabel;
|
||||
QProgressBar* progressBar;
|
||||
QProgressDialog* progressDialog;
|
||||
|
||||
QMenuBar* appMenuBar;
|
||||
QAction* overviewAction;
|
||||
QAction* historyAction;
|
||||
QAction* masternodeAction;
|
||||
QAction* quitAction;
|
||||
QAction* sendCoinsAction;
|
||||
QAction* usedSendingAddressesAction;
|
||||
QAction* usedReceivingAddressesAction;
|
||||
QAction* signMessageAction;
|
||||
QAction* verifyMessageAction;
|
||||
QAction* bip38ToolAction;
|
||||
QAction* multisigCreateAction;
|
||||
QAction* multisigSpendAction;
|
||||
QAction* multisigSignAction;
|
||||
QAction* aboutAction;
|
||||
QAction* receiveCoinsAction;
|
||||
QAction* governanceAction;
|
||||
QAction* privacyAction;
|
||||
QAction* optionsAction;
|
||||
QAction* toggleHideAction;
|
||||
QAction* encryptWalletAction;
|
||||
QAction* backupWalletAction;
|
||||
QAction* changePassphraseAction;
|
||||
QAction* unlockWalletAction;
|
||||
QAction* lockWalletAction;
|
||||
QAction* aboutQtAction;
|
||||
QAction* openInfoAction;
|
||||
QAction* openRPCConsoleAction;
|
||||
QAction* openNetworkAction;
|
||||
QAction* openPeersAction;
|
||||
QAction* openRepairAction;
|
||||
QAction* openConfEditorAction;
|
||||
QAction* openMNConfEditorAction;
|
||||
QAction* showBackupsAction;
|
||||
QAction* openAction;
|
||||
QAction* openBlockExplorerAction;
|
||||
QAction* showHelpMessageAction;
|
||||
QAction* multiSendAction;
|
||||
|
||||
QSystemTrayIcon* trayIcon;
|
||||
QMenu* trayIconMenu;
|
||||
Notificator* notificator;
|
||||
RPCConsole* rpcConsole;
|
||||
BlockExplorer* explorerWindow;
|
||||
|
||||
/** Keep track of previous number of blocks, to detect progress */
|
||||
int prevBlocks;
|
||||
int spinnerFrame;
|
||||
|
||||
/** Create the main UI actions. */
|
||||
void createActions(const NetworkStyle* networkStyle);
|
||||
/** Create the menu bar and sub-menus. */
|
||||
void createMenuBar();
|
||||
/** Create the toolbars */
|
||||
void createToolBars();
|
||||
/** Create system tray icon and notification */
|
||||
void createTrayIcon(const NetworkStyle* networkStyle);
|
||||
/** Create system tray menu (or setup the dock menu) */
|
||||
void createTrayIconMenu();
|
||||
|
||||
/** Enable or disable all wallet-related actions */
|
||||
void setWalletActionsEnabled(bool enabled);
|
||||
|
||||
/** Connect core signals to GUI client */
|
||||
void subscribeToCoreSignals();
|
||||
/** Disconnect core signals from GUI client */
|
||||
void unsubscribeFromCoreSignals();
|
||||
|
||||
signals:
|
||||
/** Signal raised when a URI was entered or dragged to the GUI */
|
||||
void receivedURI(const QString& uri);
|
||||
/** Restart handling */
|
||||
void requestedRestart(QStringList args);
|
||||
|
||||
public slots:
|
||||
/** Set number of connections shown in the UI */
|
||||
void setNumConnections(int count);
|
||||
/** Set number of blocks shown in the UI */
|
||||
void setNumBlocks(int count);
|
||||
/** Get restart command-line parameters and request restart */
|
||||
void handleRestart(QStringList args);
|
||||
|
||||
/** Notify the user of an event from the core network or transaction handling code.
|
||||
@param[in] title the message box / notification title
|
||||
@param[in] message the displayed text
|
||||
@param[in] style modality and style definitions (icon and used buttons - buttons only for message boxes)
|
||||
@see CClientUIInterface::MessageBoxFlags
|
||||
@param[in] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
|
||||
*/
|
||||
void message(const QString& title, const QString& message, unsigned int style, bool* ret = NULL);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
void setStakingStatus();
|
||||
void setAutoMintStatus();
|
||||
|
||||
/** Set the encryption status as shown in the UI.
|
||||
@param[in] status current encryption status
|
||||
@see WalletModel::EncryptionStatus
|
||||
*/
|
||||
void setEncryptionStatus(int status);
|
||||
|
||||
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
|
||||
|
||||
/** Show incoming transaction notification for new transactions. */
|
||||
void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address);
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
private:
|
||||
/** Set the Tor-enabled icon as shown in the UI. */
|
||||
void updateTorIcon();
|
||||
|
||||
private slots:
|
||||
#ifdef ENABLE_WALLET
|
||||
/** Switch to overview (home) page */
|
||||
void gotoOverviewPage();
|
||||
/** Switch to history (transactions) page */
|
||||
void gotoHistoryPage();
|
||||
/** Switch to Governance Page */
|
||||
void gotoGovernancePage();
|
||||
/** Switch to Explorer Page */
|
||||
void gotoBlockExplorerPage();
|
||||
/** Switch to masternode page */
|
||||
void gotoMasternodePage();
|
||||
/** Switch to privacy page */
|
||||
void gotoReceiveCoinsPage();
|
||||
/** Switch to receive coins page */
|
||||
void gotoPrivacyPage();
|
||||
/** Switch to send coins page */
|
||||
void gotoSendCoinsPage(QString addr = "");
|
||||
|
||||
/** Show Sign/Verify Message dialog and switch to sign message tab */
|
||||
void gotoSignMessageTab(QString addr = "");
|
||||
/** Show Sign/Verify Message dialog and switch to verify message tab */
|
||||
void gotoVerifyMessageTab(QString addr = "");
|
||||
/** Show MultiSend Dialog */
|
||||
void gotoMultiSendDialog();
|
||||
/** Show MultiSig Dialog */
|
||||
void gotoMultisigCreate();
|
||||
void gotoMultisigSpend();
|
||||
void gotoMultisigSign();
|
||||
/** Show BIP 38 tool - default to Encryption tab */
|
||||
void gotoBip38Tool();
|
||||
|
||||
/** Show open dialog */
|
||||
void openClicked();
|
||||
|
||||
#endif // ENABLE_WALLET
|
||||
/** Show configuration dialog */
|
||||
void optionsClicked();
|
||||
/** Show about dialog */
|
||||
void aboutClicked();
|
||||
/** Show help message dialog */
|
||||
void showHelpMessageClicked();
|
||||
#ifndef Q_OS_MAC
|
||||
/** Handle tray icon clicked */
|
||||
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
#endif
|
||||
|
||||
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
|
||||
void showNormalIfMinimized(bool fToggleHidden = false);
|
||||
/** Simply calls showNormalIfMinimized(true) for use in SLOT() macro */
|
||||
void toggleHidden();
|
||||
|
||||
/** called by a timer to check if fRequestShutdown has been set **/
|
||||
void detectShutdown();
|
||||
|
||||
/** Show progress dialog e.g. for verifychain */
|
||||
void showProgress(const QString& title, int nProgress);
|
||||
};
|
||||
|
||||
class UnitDisplayStatusBarControl : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UnitDisplayStatusBarControl();
|
||||
/** Lets the control know about the Options Model (and its signals) */
|
||||
void setOptionsModel(OptionsModel* optionsModel);
|
||||
|
||||
protected:
|
||||
/** So that it responds to left-button clicks */
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
|
||||
private:
|
||||
OptionsModel* optionsModel;
|
||||
QMenu* menu;
|
||||
|
||||
/** Shows context menu with Display Unit options by the mouse coordinates */
|
||||
void onDisplayUnitsClicked(const QPoint& point);
|
||||
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
|
||||
void createContextMenu();
|
||||
|
||||
private slots:
|
||||
/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
|
||||
void updateDisplayUnit(int newUnits);
|
||||
/** Tells underlying optionsModel to update its current display unit. */
|
||||
void onMenuSelection(QAction* action);
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_BITCOINGUI_H
|
||||
@@ -0,0 +1,286 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2017 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "bitcoinunits.h"
|
||||
#include "chainparams.h"
|
||||
#include "primitives/transaction.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QStringList>
|
||||
|
||||
BitcoinUnits::BitcoinUnits(QObject* parent) : QAbstractListModel(parent),
|
||||
unitlist(availableUnits())
|
||||
{
|
||||
}
|
||||
|
||||
QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits()
|
||||
{
|
||||
QList<BitcoinUnits::Unit> unitlist;
|
||||
unitlist.append(AGR);
|
||||
unitlist.append(mAGR);
|
||||
unitlist.append(uAGR);
|
||||
return unitlist;
|
||||
}
|
||||
|
||||
bool BitcoinUnits::valid(int unit)
|
||||
{
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
case mAGR:
|
||||
case uAGR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QString BitcoinUnits::id(int unit)
|
||||
{
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return QString("agrarian");
|
||||
case mAGR:
|
||||
return QString("magrarian");
|
||||
case uAGR:
|
||||
return QString::fromUtf8("uagrarian");
|
||||
default:
|
||||
return QString("???");
|
||||
}
|
||||
}
|
||||
|
||||
QString BitcoinUnits::name(int unit)
|
||||
{
|
||||
if (Params().NetworkID() == CBaseChainParams::MAIN) {
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return QString("AGR");
|
||||
case mAGR:
|
||||
return QString("mAGR");
|
||||
case uAGR:
|
||||
return QString::fromUtf8("μAGR");
|
||||
default:
|
||||
return QString("???");
|
||||
}
|
||||
} else {
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return QString("tAGR");
|
||||
case mAGR:
|
||||
return QString("mtAGR");
|
||||
case uAGR:
|
||||
return QString::fromUtf8("μtAGR");
|
||||
default:
|
||||
return QString("???");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString BitcoinUnits::description(int unit)
|
||||
{
|
||||
if (Params().NetworkID() == CBaseChainParams::MAIN) {
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return QString("AGR");
|
||||
case mAGR:
|
||||
return QString("Milli-AGR (1 / 1" THIN_SP_UTF8 "000)");
|
||||
case uAGR:
|
||||
return QString("Micro-AGR (1 / 1" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)");
|
||||
default:
|
||||
return QString("???");
|
||||
}
|
||||
} else {
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return QString("TestAGRs");
|
||||
case mAGR:
|
||||
return QString("Milli-TestAGR (1 / 1" THIN_SP_UTF8 "000)");
|
||||
case uAGR:
|
||||
return QString("Micro-TestAGR (1 / 1" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)");
|
||||
default:
|
||||
return QString("???");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qint64 BitcoinUnits::factor(int unit)
|
||||
{
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return 100000000;
|
||||
case mAGR:
|
||||
return 100000;
|
||||
case uAGR:
|
||||
return 100;
|
||||
default:
|
||||
return 100000000;
|
||||
}
|
||||
}
|
||||
|
||||
int BitcoinUnits::decimals(int unit)
|
||||
{
|
||||
switch (unit) {
|
||||
case AGR:
|
||||
return 8;
|
||||
case mAGR:
|
||||
return 5;
|
||||
case uAGR:
|
||||
return 2;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
QString BitcoinUnits::format(int unit, const CAmount& nIn, bool fPlus, SeparatorStyle separators)
|
||||
{
|
||||
// Note: not using straight sprintf here because we do NOT want
|
||||
// localized number formatting.
|
||||
if (!valid(unit))
|
||||
return QString(); // Refuse to format invalid unit
|
||||
qint64 n = (qint64)nIn;
|
||||
qint64 coin = factor(unit);
|
||||
int num_decimals = decimals(unit);
|
||||
qint64 n_abs = (n > 0 ? n : -n);
|
||||
qint64 quotient = n_abs / coin;
|
||||
qint64 remainder = n_abs % coin;
|
||||
QString quotient_str = QString::number(quotient);
|
||||
QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0');
|
||||
|
||||
// Use SI-style thin space separators as these are locale independent and can't be
|
||||
// confused with the decimal marker.
|
||||
QChar thin_sp(THIN_SP_CP);
|
||||
int q_size = quotient_str.size();
|
||||
if (separators == separatorAlways || (separators == separatorStandard && q_size > 4))
|
||||
for (int i = 3; i < q_size; i += 3)
|
||||
quotient_str.insert(q_size - i, thin_sp);
|
||||
|
||||
if (n < 0)
|
||||
quotient_str.insert(0, '-');
|
||||
else if (fPlus && n > 0)
|
||||
quotient_str.insert(0, '+');
|
||||
|
||||
if (num_decimals <= 0)
|
||||
return quotient_str;
|
||||
|
||||
return quotient_str + QString(".") + remainder_str;
|
||||
}
|
||||
|
||||
|
||||
// TODO: Review all remaining calls to BitcoinUnits::formatWithUnit to
|
||||
// TODO: determine whether the output is used in a plain text context
|
||||
// TODO: or an HTML context (and replace with
|
||||
// TODO: BtcoinUnits::formatHtmlWithUnit in the latter case). Hopefully
|
||||
// TODO: there aren't instances where the result could be used in
|
||||
// TODO: either context.
|
||||
|
||||
// NOTE: Using formatWithUnit in an HTML context risks wrapping
|
||||
// quantities at the thousands separator. More subtly, it also results
|
||||
// in a standard space rather than a thin space, due to a bug in Qt's
|
||||
// XML whitespace canonicalisation
|
||||
//
|
||||
// Please take care to use formatHtmlWithUnit instead, when
|
||||
// appropriate.
|
||||
|
||||
QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
|
||||
{
|
||||
return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
|
||||
}
|
||||
|
||||
QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
|
||||
{
|
||||
QString str(formatWithUnit(unit, amount, plussign, separators));
|
||||
str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
|
||||
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
|
||||
}
|
||||
|
||||
QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
|
||||
{
|
||||
QSettings settings;
|
||||
int digits = settings.value("digits").toInt();
|
||||
|
||||
QString result = format(unit, amount, plussign, separators);
|
||||
if (decimals(unit) > digits) result.chop(decimals(unit) - digits);
|
||||
|
||||
return result + QString(" ") + name(unit);
|
||||
}
|
||||
|
||||
QString BitcoinUnits::floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
|
||||
{
|
||||
QString str(floorWithUnit(unit, amount, plussign, separators));
|
||||
str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
|
||||
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
|
||||
}
|
||||
|
||||
bool BitcoinUnits::parse(int unit, const QString& value, CAmount* val_out)
|
||||
{
|
||||
if (!valid(unit) || value.isEmpty())
|
||||
return false; // Refuse to parse invalid unit or empty string
|
||||
int num_decimals = decimals(unit);
|
||||
|
||||
// Ignore spaces and thin spaces when parsing
|
||||
QStringList parts = removeSpaces(value).split(".");
|
||||
|
||||
if (parts.size() > 2) {
|
||||
return false; // More than one dot
|
||||
}
|
||||
QString whole = parts[0];
|
||||
QString decimals;
|
||||
|
||||
if (parts.size() > 1) {
|
||||
decimals = parts[1];
|
||||
}
|
||||
if (decimals.size() > num_decimals) {
|
||||
return false; // Exceeds max precision
|
||||
}
|
||||
bool ok = false;
|
||||
QString str = whole + decimals.leftJustified(num_decimals, '0');
|
||||
|
||||
if (str.size() > 18) {
|
||||
return false; // Longer numbers will exceed 63 bits
|
||||
}
|
||||
CAmount retvalue(str.toLongLong(&ok));
|
||||
if (val_out) {
|
||||
*val_out = retvalue;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
QString BitcoinUnits::getAmountColumnTitle(int unit)
|
||||
{
|
||||
QString amountTitle = QObject::tr("Amount");
|
||||
if (BitcoinUnits::valid(unit)) {
|
||||
amountTitle += " (" + BitcoinUnits::name(unit) + ")";
|
||||
}
|
||||
return amountTitle;
|
||||
}
|
||||
|
||||
int BitcoinUnits::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return unitlist.size();
|
||||
}
|
||||
|
||||
QVariant BitcoinUnits::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
int row = index.row();
|
||||
if (row >= 0 && row < unitlist.size()) {
|
||||
Unit unit = unitlist.at(row);
|
||||
switch (role) {
|
||||
case Qt::EditRole:
|
||||
case Qt::DisplayRole:
|
||||
return QVariant(name(unit));
|
||||
case Qt::ToolTipRole:
|
||||
return QVariant(description(unit));
|
||||
case UnitRole:
|
||||
return QVariant(static_cast<int>(unit));
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
CAmount BitcoinUnits::maxMoney()
|
||||
{
|
||||
return Params().MaxMoneyOut();
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2017 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_BITCOINUNITS_H
|
||||
#define BITCOIN_QT_BITCOINUNITS_H
|
||||
|
||||
#include "amount.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QString>
|
||||
|
||||
// U+2009 THIN SPACE = UTF-8 E2 80 89
|
||||
#define REAL_THIN_SP_CP 0x2009
|
||||
#define REAL_THIN_SP_UTF8 "\xE2\x80\x89"
|
||||
#define REAL_THIN_SP_HTML " "
|
||||
|
||||
// U+200A HAIR SPACE = UTF-8 E2 80 8A
|
||||
#define HAIR_SP_CP 0x200A
|
||||
#define HAIR_SP_UTF8 "\xE2\x80\x8A"
|
||||
#define HAIR_SP_HTML " "
|
||||
|
||||
// U+2006 SIX-PER-EM SPACE = UTF-8 E2 80 86
|
||||
#define SIXPEREM_SP_CP 0x2006
|
||||
#define SIXPEREM_SP_UTF8 "\xE2\x80\x86"
|
||||
#define SIXPEREM_SP_HTML " "
|
||||
|
||||
// U+2007 FIGURE SPACE = UTF-8 E2 80 87
|
||||
#define FIGURE_SP_CP 0x2007
|
||||
#define FIGURE_SP_UTF8 "\xE2\x80\x87"
|
||||
#define FIGURE_SP_HTML " "
|
||||
|
||||
// QMessageBox seems to have a bug whereby it doesn't display thin/hair spaces
|
||||
// correctly. Workaround is to display a space in a small font. If you
|
||||
// change this, please test that it doesn't cause the parent span to start
|
||||
// wrapping.
|
||||
#define HTML_HACK_SP "<span style='white-space: nowrap; font-size: 6pt'> </span>"
|
||||
|
||||
// Define THIN_SP_* variables to be our preferred type of thin space
|
||||
#define THIN_SP_CP REAL_THIN_SP_CP
|
||||
#define THIN_SP_UTF8 REAL_THIN_SP_UTF8
|
||||
#define THIN_SP_HTML HTML_HACK_SP
|
||||
|
||||
/** Agrarian unit definitions. Encapsulates parsing and formatting
|
||||
and serves as list model for drop-down selection boxes.
|
||||
*/
|
||||
class BitcoinUnits : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BitcoinUnits(QObject* parent);
|
||||
|
||||
/** Agrarian units.
|
||||
@note Source: https://en.bitcoin.it/wiki/Units . Please add only sensible ones
|
||||
*/
|
||||
enum Unit {
|
||||
AGR,
|
||||
mAGR,
|
||||
uAGR
|
||||
};
|
||||
|
||||
enum SeparatorStyle {
|
||||
separatorNever,
|
||||
separatorStandard,
|
||||
separatorAlways
|
||||
};
|
||||
|
||||
//! @name Static API
|
||||
//! Unit conversion and formatting
|
||||
///@{
|
||||
|
||||
//! Get list of units, for drop-down box
|
||||
static QList<Unit> availableUnits();
|
||||
//! Is unit ID valid?
|
||||
static bool valid(int unit);
|
||||
//! Identifier, e.g. for image names
|
||||
static QString id(int unit);
|
||||
//! Short name
|
||||
static QString name(int unit);
|
||||
//! Longer description
|
||||
static QString description(int unit);
|
||||
//! Number of Satoshis (1e-8) per unit
|
||||
static qint64 factor(int unit);
|
||||
//! Number of decimals left
|
||||
static int decimals(int unit);
|
||||
//! Format as string
|
||||
static QString format(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
static QString simpleFormat(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
//! Format as string (with unit)
|
||||
static QString formatWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
static QString formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
//! Format as string (with unit) but floor value up to "digits" settings
|
||||
static QString floorWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
static QString floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
|
||||
//! Parse string to coin amount
|
||||
static bool parse(int unit, const QString& value, CAmount* val_out);
|
||||
//! Gets title for amount column including current display unit if optionsModel reference available */
|
||||
static QString getAmountColumnTitle(int unit);
|
||||
///@}
|
||||
|
||||
//! @name AbstractListModel implementation
|
||||
//! List model for unit drop-down selection box.
|
||||
///@{
|
||||
enum RoleIndex {
|
||||
/** Unit identifier */
|
||||
UnitRole = Qt::UserRole
|
||||
};
|
||||
int rowCount(const QModelIndex& parent) const;
|
||||
QVariant data(const QModelIndex& index, int role) const;
|
||||
///@}
|
||||
|
||||
static QString removeSpaces(QString text)
|
||||
{
|
||||
text.remove(' ');
|
||||
text.remove(QChar(THIN_SP_CP));
|
||||
#if (THIN_SP_CP != REAL_THIN_SP_CP)
|
||||
text.remove(QChar(REAL_THIN_SP_CP));
|
||||
#endif
|
||||
return text;
|
||||
}
|
||||
|
||||
//! Return maximum number of base units (Satoshis)
|
||||
static CAmount maxMoney();
|
||||
|
||||
private:
|
||||
QList<BitcoinUnits::Unit> unitlist;
|
||||
};
|
||||
typedef BitcoinUnits::Unit BitcoinUnit;
|
||||
|
||||
#endif // BITCOIN_QT_BITCOINUNITS_H
|
||||
@@ -0,0 +1,590 @@
|
||||
// Copyright (c) 2017-2019 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "blockexplorer.h"
|
||||
#include "bitcoinunits.h"
|
||||
#include "chainparams.h"
|
||||
#include "clientmodel.h"
|
||||
#include "core_io.h"
|
||||
#include "guiutil.h"
|
||||
#include "main.h"
|
||||
#include "net.h"
|
||||
#include "txdb.h"
|
||||
#include "ui_blockexplorer.h"
|
||||
#include "guiinterface.h"
|
||||
#include "util.h"
|
||||
#include "utilstrencodings.h"
|
||||
#include <QDateTime>
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <set>
|
||||
|
||||
extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
|
||||
|
||||
inline std::string utostr(unsigned int n)
|
||||
{
|
||||
return strprintf("%u", n);
|
||||
}
|
||||
|
||||
static std::string makeHRef(const std::string& Str)
|
||||
{
|
||||
return "<a href=\"" + Str + "\">" + Str + "</a>";
|
||||
}
|
||||
|
||||
static CAmount getTxIn(const CTransaction& tx)
|
||||
{
|
||||
if (tx.IsCoinBase())
|
||||
return 0;
|
||||
|
||||
CAmount Sum = 0;
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
Sum += getPrevOut(tx.vin[i].prevout).nValue;
|
||||
return Sum;
|
||||
}
|
||||
|
||||
static std::string ValueToString(CAmount nValue, bool AllowNegative = false)
|
||||
{
|
||||
if (nValue < 0 && !AllowNegative)
|
||||
return "<span>" + _("unknown") + "</span>";
|
||||
|
||||
QString Str = BitcoinUnits::formatWithUnit(BitcoinUnits::AGR, nValue);
|
||||
if (AllowNegative && nValue > 0)
|
||||
Str = '+' + Str;
|
||||
return std::string("<span>") + Str.toUtf8().data() + "</span>";
|
||||
}
|
||||
|
||||
static std::string ScriptToString(const CScript& Script, bool Long = false, bool Highlight = false)
|
||||
{
|
||||
if (Script.empty())
|
||||
return "unknown";
|
||||
|
||||
CTxDestination Dest;
|
||||
CBitcoinAddress Address;
|
||||
if (ExtractDestination(Script, Dest) && Address.Set(Dest)) {
|
||||
if (Highlight)
|
||||
return "<span class=\"addr\">" + Address.ToString() + "</span>";
|
||||
else
|
||||
return makeHRef(Address.ToString());
|
||||
} else
|
||||
return Long ? "<pre>" + FormatScript(Script) + "</pre>" : _("Non-standard script");
|
||||
}
|
||||
|
||||
static std::string TimeToString(uint64_t Time)
|
||||
{
|
||||
QDateTime timestamp;
|
||||
timestamp.setTime_t(Time);
|
||||
return timestamp.toString("yyyy-MM-dd hh:mm:ss").toUtf8().data();
|
||||
}
|
||||
|
||||
static std::string makeHTMLTableRow(const std::string* pCells, int n)
|
||||
{
|
||||
std::string Result = "<tr>";
|
||||
for (int i = 0; i < n; i++) {
|
||||
Result += "<td class=\"d" + utostr(i) + "\">";
|
||||
Result += pCells[i];
|
||||
Result += "</td>";
|
||||
}
|
||||
Result += "</tr>";
|
||||
return Result;
|
||||
}
|
||||
|
||||
static const char* table = "<table>";
|
||||
|
||||
static std::string makeHTMLTable(const std::string* pCells, int nRows, int nColumns)
|
||||
{
|
||||
std::string Table = table;
|
||||
for (int i = 0; i < nRows; i++)
|
||||
Table += makeHTMLTableRow(pCells + i * nColumns, nColumns);
|
||||
Table += "</table>";
|
||||
return Table;
|
||||
}
|
||||
|
||||
static std::string TxToRow(const CTransaction& tx, const CScript& Highlight = CScript(), const std::string& Prepend = std::string(), int64_t* pSum = NULL)
|
||||
{
|
||||
std::string InAmounts, InAddresses, OutAmounts, OutAddresses;
|
||||
int64_t Delta = 0;
|
||||
for (unsigned int j = 0; j < tx.vin.size(); j++) {
|
||||
if (tx.IsCoinBase()) {
|
||||
InAmounts += ValueToString(tx.GetValueOut());
|
||||
InAddresses += "coinbase";
|
||||
} else {
|
||||
CTxOut PrevOut = getPrevOut(tx.vin[j].prevout);
|
||||
InAmounts += ValueToString(PrevOut.nValue);
|
||||
InAddresses += ScriptToString(PrevOut.scriptPubKey, false, PrevOut.scriptPubKey == Highlight).c_str();
|
||||
if (PrevOut.scriptPubKey == Highlight)
|
||||
Delta -= PrevOut.nValue;
|
||||
}
|
||||
if (j + 1 != tx.vin.size()) {
|
||||
InAmounts += "<br/>";
|
||||
InAddresses += "<br/>";
|
||||
}
|
||||
}
|
||||
for (unsigned int j = 0; j < tx.vout.size(); j++) {
|
||||
CTxOut Out = tx.vout[j];
|
||||
OutAmounts += ValueToString(Out.nValue);
|
||||
OutAddresses += ScriptToString(Out.scriptPubKey, false, Out.scriptPubKey == Highlight);
|
||||
if (Out.scriptPubKey == Highlight)
|
||||
Delta += Out.nValue;
|
||||
if (j + 1 != tx.vout.size()) {
|
||||
OutAmounts += "<br/>";
|
||||
OutAddresses += "<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
std::string List[8] =
|
||||
{
|
||||
Prepend,
|
||||
makeHRef(tx.GetHash().GetHex()),
|
||||
InAddresses,
|
||||
InAmounts,
|
||||
OutAddresses,
|
||||
OutAmounts,
|
||||
"",
|
||||
""};
|
||||
|
||||
int n = sizeof(List) / sizeof(std::string) - 2;
|
||||
|
||||
if (!Highlight.empty()) {
|
||||
List[n++] = std::string("<font color=\"") + ((Delta > 0) ? "green" : "red") + "\">" + ValueToString(Delta, true) + "</font>";
|
||||
*pSum += Delta;
|
||||
List[n++] = ValueToString(*pSum);
|
||||
return makeHTMLTableRow(List, n);
|
||||
}
|
||||
return makeHTMLTableRow(List + 1, n - 1);
|
||||
}
|
||||
|
||||
CTxOut getPrevOut(const COutPoint& out)
|
||||
{
|
||||
CTransaction tx;
|
||||
uint256 hashBlock;
|
||||
if (GetTransaction(out.hash, tx, hashBlock, true))
|
||||
return tx.vout[out.n];
|
||||
return CTxOut();
|
||||
}
|
||||
|
||||
void getNextIn(const COutPoint& Out, uint256& Hash, unsigned int& n)
|
||||
{
|
||||
// Hash = 0;
|
||||
// n = 0;
|
||||
// if (paddressmap)
|
||||
// paddressmap->ReadNextIn(Out, Hash, n);
|
||||
}
|
||||
|
||||
const CBlockIndex* getexplorerBlockIndex(int64_t height)
|
||||
{
|
||||
std::string hex = getexplorerBlockHash(height);
|
||||
uint256 hash = uint256S(hex);
|
||||
return mapBlockIndex[hash];
|
||||
}
|
||||
|
||||
std::string getexplorerBlockHash(int64_t Height)
|
||||
{
|
||||
std::string genesisblockhash = "0000041e482b9b9691d98eefb48473405c0b8ec31b76df3797c74a78680ef818";
|
||||
CBlockIndex* pindexBest = mapBlockIndex[chainActive.Tip()->GetBlockHash()];
|
||||
if ((Height < 0) || (Height > pindexBest->nHeight)) {
|
||||
return genesisblockhash;
|
||||
}
|
||||
|
||||
CBlock block;
|
||||
CBlockIndex* pblockindex = mapBlockIndex[chainActive.Tip()->GetBlockHash()];
|
||||
while (pblockindex->nHeight > Height)
|
||||
pblockindex = pblockindex->pprev;
|
||||
return pblockindex->GetBlockHash().GetHex(); // pblockindex->phashBlock->GetHex();
|
||||
}
|
||||
|
||||
std::string BlockToString(CBlockIndex* pBlock)
|
||||
{
|
||||
if (!pBlock)
|
||||
return "";
|
||||
|
||||
CBlock block;
|
||||
ReadBlockFromDisk(block, pBlock);
|
||||
|
||||
CAmount Fees = 0;
|
||||
CAmount OutVolume = 0;
|
||||
CAmount Reward = 0;
|
||||
|
||||
std::string TxLabels[] = {_("Hash"), _("From"), _("Amount"), _("To"), _("Amount")};
|
||||
|
||||
std::string TxContent = table + makeHTMLTableRow(TxLabels, sizeof(TxLabels) / sizeof(std::string));
|
||||
for (unsigned int i = 0; i < block.vtx.size(); i++) {
|
||||
const CTransaction& tx = block.vtx[i];
|
||||
TxContent += TxToRow(tx);
|
||||
|
||||
CAmount In = getTxIn(tx);
|
||||
CAmount Out = tx.GetValueOut();
|
||||
if (tx.IsCoinBase())
|
||||
Reward += Out;
|
||||
else if (In < 0)
|
||||
Fees = -Params().MaxMoneyOut();
|
||||
else {
|
||||
Fees += In - Out;
|
||||
OutVolume += Out;
|
||||
}
|
||||
}
|
||||
TxContent += "</table>";
|
||||
|
||||
CAmount Generated;
|
||||
if (pBlock->nHeight == 0)
|
||||
Generated = OutVolume;
|
||||
else
|
||||
Generated = GetBlockValue(pBlock->nHeight - 1);
|
||||
|
||||
std::string BlockContentCells[] =
|
||||
{
|
||||
_("Height"), itostr(pBlock->nHeight),
|
||||
_("Size"), itostr(GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION)),
|
||||
_("Number of Transactions"), itostr(block.vtx.size()),
|
||||
_("Value Out"), ValueToString(OutVolume),
|
||||
_("Fees"), ValueToString(Fees),
|
||||
_("Generated"), ValueToString(Generated),
|
||||
_("Timestamp"), TimeToString(block.nTime),
|
||||
_("Difficulty"), strprintf("%.4f", GetDifficulty(pBlock)),
|
||||
_("Bits"), utostr(block.nBits),
|
||||
_("Nonce"), utostr(block.nNonce),
|
||||
_("Version"), itostr(block.nVersion),
|
||||
_("Hash"), "<pre>" + block.GetHash().GetHex() + "</pre>",
|
||||
_("Merkle Root"), "<pre>" + block.hashMerkleRoot.GetHex() + "</pre>",
|
||||
// _("Hash Whole Block"), "<pre>" + block.hashWholeBlock.GetHex() + "</pre>"
|
||||
// _("Miner Signature"), "<pre>" + block.MinerSignature.ToString() + "</pre>"
|
||||
};
|
||||
|
||||
std::string BlockContent = makeHTMLTable(BlockContentCells, sizeof(BlockContentCells) / (2 * sizeof(std::string)), 2);
|
||||
|
||||
std::string Content;
|
||||
Content += "<h2><a class=\"nav\" href=";
|
||||
Content += itostr(pBlock->nHeight - 1);
|
||||
Content += ">◄ </a>";
|
||||
Content += _("Block");
|
||||
Content += " ";
|
||||
Content += itostr(pBlock->nHeight);
|
||||
Content += "<a class=\"nav\" href=";
|
||||
Content += itostr(pBlock->nHeight + 1);
|
||||
Content += "> ►</a></h2>";
|
||||
Content += BlockContent;
|
||||
Content += "</br>";
|
||||
/*
|
||||
if (block.nHeight > getThirdHardforkBlock())
|
||||
{
|
||||
std::vector<std::string> votes[2];
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < block.vvotes[i].size(); j++)
|
||||
{
|
||||
votes[i].push_back(block.vvotes[i][j].hash.ToString() + ':' + itostr(block.vvotes[i][j].n));
|
||||
}
|
||||
}
|
||||
Content += "<h3>" + _("Votes +") + "</h3>";
|
||||
Content += makeHTMLTable(&votes[1][0], votes[1].size(), 1);
|
||||
Content += "</br>";
|
||||
Content += "<h3>" + _("Votes -") + "</h3>";
|
||||
Content += makeHTMLTable(&votes[0][0], votes[0].size(), 1);
|
||||
Content += "</br>";
|
||||
}
|
||||
*/
|
||||
Content += "<h2>" + _("Transactions") + "</h2>";
|
||||
Content += TxContent;
|
||||
|
||||
return Content;
|
||||
}
|
||||
|
||||
std::string TxToString(uint256 BlockHash, const CTransaction& tx)
|
||||
{
|
||||
CAmount Input = 0;
|
||||
CAmount Output = tx.GetValueOut();
|
||||
|
||||
std::string InputsContentCells[] = {_("#"), _("Taken from"), _("Address"), _("Amount")};
|
||||
std::string InputsContent = makeHTMLTableRow(InputsContentCells, sizeof(InputsContentCells) / sizeof(std::string));
|
||||
std::string OutputsContentCells[] = {_("#"), _("Redeemed in"), _("Address"), _("Amount")};
|
||||
std::string OutputsContent = makeHTMLTableRow(OutputsContentCells, sizeof(OutputsContentCells) / sizeof(std::string));
|
||||
|
||||
if (tx.IsCoinBase()) {
|
||||
std::string InputsContentCells[] =
|
||||
{
|
||||
"0",
|
||||
"coinbase",
|
||||
"-",
|
||||
ValueToString(Output)};
|
||||
InputsContent += makeHTMLTableRow(InputsContentCells, sizeof(InputsContentCells) / sizeof(std::string));
|
||||
} else
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++) {
|
||||
COutPoint Out = tx.vin[i].prevout;
|
||||
CTxOut PrevOut = getPrevOut(tx.vin[i].prevout);
|
||||
if (PrevOut.nValue < 0)
|
||||
Input = -Params().MaxMoneyOut();
|
||||
else
|
||||
Input += PrevOut.nValue;
|
||||
std::string InputsContentCells[] =
|
||||
{
|
||||
itostr(i),
|
||||
"<span>" + makeHRef(Out.hash.GetHex()) + ":" + itostr(Out.n) + "</span>",
|
||||
ScriptToString(PrevOut.scriptPubKey, true),
|
||||
ValueToString(PrevOut.nValue)};
|
||||
InputsContent += makeHTMLTableRow(InputsContentCells, sizeof(InputsContentCells) / sizeof(std::string));
|
||||
}
|
||||
|
||||
uint256 TxHash = tx.GetHash();
|
||||
for (unsigned int i = 0; i < tx.vout.size(); i++) {
|
||||
const CTxOut& Out = tx.vout[i];
|
||||
uint256 HashNext = uint256S("0");
|
||||
unsigned int nNext = 0;
|
||||
bool fAddrIndex = false;
|
||||
getNextIn(COutPoint(TxHash, i), HashNext, nNext);
|
||||
std::string OutputsContentCells[] =
|
||||
{
|
||||
itostr(i),
|
||||
(HashNext == uint256S("0")) ? (fAddrIndex ? _("no") : _("unknown")) : "<span>" + makeHRef(HashNext.GetHex()) + ":" + itostr(nNext) + "</span>",
|
||||
ScriptToString(Out.scriptPubKey, true),
|
||||
ValueToString(Out.nValue)};
|
||||
OutputsContent += makeHTMLTableRow(OutputsContentCells, sizeof(OutputsContentCells) / sizeof(std::string));
|
||||
}
|
||||
|
||||
InputsContent = table + InputsContent + "</table>";
|
||||
OutputsContent = table + OutputsContent + "</table>";
|
||||
|
||||
std::string Hash = TxHash.GetHex();
|
||||
|
||||
std::string Labels[] =
|
||||
{
|
||||
_("In Block"), "",
|
||||
_("Size"), itostr(GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION)),
|
||||
_("Input"), tx.IsCoinBase() ? "-" : ValueToString(Input),
|
||||
_("Output"), ValueToString(Output),
|
||||
_("Fees"), tx.IsCoinBase() ? "-" : ValueToString(Input - Output),
|
||||
_("Timestamp"), "",
|
||||
_("Hash"), "<pre>" + Hash + "</pre>",
|
||||
};
|
||||
|
||||
// std::map<uint256, CBlockIndex*>::iterator iter = mapBlockIndex.find(BlockHash);
|
||||
BlockMap::iterator iter = mapBlockIndex.find(BlockHash);
|
||||
if (iter != mapBlockIndex.end()) {
|
||||
CBlockIndex* pIndex = iter->second;
|
||||
Labels[0 * 2 + 1] = makeHRef(itostr(pIndex->nHeight));
|
||||
Labels[5 * 2 + 1] = TimeToString(pIndex->nTime);
|
||||
}
|
||||
|
||||
std::string Content;
|
||||
Content += "<h2>" + _("Transaction") + " <span>" + Hash + "</span></h2>";
|
||||
Content += makeHTMLTable(Labels, sizeof(Labels) / (2 * sizeof(std::string)), 2);
|
||||
Content += "</br>";
|
||||
Content += "<h3>" + _("Inputs") + "</h3>";
|
||||
Content += InputsContent;
|
||||
Content += "</br>";
|
||||
Content += "<h3>" + _("Outputs") + "</h3>";
|
||||
Content += OutputsContent;
|
||||
|
||||
return Content;
|
||||
}
|
||||
|
||||
std::string AddressToString(const CBitcoinAddress& Address)
|
||||
{
|
||||
std::string TxLabels[] =
|
||||
{
|
||||
_("Date"),
|
||||
_("Hash"),
|
||||
_("From"),
|
||||
_("Amount"),
|
||||
_("To"),
|
||||
_("Amount"),
|
||||
_("Delta"),
|
||||
_("Balance")};
|
||||
std::string TxContent = table + makeHTMLTableRow(TxLabels, sizeof(TxLabels) / sizeof(std::string));
|
||||
|
||||
std::set<COutPoint> PrevOuts;
|
||||
/*
|
||||
CScript AddressScript;
|
||||
AddressScript.SetDestination(Address.Get());
|
||||
|
||||
CAmount Sum = 0;
|
||||
bool fAddrIndex = false;
|
||||
|
||||
if (!fAddrIndex)
|
||||
return ""; // it will take too long to find transactions by address
|
||||
else
|
||||
{
|
||||
std::vector<CDiskTxPos> Txs;
|
||||
paddressmap->GetTxs(Txs, AddressScript.GetID());
|
||||
for (const CDiskTxPos& pos : Txs)
|
||||
{
|
||||
CTransaction tx;
|
||||
CBlock block;
|
||||
uint256 bhash = block.GetHash();
|
||||
GetTransaction(pos.nTxOffset, tx, bhash);
|
||||
std::map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(block.GetHash());
|
||||
if (mi == mapBlockIndex.end())
|
||||
continue;
|
||||
CBlockIndex* pindex = (*mi).second;
|
||||
if (!pindex || !chainActive.Contains(pindex))
|
||||
continue;
|
||||
std::string Prepend = "<a href=\"" + itostr(pindex->nHeight) + "\">" + TimeToString(pindex->nTime) + "</a>";
|
||||
TxContent += TxToRow(tx, AddressScript, Prepend, &Sum);
|
||||
}
|
||||
}
|
||||
*/
|
||||
TxContent += "</table>";
|
||||
|
||||
std::string Content;
|
||||
Content += "<h1>" + _("Transactions to/from") + " <span>" + Address.ToString() + "</span></h1>";
|
||||
Content += TxContent;
|
||||
return Content;
|
||||
}
|
||||
|
||||
BlockExplorer::BlockExplorer(QWidget* parent) : QMainWindow(parent),
|
||||
ui(new Ui::BlockExplorer),
|
||||
m_NeverShown(true),
|
||||
m_HistoryIndex(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
this->setStyleSheet(GUIUtil::loadStyleSheet());
|
||||
|
||||
connect(ui->pushSearch, SIGNAL(released()), this, SLOT(onSearch()));
|
||||
connect(ui->content, SIGNAL(linkActivated(const QString&)), this, SLOT(goTo(const QString&)));
|
||||
connect(ui->back, SIGNAL(released()), this, SLOT(back()));
|
||||
connect(ui->forward, SIGNAL(released()), this, SLOT(forward()));
|
||||
}
|
||||
|
||||
BlockExplorer::~BlockExplorer()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void BlockExplorer::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
switch ((Qt::Key)event->key()) {
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
onSearch();
|
||||
return;
|
||||
|
||||
default:
|
||||
return QMainWindow::keyPressEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
void BlockExplorer::showEvent(QShowEvent*)
|
||||
{
|
||||
if (m_NeverShown) {
|
||||
m_NeverShown = false;
|
||||
|
||||
CBlockIndex* pindexBest = mapBlockIndex[chainActive.Tip()->GetBlockHash()];
|
||||
|
||||
setBlock(pindexBest);
|
||||
QString text = QString("%1").arg(pindexBest->nHeight);
|
||||
ui->searchBox->setText(text);
|
||||
m_History.push_back(text);
|
||||
updateNavButtons();
|
||||
|
||||
if (!GetBoolArg("-txindex", true)) {
|
||||
QString Warning = tr("Not all transactions will be shown. To view all transactions you need to set txindex=1 in the configuration file (agrarian.conf).");
|
||||
QMessageBox::warning(this, "Agrarian Core Blockchain Explorer", Warning, QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BlockExplorer::switchTo(const QString& query)
|
||||
{
|
||||
bool IsOk;
|
||||
int64_t AsInt = query.toInt(&IsOk);
|
||||
// If query is integer, get hash from height
|
||||
if (IsOk && AsInt >= 0 && AsInt <= chainActive.Tip()->nHeight) {
|
||||
std::string hex = getexplorerBlockHash(AsInt);
|
||||
uint256 hash = uint256S(hex);
|
||||
CBlockIndex* pIndex = mapBlockIndex[hash];
|
||||
if (pIndex) {
|
||||
setBlock(pIndex);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// If the query is not an integer, assume it is a block hash
|
||||
uint256 hash = uint256S(query.toUtf8().constData());
|
||||
|
||||
// std::map<uint256, CBlockIndex*>::iterator iter = mapBlockIndex.find(hash);
|
||||
BlockMap::iterator iter = mapBlockIndex.find(hash);
|
||||
if (iter != mapBlockIndex.end()) {
|
||||
setBlock(iter->second);
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the query is neither an integer nor a block hash, assume a transaction hash
|
||||
CTransaction tx;
|
||||
uint256 hashBlock = 0;
|
||||
if (GetTransaction(hash, tx, hashBlock, true)) {
|
||||
setContent(TxToString(hashBlock, tx));
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the query is not an integer, nor a block hash, nor a transaction hash, assume an address
|
||||
CBitcoinAddress Address;
|
||||
Address.SetString(query.toUtf8().constData());
|
||||
if (Address.IsValid()) {
|
||||
std::string Content = AddressToString(Address);
|
||||
if (Content.empty())
|
||||
return false;
|
||||
setContent(Content);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BlockExplorer::goTo(const QString& query)
|
||||
{
|
||||
if (switchTo(query)) {
|
||||
ui->searchBox->setText(query);
|
||||
while (m_History.size() > m_HistoryIndex + 1)
|
||||
m_History.pop_back();
|
||||
m_History.push_back(query);
|
||||
m_HistoryIndex = m_History.size() - 1;
|
||||
updateNavButtons();
|
||||
}
|
||||
}
|
||||
|
||||
void BlockExplorer::onSearch()
|
||||
{
|
||||
goTo(ui->searchBox->text());
|
||||
}
|
||||
|
||||
void BlockExplorer::setBlock(CBlockIndex* pBlock)
|
||||
{
|
||||
setContent(BlockToString(pBlock));
|
||||
}
|
||||
|
||||
void BlockExplorer::setContent(const std::string& Content)
|
||||
{
|
||||
QString CSS = "body {font-size:12px; color:#f8f6f6; bgcolor:#5B4C7C;}\n a, span { font-family: monospace; }\n span.addr {color:#5B4C7C; font-weight: bold;}\n table tr td {padding: 3px; border: 1px solid black; background-color: #5B4C7C;}\n td.d0 {font-weight: bold; color:#f8f6f6;}\n h2, h3 { white-space:nowrap; color:#5B4C7C;}\n a { color:#88f6f6; text-decoration:none; }\n a.nav {color:#5B4C7C;}\n";
|
||||
QString FullContent = "<html><head><style type=\"text/css\">" + CSS + "</style></head>" + "<body>" + Content.c_str() + "</body></html>";
|
||||
// printf(FullContent.toUtf8());
|
||||
|
||||
ui->content->setText(FullContent);
|
||||
}
|
||||
|
||||
void BlockExplorer::back()
|
||||
{
|
||||
int NewIndex = m_HistoryIndex - 1;
|
||||
if (0 <= NewIndex && NewIndex < m_History.size()) {
|
||||
m_HistoryIndex = NewIndex;
|
||||
ui->searchBox->setText(m_History[NewIndex]);
|
||||
switchTo(m_History[NewIndex]);
|
||||
updateNavButtons();
|
||||
}
|
||||
}
|
||||
|
||||
void BlockExplorer::forward()
|
||||
{
|
||||
int NewIndex = m_HistoryIndex + 1;
|
||||
if (0 <= NewIndex && NewIndex < m_History.size()) {
|
||||
m_HistoryIndex = NewIndex;
|
||||
ui->searchBox->setText(m_History[NewIndex]);
|
||||
switchTo(m_History[NewIndex]);
|
||||
updateNavButtons();
|
||||
}
|
||||
}
|
||||
|
||||
void BlockExplorer::updateNavButtons()
|
||||
{
|
||||
ui->back->setEnabled(m_HistoryIndex - 1 >= 0);
|
||||
ui->forward->setEnabled(m_HistoryIndex + 1 < m_History.size());
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BLOCKEXPLORER_H
|
||||
#define BLOCKEXPLORER_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "base58.h"
|
||||
#include "uint256.h"
|
||||
#undef loop
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class BlockExplorer;
|
||||
}
|
||||
|
||||
|
||||
class CBlockIndex;
|
||||
class CTransaction;
|
||||
class CBlockTreeDB;
|
||||
|
||||
std::string getexplorerBlockHash(int64_t);
|
||||
const CBlockIndex* getexplorerBlockIndex(int64_t);
|
||||
CTxOut getPrevOut(const COutPoint& out);
|
||||
void getNextIn(const COutPoint* Out, uint256* Hash, unsigned int n);
|
||||
|
||||
class BlockExplorer : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BlockExplorer(QWidget* parent = 0);
|
||||
~BlockExplorer();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void showEvent(QShowEvent*);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onSearch();
|
||||
void goTo(const QString& query);
|
||||
void back();
|
||||
void forward();
|
||||
|
||||
private:
|
||||
Ui::BlockExplorer* ui;
|
||||
bool m_NeverShown;
|
||||
int m_HistoryIndex;
|
||||
QStringList m_History;
|
||||
|
||||
void setBlock(CBlockIndex* pBlock);
|
||||
bool switchTo(const QString& query);
|
||||
void setContent(const std::string& content);
|
||||
void updateNavButtons();
|
||||
};
|
||||
|
||||
#endif // BLOCKEXPLORER_H
|
||||
@@ -0,0 +1,320 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2019 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "clientmodel.h"
|
||||
|
||||
#include "bantablemodel.h"
|
||||
#include "guiconstants.h"
|
||||
#include "peertablemodel.h"
|
||||
|
||||
#include "alert.h"
|
||||
#include "chainparams.h"
|
||||
#include "checkpoints.h"
|
||||
#include "clientversion.h"
|
||||
#include "main.h"
|
||||
#include "masternode-sync.h"
|
||||
#include "masternodeman.h"
|
||||
#include "net.h"
|
||||
#include "netbase.h"
|
||||
#include "guiinterface.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
static const int64_t nClientStartupTime = GetTime();
|
||||
|
||||
ClientModel::ClientModel(OptionsModel* optionsModel, QObject* parent) : QObject(parent),
|
||||
optionsModel(optionsModel),
|
||||
peerTableModel(0),
|
||||
banTableModel(0),
|
||||
cachedNumBlocks(0),
|
||||
cachedMasternodeCountString(""),
|
||||
cachedReindexing(0), cachedImporting(0),
|
||||
numBlocksAtStartup(-1), pollTimer(0)
|
||||
{
|
||||
peerTableModel = new PeerTableModel(this);
|
||||
banTableModel = new BanTableModel(this);
|
||||
pollTimer = new QTimer(this);
|
||||
connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer()));
|
||||
pollTimer->start(MODEL_UPDATE_DELAY);
|
||||
|
||||
pollMnTimer = new QTimer(this);
|
||||
connect(pollMnTimer, SIGNAL(timeout()), this, SLOT(updateMnTimer()));
|
||||
// no need to update as frequent as data for balances/txes/blocks
|
||||
pollMnTimer->start(MODEL_UPDATE_DELAY * 4);
|
||||
|
||||
subscribeToCoreSignals();
|
||||
}
|
||||
|
||||
ClientModel::~ClientModel()
|
||||
{
|
||||
unsubscribeFromCoreSignals();
|
||||
}
|
||||
|
||||
int ClientModel::getNumConnections(unsigned int flags) const
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
if (flags == CONNECTIONS_ALL) // Shortcut if we want total
|
||||
return vNodes.size();
|
||||
|
||||
int nNum = 0;
|
||||
for (CNode* pnode : vNodes)
|
||||
if (flags & (pnode->fInbound ? CONNECTIONS_IN : CONNECTIONS_OUT))
|
||||
nNum++;
|
||||
|
||||
return nNum;
|
||||
}
|
||||
|
||||
QString ClientModel::getMasternodeCountString() const
|
||||
{
|
||||
int ipv4 = 0, ipv6 = 0, onion = 0;
|
||||
mnodeman.CountNetworks(ActiveProtocol(), ipv4, ipv6, onion);
|
||||
int nUnknown = mnodeman.size() - ipv4 - ipv6 - onion;
|
||||
if(nUnknown < 0) nUnknown = 0;
|
||||
return tr("Total: %1 (IPv4: %2 / IPv6: %3 / Tor: %4 / Unknown: %5)").arg(QString::number((int)mnodeman.size())).arg(QString::number((int)ipv4)).arg(QString::number((int)ipv6)).arg(QString::number((int)onion)).arg(QString::number((int)nUnknown));
|
||||
}
|
||||
|
||||
int ClientModel::getNumBlocks() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
return chainActive.Height();
|
||||
}
|
||||
|
||||
int ClientModel::getNumBlocksAtStartup()
|
||||
{
|
||||
if (numBlocksAtStartup == -1) numBlocksAtStartup = getNumBlocks();
|
||||
return numBlocksAtStartup;
|
||||
}
|
||||
|
||||
quint64 ClientModel::getTotalBytesRecv() const
|
||||
{
|
||||
return CNode::GetTotalBytesRecv();
|
||||
}
|
||||
|
||||
quint64 ClientModel::getTotalBytesSent() const
|
||||
{
|
||||
return CNode::GetTotalBytesSent();
|
||||
}
|
||||
|
||||
QDateTime ClientModel::getLastBlockDate() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (chainActive.Tip())
|
||||
return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime());
|
||||
else
|
||||
return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network
|
||||
}
|
||||
|
||||
double ClientModel::getVerificationProgress() const
|
||||
{
|
||||
LOCK(cs_main);
|
||||
return Checkpoints::GuessVerificationProgress(chainActive.Tip());
|
||||
}
|
||||
|
||||
void ClientModel::updateTimer()
|
||||
{
|
||||
// Get required lock upfront. This avoids the GUI from getting stuck on
|
||||
// periodical polls if the core is holding the locks for a longer time -
|
||||
// for example, during a wallet rescan.
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
if (!lockMain)
|
||||
return;
|
||||
// Some quantities (such as number of blocks) change so fast that we don't want to be notified for each change.
|
||||
// Periodically check and update with a timer.
|
||||
int newNumBlocks = getNumBlocks();
|
||||
|
||||
static int prevAttempt = -1;
|
||||
static int prevAssets = -1;
|
||||
|
||||
// check for changed number of blocks we have, number of blocks peers claim to have, reindexing state and importing state
|
||||
if (cachedNumBlocks != newNumBlocks ||
|
||||
cachedReindexing != fReindex || cachedImporting != fImporting ||
|
||||
masternodeSync.RequestedMasternodeAttempt != prevAttempt || masternodeSync.RequestedMasternodeAssets != prevAssets) {
|
||||
cachedNumBlocks = newNumBlocks;
|
||||
cachedReindexing = fReindex;
|
||||
cachedImporting = fImporting;
|
||||
prevAttempt = masternodeSync.RequestedMasternodeAttempt;
|
||||
prevAssets = masternodeSync.RequestedMasternodeAssets;
|
||||
|
||||
emit numBlocksChanged(newNumBlocks);
|
||||
}
|
||||
|
||||
emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
|
||||
}
|
||||
|
||||
void ClientModel::updateMnTimer()
|
||||
{
|
||||
// Get required lock upfront. This avoids the GUI from getting stuck on
|
||||
// periodical polls if the core is holding the locks for a longer time -
|
||||
// for example, during a wallet rescan.
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
if (!lockMain)
|
||||
return;
|
||||
QString newMasternodeCountString = getMasternodeCountString();
|
||||
|
||||
if (cachedMasternodeCountString != newMasternodeCountString) {
|
||||
cachedMasternodeCountString = newMasternodeCountString;
|
||||
|
||||
emit strMasternodesChanged(cachedMasternodeCountString);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientModel::updateNumConnections(int numConnections)
|
||||
{
|
||||
emit numConnectionsChanged(numConnections);
|
||||
}
|
||||
|
||||
void ClientModel::updateAlert(const QString& hash, int status)
|
||||
{
|
||||
// Show error message notification for new alert
|
||||
if (status == CT_NEW) {
|
||||
uint256 hash_256;
|
||||
hash_256.SetHex(hash.toStdString());
|
||||
CAlert alert = CAlert::getAlertByHash(hash_256);
|
||||
if (!alert.IsNull()) {
|
||||
emit message(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), CClientUIInterface::ICON_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
emit alertsChanged(getStatusBarWarnings());
|
||||
}
|
||||
|
||||
bool ClientModel::inInitialBlockDownload() const
|
||||
{
|
||||
return IsInitialBlockDownload();
|
||||
}
|
||||
|
||||
enum BlockSource ClientModel::getBlockSource() const
|
||||
{
|
||||
if (fReindex)
|
||||
return BLOCK_SOURCE_REINDEX;
|
||||
else if (fImporting)
|
||||
return BLOCK_SOURCE_DISK;
|
||||
else if (getNumConnections() > 0)
|
||||
return BLOCK_SOURCE_NETWORK;
|
||||
|
||||
return BLOCK_SOURCE_NONE;
|
||||
}
|
||||
|
||||
QString ClientModel::getStatusBarWarnings() const
|
||||
{
|
||||
return QString::fromStdString(GetWarnings("statusbar"));
|
||||
}
|
||||
|
||||
OptionsModel* ClientModel::getOptionsModel()
|
||||
{
|
||||
return optionsModel;
|
||||
}
|
||||
|
||||
PeerTableModel* ClientModel::getPeerTableModel()
|
||||
{
|
||||
return peerTableModel;
|
||||
}
|
||||
|
||||
BanTableModel *ClientModel::getBanTableModel()
|
||||
{
|
||||
return banTableModel;
|
||||
}
|
||||
|
||||
QString ClientModel::formatFullVersion() const
|
||||
{
|
||||
return QString::fromStdString(FormatFullVersion());
|
||||
}
|
||||
|
||||
QString ClientModel::formatBuildDate() const
|
||||
{
|
||||
return QString::fromStdString(CLIENT_DATE);
|
||||
}
|
||||
|
||||
bool ClientModel::isReleaseVersion() const
|
||||
{
|
||||
return CLIENT_VERSION_IS_RELEASE;
|
||||
}
|
||||
|
||||
QString ClientModel::clientName() const
|
||||
{
|
||||
return QString::fromStdString(CLIENT_NAME);
|
||||
}
|
||||
|
||||
QString ClientModel::formatClientStartupTime() const
|
||||
{
|
||||
return QDateTime::fromTime_t(nClientStartupTime).toString();
|
||||
}
|
||||
|
||||
void ClientModel::updateBanlist()
|
||||
{
|
||||
banTableModel->refresh();
|
||||
}
|
||||
|
||||
// Handlers for core signals
|
||||
static void ShowProgress(ClientModel* clientmodel, const std::string& title, int nProgress)
|
||||
{
|
||||
// emits signal "showProgress"
|
||||
QMetaObject::invokeMethod(clientmodel, "showProgress", Qt::QueuedConnection,
|
||||
Q_ARG(QString, QString::fromStdString(title)),
|
||||
Q_ARG(int, nProgress));
|
||||
}
|
||||
|
||||
static void NotifyNumConnectionsChanged(ClientModel* clientmodel, int newNumConnections)
|
||||
{
|
||||
// Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections);
|
||||
QMetaObject::invokeMethod(clientmodel, "updateNumConnections", Qt::QueuedConnection,
|
||||
Q_ARG(int, newNumConnections));
|
||||
}
|
||||
|
||||
static void NotifyAlertChanged(ClientModel* clientmodel, const uint256& hash, ChangeType status)
|
||||
{
|
||||
qDebug() << "NotifyAlertChanged : " + QString::fromStdString(hash.GetHex()) + " status=" + QString::number(status);
|
||||
QMetaObject::invokeMethod(clientmodel, "updateAlert", Qt::QueuedConnection,
|
||||
Q_ARG(QString, QString::fromStdString(hash.GetHex())),
|
||||
Q_ARG(int, status));
|
||||
}
|
||||
|
||||
static void BannedListChanged(ClientModel *clientmodel)
|
||||
{
|
||||
qDebug() << QString("%1: Requesting update for peer banlist").arg(__func__);
|
||||
QMetaObject::invokeMethod(clientmodel, "updateBanlist", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void ClientModel::subscribeToCoreSignals()
|
||||
{
|
||||
// Connect signals to client
|
||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||
uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this));
|
||||
}
|
||||
|
||||
void ClientModel::unsubscribeFromCoreSignals()
|
||||
{
|
||||
// Disconnect signals from client
|
||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||
uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this));
|
||||
}
|
||||
|
||||
bool ClientModel::getTorInfo(std::string& ip_port) const
|
||||
{
|
||||
proxyType onion;
|
||||
if (GetProxy((Network) 3, onion) && IsReachable((Network) 3)) {
|
||||
{
|
||||
LOCK(cs_mapLocalHost);
|
||||
for (const std::pair<const CNetAddr, LocalServiceInfo>& item : mapLocalHost) {
|
||||
if (item.first.IsTor()) {
|
||||
CService addrOnion = CService(item.first.ToString(), item.second.nPort);
|
||||
ip_port = addrOnion.ToStringIPPort();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_CLIENTMODEL_H
|
||||
#define BITCOIN_QT_CLIENTMODEL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDateTime>
|
||||
|
||||
class AddressTableModel;
|
||||
class BanTableModel;
|
||||
class OptionsModel;
|
||||
class PeerTableModel;
|
||||
class TransactionTableModel;
|
||||
|
||||
class CWallet;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDateTime;
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
enum BlockSource {
|
||||
BLOCK_SOURCE_NONE,
|
||||
BLOCK_SOURCE_REINDEX,
|
||||
BLOCK_SOURCE_DISK,
|
||||
BLOCK_SOURCE_NETWORK
|
||||
};
|
||||
|
||||
enum NumConnections {
|
||||
CONNECTIONS_NONE = 0,
|
||||
CONNECTIONS_IN = (1U << 0),
|
||||
CONNECTIONS_OUT = (1U << 1),
|
||||
CONNECTIONS_ALL = (CONNECTIONS_IN | CONNECTIONS_OUT),
|
||||
};
|
||||
|
||||
/** Model for Agrarian network client. */
|
||||
class ClientModel : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ClientModel(OptionsModel* optionsModel, QObject* parent = 0);
|
||||
~ClientModel();
|
||||
|
||||
OptionsModel* getOptionsModel();
|
||||
PeerTableModel* getPeerTableModel();
|
||||
BanTableModel *getBanTableModel();
|
||||
|
||||
//! Return number of connections, default is in- and outbound (total)
|
||||
int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
|
||||
QString getMasternodeCountString() const;
|
||||
int getNumBlocks() const;
|
||||
int getNumBlocksAtStartup();
|
||||
|
||||
quint64 getTotalBytesRecv() const;
|
||||
quint64 getTotalBytesSent() const;
|
||||
|
||||
double getVerificationProgress() const;
|
||||
QDateTime getLastBlockDate() const;
|
||||
|
||||
//! Return true if core is doing initial block download
|
||||
bool inInitialBlockDownload() const;
|
||||
//! Return true if core is importing blocks
|
||||
enum BlockSource getBlockSource() const;
|
||||
//! Return warnings to be displayed in status bar
|
||||
QString getStatusBarWarnings() const;
|
||||
|
||||
QString formatFullVersion() const;
|
||||
QString formatBuildDate() const;
|
||||
bool isReleaseVersion() const;
|
||||
QString clientName() const;
|
||||
QString formatClientStartupTime() const;
|
||||
|
||||
bool getTorInfo(std::string& ip_port) const;
|
||||
|
||||
private:
|
||||
OptionsModel* optionsModel;
|
||||
PeerTableModel* peerTableModel;
|
||||
BanTableModel *banTableModel;
|
||||
|
||||
int cachedNumBlocks;
|
||||
QString cachedMasternodeCountString;
|
||||
bool cachedReindexing;
|
||||
bool cachedImporting;
|
||||
|
||||
int numBlocksAtStartup;
|
||||
|
||||
QTimer* pollTimer;
|
||||
QTimer* pollMnTimer;
|
||||
|
||||
void subscribeToCoreSignals();
|
||||
void unsubscribeFromCoreSignals();
|
||||
|
||||
signals:
|
||||
void numConnectionsChanged(int count);
|
||||
void numBlocksChanged(int count);
|
||||
void strMasternodesChanged(const QString& strMasternodes);
|
||||
void alertsChanged(const QString& warnings);
|
||||
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
|
||||
|
||||
//! Fired when a message should be reported to the user
|
||||
void message(const QString& title, const QString& message, unsigned int style);
|
||||
|
||||
// Show progress dialog e.g. for verifychain
|
||||
void showProgress(const QString& title, int nProgress);
|
||||
|
||||
public slots:
|
||||
void updateTimer();
|
||||
void updateMnTimer();
|
||||
void updateNumConnections(int numConnections);
|
||||
void updateAlert(const QString& hash, int status);
|
||||
void updateBanlist();
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_CLIENTMODEL_H
|
||||
@@ -0,0 +1,895 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2019 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "coincontroldialog.h"
|
||||
#include "ui_coincontroldialog.h"
|
||||
|
||||
#include "addresstablemodel.h"
|
||||
#include "bitcoinunits.h"
|
||||
#include "guiutil.h"
|
||||
#include "init.h"
|
||||
#include "optionsmodel.h"
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include "coincontrol.h"
|
||||
#include "main.h"
|
||||
#include "obfuscation.h"
|
||||
#include "wallet/wallet.h"
|
||||
#include "multisigdialog.h"
|
||||
|
||||
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QCursor>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFlags>
|
||||
#include <QIcon>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QTreeWidget>
|
||||
|
||||
using namespace std;
|
||||
QList<CAmount> CoinControlDialog::payAmounts;
|
||||
int CoinControlDialog::nSplitBlockDummy;
|
||||
CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
|
||||
|
||||
|
||||
bool CCoinControlWidgetItem::operator<(const QTreeWidgetItem &other) const {
|
||||
int column = treeWidget()->sortColumn();
|
||||
if (column == CoinControlDialog::COLUMN_AMOUNT || column == CoinControlDialog::COLUMN_DATE || column == CoinControlDialog::COLUMN_CONFIRMATIONS)
|
||||
return data(column, Qt::UserRole).toLongLong() < other.data(column, Qt::UserRole).toLongLong();
|
||||
return QTreeWidgetItem::operator<(other);
|
||||
}
|
||||
|
||||
|
||||
CoinControlDialog::CoinControlDialog(QWidget* parent, bool fMultisigEnabled) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
|
||||
ui(new Ui::CoinControlDialog),
|
||||
model(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->fMultisigEnabled = fMultisigEnabled;
|
||||
|
||||
/* Open CSS when configured */
|
||||
this->setStyleSheet(GUIUtil::loadStyleSheet());
|
||||
|
||||
// context menu actions
|
||||
QAction* copyAddressAction = new QAction(tr("Copy address"), this);
|
||||
QAction* copyLabelAction = new QAction(tr("Copy label"), this);
|
||||
QAction* copyAmountAction = new QAction(tr("Copy amount"), this);
|
||||
copyTransactionHashAction = new QAction(tr("Copy transaction ID"), this); // we need to enable/disable this
|
||||
lockAction = new QAction(tr("Lock unspent"), this); // we need to enable/disable this
|
||||
unlockAction = new QAction(tr("Unlock unspent"), this); // we need to enable/disable this
|
||||
|
||||
// context menu
|
||||
contextMenu = new QMenu();
|
||||
contextMenu->addAction(copyAddressAction);
|
||||
contextMenu->addAction(copyLabelAction);
|
||||
contextMenu->addAction(copyAmountAction);
|
||||
contextMenu->addAction(copyTransactionHashAction);
|
||||
contextMenu->addSeparator();
|
||||
contextMenu->addAction(lockAction);
|
||||
contextMenu->addAction(unlockAction);
|
||||
|
||||
// context menu signals
|
||||
connect(ui->treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showMenu(QPoint)));
|
||||
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress()));
|
||||
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
|
||||
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
||||
connect(copyTransactionHashAction, SIGNAL(triggered()), this, SLOT(copyTransactionHash()));
|
||||
connect(lockAction, SIGNAL(triggered()), this, SLOT(lockCoin()));
|
||||
connect(unlockAction, SIGNAL(triggered()), this, SLOT(unlockCoin()));
|
||||
|
||||
// clipboard actions
|
||||
QAction* clipboardQuantityAction = new QAction(tr("Copy quantity"), this);
|
||||
QAction* clipboardAmountAction = new QAction(tr("Copy amount"), this);
|
||||
QAction* clipboardFeeAction = new QAction(tr("Copy fee"), this);
|
||||
QAction* clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
|
||||
QAction* clipboardBytesAction = new QAction(tr("Copy bytes"), this);
|
||||
QAction* clipboardPriorityAction = new QAction(tr("Copy priority"), this);
|
||||
QAction* clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
|
||||
QAction* clipboardChangeAction = new QAction(tr("Copy change"), this);
|
||||
|
||||
connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(clipboardQuantity()));
|
||||
connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(clipboardAmount()));
|
||||
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(clipboardFee()));
|
||||
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(clipboardAfterFee()));
|
||||
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(clipboardBytes()));
|
||||
connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(clipboardPriority()));
|
||||
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(clipboardLowOutput()));
|
||||
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(clipboardChange()));
|
||||
|
||||
ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
|
||||
ui->labelCoinControlAmount->addAction(clipboardAmountAction);
|
||||
ui->labelCoinControlFee->addAction(clipboardFeeAction);
|
||||
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
|
||||
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
|
||||
ui->labelCoinControlPriority->addAction(clipboardPriorityAction);
|
||||
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
|
||||
ui->labelCoinControlChange->addAction(clipboardChangeAction);
|
||||
|
||||
// toggle tree/list mode
|
||||
connect(ui->radioTreeMode, SIGNAL(toggled(bool)), this, SLOT(radioTreeMode(bool)));
|
||||
connect(ui->radioListMode, SIGNAL(toggled(bool)), this, SLOT(radioListMode(bool)));
|
||||
|
||||
// click on checkbox
|
||||
connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(viewItemChanged(QTreeWidgetItem*, int)));
|
||||
|
||||
// click on header
|
||||
ui->treeWidget->header()->setSectionsClickable(true);
|
||||
connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int)));
|
||||
|
||||
// ok button
|
||||
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonBoxClicked(QAbstractButton*)));
|
||||
|
||||
// (un)select all
|
||||
connect(ui->pushButtonSelectAll, SIGNAL(clicked()), this, SLOT(buttonSelectAllClicked()));
|
||||
|
||||
// Toggle lock state
|
||||
connect(ui->pushButtonToggleLock, SIGNAL(clicked()), this, SLOT(buttonToggleLockClicked()));
|
||||
|
||||
// change coin control first column label due Qt4 bug.
|
||||
// see https://github.com/bitcoin/bitcoin/issues/5716
|
||||
ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
|
||||
|
||||
ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 190);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_DATE, 80);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
|
||||
ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100);
|
||||
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but dont show it
|
||||
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it
|
||||
|
||||
// default view is sorted by amount desc
|
||||
sortView(COLUMN_AMOUNT, Qt::DescendingOrder);
|
||||
|
||||
// restore list mode and sortorder as a convenience feature
|
||||
QSettings settings;
|
||||
if (settings.contains("nCoinControlMode") && !settings.value("nCoinControlMode").toBool())
|
||||
ui->radioTreeMode->click();
|
||||
if (settings.contains("nCoinControlSortColumn") && settings.contains("nCoinControlSortOrder"))
|
||||
sortView(settings.value("nCoinControlSortColumn").toInt(), ((Qt::SortOrder)settings.value("nCoinControlSortOrder").toInt()));
|
||||
}
|
||||
|
||||
CoinControlDialog::~CoinControlDialog()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("nCoinControlMode", ui->radioListMode->isChecked());
|
||||
settings.setValue("nCoinControlSortColumn", sortColumn);
|
||||
settings.setValue("nCoinControlSortOrder", (int)sortOrder);
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CoinControlDialog::setModel(WalletModel* model)
|
||||
{
|
||||
this->model = model;
|
||||
|
||||
if (model && model->getOptionsModel() && model->getAddressTableModel()) {
|
||||
updateView();
|
||||
updateLabelLocked();
|
||||
CoinControlDialog::updateLabels(model, this);
|
||||
updateDialogLabels();
|
||||
}
|
||||
}
|
||||
|
||||
// ok button
|
||||
void CoinControlDialog::buttonBoxClicked(QAbstractButton* button)
|
||||
{
|
||||
if (ui->buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole)
|
||||
done(QDialog::Accepted); // closes the dialog
|
||||
}
|
||||
|
||||
// (un)select all
|
||||
void CoinControlDialog::buttonSelectAllClicked()
|
||||
{
|
||||
Qt::CheckState state = Qt::Checked;
|
||||
for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) {
|
||||
if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) != Qt::Unchecked) {
|
||||
state = Qt::Unchecked;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ui->treeWidget->setEnabled(false);
|
||||
for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++)
|
||||
if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) != state)
|
||||
ui->treeWidget->topLevelItem(i)->setCheckState(COLUMN_CHECKBOX, state);
|
||||
ui->treeWidget->setEnabled(true);
|
||||
if (state == Qt::Unchecked)
|
||||
coinControl->UnSelectAll(); // just to be sure
|
||||
CoinControlDialog::updateLabels(model, this);
|
||||
updateDialogLabels();
|
||||
}
|
||||
|
||||
// Toggle lock state
|
||||
void CoinControlDialog::buttonToggleLockClicked()
|
||||
{
|
||||
QTreeWidgetItem* item;
|
||||
// Works in list-mode only
|
||||
if (ui->radioListMode->isChecked()) {
|
||||
ui->treeWidget->setEnabled(false);
|
||||
for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) {
|
||||
item = ui->treeWidget->topLevelItem(i);
|
||||
|
||||
if (item->text(COLUMN_TYPE) == "MultiSig")
|
||||
continue;
|
||||
|
||||
COutPoint outpt(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());
|
||||
if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())) {
|
||||
model->unlockCoin(outpt);
|
||||
item->setDisabled(false);
|
||||
item->setIcon(COLUMN_CHECKBOX, QIcon());
|
||||
} else {
|
||||
model->lockCoin(outpt);
|
||||
item->setDisabled(true);
|
||||
item->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
|
||||
}
|
||||
updateLabelLocked();
|
||||
}
|
||||
ui->treeWidget->setEnabled(true);
|
||||
CoinControlDialog::updateLabels(model, this);
|
||||
updateDialogLabels();
|
||||
} else {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setObjectName("lockMessageBox");
|
||||
msgBox.setStyleSheet(GUIUtil::loadStyleSheet());
|
||||
msgBox.setText(tr("Please switch to \"List mode\" to use this function."));
|
||||
msgBox.exec();
|
||||
}
|
||||
}
|
||||
|
||||
// context menu
|
||||
void CoinControlDialog::showMenu(const QPoint& point)
|
||||
{
|
||||
QTreeWidgetItem* item = ui->treeWidget->itemAt(point);
|
||||
if (item) {
|
||||
contextMenuItem = item;
|
||||
|
||||
// disable some items (like Copy Transaction ID, lock, unlock) for tree roots in context menu
|
||||
if (item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)
|
||||
{
|
||||
copyTransactionHashAction->setEnabled(true);
|
||||
if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())) {
|
||||
lockAction->setEnabled(false);
|
||||
unlockAction->setEnabled(true);
|
||||
} else {
|
||||
lockAction->setEnabled(true);
|
||||
unlockAction->setEnabled(false);
|
||||
}
|
||||
} else // this means click on parent node in tree mode -> disable all
|
||||
{
|
||||
copyTransactionHashAction->setEnabled(false);
|
||||
lockAction->setEnabled(false);
|
||||
unlockAction->setEnabled(false);
|
||||
}
|
||||
|
||||
// show context menu
|
||||
contextMenu->exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
|
||||
// context menu action: copy amount
|
||||
void CoinControlDialog::copyAmount()
|
||||
{
|
||||
GUIUtil::setClipboard(BitcoinUnits::removeSpaces(contextMenuItem->text(COLUMN_AMOUNT)));
|
||||
}
|
||||
|
||||
// context menu action: copy label
|
||||
void CoinControlDialog::copyLabel()
|
||||
{
|
||||
if (ui->radioTreeMode->isChecked() && contextMenuItem->text(COLUMN_LABEL).length() == 0 && contextMenuItem->parent())
|
||||
GUIUtil::setClipboard(contextMenuItem->parent()->text(COLUMN_LABEL));
|
||||
else
|
||||
GUIUtil::setClipboard(contextMenuItem->text(COLUMN_LABEL));
|
||||
}
|
||||
|
||||
// context menu action: copy address
|
||||
void CoinControlDialog::copyAddress()
|
||||
{
|
||||
if (ui->radioTreeMode->isChecked() && contextMenuItem->text(COLUMN_ADDRESS).length() == 0 && contextMenuItem->parent())
|
||||
GUIUtil::setClipboard(contextMenuItem->parent()->text(COLUMN_ADDRESS));
|
||||
else
|
||||
GUIUtil::setClipboard(contextMenuItem->text(COLUMN_ADDRESS));
|
||||
}
|
||||
|
||||
// context menu action: copy transaction id
|
||||
void CoinControlDialog::copyTransactionHash()
|
||||
{
|
||||
GUIUtil::setClipboard(contextMenuItem->text(COLUMN_TXHASH));
|
||||
}
|
||||
|
||||
// context menu action: lock coin
|
||||
void CoinControlDialog::lockCoin()
|
||||
{
|
||||
if (contextMenuItem->checkState(COLUMN_CHECKBOX) == Qt::Checked)
|
||||
contextMenuItem->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||
|
||||
COutPoint outpt(uint256(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt());
|
||||
model->lockCoin(outpt);
|
||||
contextMenuItem->setDisabled(true);
|
||||
contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
|
||||
updateLabelLocked();
|
||||
}
|
||||
|
||||
// context menu action: unlock coin
|
||||
void CoinControlDialog::unlockCoin()
|
||||
{
|
||||
COutPoint outpt(uint256(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt());
|
||||
model->unlockCoin(outpt);
|
||||
contextMenuItem->setDisabled(false);
|
||||
contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon());
|
||||
updateLabelLocked();
|
||||
}
|
||||
|
||||
// copy label "Quantity" to clipboard
|
||||
void CoinControlDialog::clipboardQuantity()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlQuantity->text());
|
||||
}
|
||||
|
||||
// copy label "Amount" to clipboard
|
||||
void CoinControlDialog::clipboardAmount()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" ")));
|
||||
}
|
||||
|
||||
// copy label "Fee" to clipboard
|
||||
void CoinControlDialog::clipboardFee()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", ""));
|
||||
}
|
||||
|
||||
// copy label "After fee" to clipboard
|
||||
void CoinControlDialog::clipboardAfterFee()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", ""));
|
||||
}
|
||||
|
||||
// copy label "Bytes" to clipboard
|
||||
void CoinControlDialog::clipboardBytes()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", ""));
|
||||
}
|
||||
|
||||
// copy label "Priority" to clipboard
|
||||
void CoinControlDialog::clipboardPriority()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
|
||||
}
|
||||
|
||||
// copy label "Dust" to clipboard
|
||||
void CoinControlDialog::clipboardLowOutput()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());
|
||||
}
|
||||
|
||||
// copy label "Change" to clipboard
|
||||
void CoinControlDialog::clipboardChange()
|
||||
{
|
||||
GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", ""));
|
||||
}
|
||||
|
||||
// treeview: sort
|
||||
void CoinControlDialog::sortView(int column, Qt::SortOrder order)
|
||||
{
|
||||
sortColumn = column;
|
||||
sortOrder = order;
|
||||
ui->treeWidget->sortItems(column, order);
|
||||
ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder);
|
||||
}
|
||||
|
||||
// treeview: clicked on header
|
||||
void CoinControlDialog::headerSectionClicked(int logicalIndex)
|
||||
{
|
||||
if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing
|
||||
{
|
||||
ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder);
|
||||
} else {
|
||||
if (sortColumn == logicalIndex)
|
||||
sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder);
|
||||
else {
|
||||
sortColumn = logicalIndex;
|
||||
sortOrder = ((sortColumn == COLUMN_LABEL || sortColumn == COLUMN_ADDRESS) ? Qt::AscendingOrder : Qt::DescendingOrder); // if label or address then default => asc, else default => desc
|
||||
}
|
||||
|
||||
sortView(sortColumn, sortOrder);
|
||||
}
|
||||
}
|
||||
|
||||
// toggle tree mode
|
||||
void CoinControlDialog::radioTreeMode(bool checked)
|
||||
{
|
||||
if (checked && model)
|
||||
updateView();
|
||||
}
|
||||
|
||||
// toggle list mode
|
||||
void CoinControlDialog::radioListMode(bool checked)
|
||||
{
|
||||
if (checked && model)
|
||||
updateView();
|
||||
}
|
||||
|
||||
// checkbox clicked by user
|
||||
void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
|
||||
{
|
||||
if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)
|
||||
{
|
||||
COutPoint outpt(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());
|
||||
|
||||
if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked)
|
||||
coinControl->UnSelect(outpt);
|
||||
else if (item->isDisabled()) // locked (this happens if "check all" through parent node)
|
||||
item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||
else
|
||||
coinControl->Select(outpt);
|
||||
|
||||
// selection changed -> update labels
|
||||
if (ui->treeWidget->isEnabled()){ // do not update on every click for (un)select all
|
||||
CoinControlDialog::updateLabels(model, this);
|
||||
updateDialogLabels();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
|
||||
// Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
|
||||
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
|
||||
{
|
||||
if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)
|
||||
item->setCheckState(COLUMN_CHECKBOX, Qt::Checked);
|
||||
}
|
||||
}
|
||||
|
||||
// return human readable label for priority number
|
||||
QString CoinControlDialog::getPriorityLabel(double dPriority, double mempoolEstimatePriority)
|
||||
{
|
||||
double dPriorityMedium = mempoolEstimatePriority;
|
||||
|
||||
if (dPriorityMedium <= 0)
|
||||
dPriorityMedium = AllowFreeThreshold(); // not enough data, back to hard-coded
|
||||
|
||||
if (dPriority / 1000000 > dPriorityMedium)
|
||||
return tr("highest");
|
||||
else if (dPriority / 100000 > dPriorityMedium)
|
||||
return tr("higher");
|
||||
else if (dPriority / 10000 > dPriorityMedium)
|
||||
return tr("high");
|
||||
else if (dPriority / 1000 > dPriorityMedium)
|
||||
return tr("medium-high");
|
||||
else if (dPriority > dPriorityMedium)
|
||||
return tr("medium");
|
||||
else if (dPriority * 10 > dPriorityMedium)
|
||||
return tr("low-medium");
|
||||
else if (dPriority * 100 > dPriorityMedium)
|
||||
return tr("low");
|
||||
else if (dPriority * 1000 > dPriorityMedium)
|
||||
return tr("lower");
|
||||
else
|
||||
return tr("lowest");
|
||||
}
|
||||
|
||||
// shows count of locked unspent outputs
|
||||
void CoinControlDialog::updateLabelLocked()
|
||||
{
|
||||
vector<COutPoint> vOutpts;
|
||||
model->listLockedCoins(vOutpts);
|
||||
if (vOutpts.size() > 0) {
|
||||
ui->labelLocked->setText(tr("(%1 locked)").arg(vOutpts.size()));
|
||||
ui->labelLocked->setVisible(true);
|
||||
} else
|
||||
ui->labelLocked->setVisible(false);
|
||||
}
|
||||
|
||||
void CoinControlDialog::updateDialogLabels()
|
||||
{
|
||||
|
||||
if (this->parentWidget() == nullptr) {
|
||||
CoinControlDialog::updateLabels(model, this);
|
||||
return;
|
||||
}
|
||||
|
||||
vector<COutPoint> vCoinControl;
|
||||
vector<COutput> vOutputs;
|
||||
coinControl->ListSelected(vCoinControl);
|
||||
model->getOutputs(vCoinControl, vOutputs);
|
||||
|
||||
CAmount nAmount = 0;
|
||||
unsigned int nQuantity = 0;
|
||||
for (const COutput& out : vOutputs) {
|
||||
// unselect already spent, very unlikely scenario, this could happen
|
||||
// when selected are spent elsewhere, like rpc or another computer
|
||||
uint256 txhash = out.tx->GetHash();
|
||||
COutPoint outpt(txhash, out.i);
|
||||
if(model->isSpent(outpt)) {
|
||||
coinControl->UnSelect(outpt);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Quantity
|
||||
nQuantity++;
|
||||
|
||||
// Amount
|
||||
nAmount += out.tx->vout[out.i].nValue;
|
||||
}
|
||||
MultisigDialog* multisigDialog = (MultisigDialog*)this->parentWidget();
|
||||
|
||||
multisigDialog->updateCoinControl(nAmount, nQuantity);
|
||||
}
|
||||
|
||||
void CoinControlDialog::updateLabels(WalletModel* model, QDialog* dialog)
|
||||
{
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
// nPayAmount
|
||||
CAmount nPayAmount = 0;
|
||||
bool fDust = false;
|
||||
CMutableTransaction txDummy;
|
||||
foreach (const CAmount& amount, CoinControlDialog::payAmounts) {
|
||||
nPayAmount += amount;
|
||||
|
||||
if (amount > 0) {
|
||||
CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
|
||||
txDummy.vout.push_back(txout);
|
||||
if (txout.IsDust(::minRelayTxFee))
|
||||
fDust = true;
|
||||
}
|
||||
}
|
||||
|
||||
QString sPriorityLabel = tr("none");
|
||||
CAmount nAmount = 0;
|
||||
CAmount nPayFee = 0;
|
||||
CAmount nAfterFee = 0;
|
||||
CAmount nChange = 0;
|
||||
unsigned int nBytes = 0;
|
||||
unsigned int nBytesInputs = 0;
|
||||
double dPriority = 0;
|
||||
double dPriorityInputs = 0;
|
||||
unsigned int nQuantity = 0;
|
||||
int nQuantityUncompressed = 0;
|
||||
bool fAllowFree = false;
|
||||
|
||||
vector<COutPoint> vCoinControl;
|
||||
vector<COutput> vOutputs;
|
||||
coinControl->ListSelected(vCoinControl);
|
||||
model->getOutputs(vCoinControl, vOutputs);
|
||||
|
||||
for (const COutput& out : vOutputs) {
|
||||
// unselect already spent, very unlikely scenario, this could happen
|
||||
// when selected are spent elsewhere, like rpc or another computer
|
||||
uint256 txhash = out.tx->GetHash();
|
||||
COutPoint outpt(txhash, out.i);
|
||||
if (model->isSpent(outpt)) {
|
||||
coinControl->UnSelect(outpt);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Quantity
|
||||
nQuantity++;
|
||||
|
||||
// Amount
|
||||
nAmount += out.tx->vout[out.i].nValue;
|
||||
|
||||
// Priority
|
||||
dPriorityInputs += (double)out.tx->vout[out.i].nValue * (out.nDepth + 1);
|
||||
|
||||
// Bytes
|
||||
CTxDestination address;
|
||||
if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) {
|
||||
CPubKey pubkey;
|
||||
CKeyID* keyid = boost::get<CKeyID>(&address);
|
||||
if (keyid && model->getPubKey(*keyid, pubkey)) {
|
||||
nBytesInputs += (pubkey.IsCompressed() ? 148 : 180);
|
||||
if (!pubkey.IsCompressed())
|
||||
nQuantityUncompressed++;
|
||||
} else
|
||||
nBytesInputs += 148; // in all error cases, simply assume 148 here
|
||||
} else
|
||||
nBytesInputs += 148;
|
||||
}
|
||||
|
||||
// calculation
|
||||
if (nQuantity > 0) {
|
||||
// Bytes
|
||||
nBytes = nBytesInputs + ((CoinControlDialog::payAmounts.size() > 0 ? CoinControlDialog::payAmounts.size() + max(1, CoinControlDialog::nSplitBlockDummy) : 2) * 34) + 10; // always assume +1 output for change here
|
||||
|
||||
// Priority
|
||||
double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
|
||||
dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
|
||||
sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority);
|
||||
|
||||
// Fee
|
||||
nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
|
||||
|
||||
// IX Fee
|
||||
if (coinControl->useSwiftTX) nPayFee = max(nPayFee, CENT);
|
||||
// Allow free?
|
||||
double dPriorityNeeded = mempoolEstimatePriority;
|
||||
if (dPriorityNeeded <= 0)
|
||||
dPriorityNeeded = AllowFreeThreshold(); // not enough data, back to hard-coded
|
||||
fAllowFree = (dPriority >= dPriorityNeeded);
|
||||
|
||||
if (fSendFreeTransactions)
|
||||
if (fAllowFree && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE)
|
||||
nPayFee = 0;
|
||||
|
||||
if (nPayAmount > 0) {
|
||||
nChange = nAmount - nPayFee - nPayAmount;
|
||||
|
||||
// Never create dust outputs; if we would, just add the dust to the fee.
|
||||
if (nChange > 0 && nChange < CENT) {
|
||||
CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0));
|
||||
if (txout.IsDust(::minRelayTxFee)) {
|
||||
nPayFee += nChange;
|
||||
nChange = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (nChange == 0)
|
||||
nBytes -= 34;
|
||||
}
|
||||
|
||||
// after fee
|
||||
nAfterFee = nAmount - nPayFee;
|
||||
if (nAfterFee < 0)
|
||||
nAfterFee = 0;
|
||||
}
|
||||
|
||||
// actually update labels
|
||||
int nDisplayUnit = BitcoinUnits::AGR;
|
||||
if (model && model->getOptionsModel())
|
||||
nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
||||
|
||||
QLabel* l1 = dialog->findChild<QLabel*>("labelCoinControlQuantity");
|
||||
QLabel* l2 = dialog->findChild<QLabel*>("labelCoinControlAmount");
|
||||
QLabel* l3 = dialog->findChild<QLabel*>("labelCoinControlFee");
|
||||
QLabel* l4 = dialog->findChild<QLabel*>("labelCoinControlAfterFee");
|
||||
QLabel* l5 = dialog->findChild<QLabel*>("labelCoinControlBytes");
|
||||
QLabel* l6 = dialog->findChild<QLabel*>("labelCoinControlPriority");
|
||||
QLabel* l7 = dialog->findChild<QLabel*>("labelCoinControlLowOutput");
|
||||
QLabel* l8 = dialog->findChild<QLabel*>("labelCoinControlChange");
|
||||
|
||||
// enable/disable "dust" and "change"
|
||||
dialog->findChild<QLabel*>("labelCoinControlLowOutputText")->setEnabled(nPayAmount > 0);
|
||||
dialog->findChild<QLabel*>("labelCoinControlLowOutput")->setEnabled(nPayAmount > 0);
|
||||
dialog->findChild<QLabel*>("labelCoinControlChangeText")->setEnabled(nPayAmount > 0);
|
||||
dialog->findChild<QLabel*>("labelCoinControlChange")->setEnabled(nPayAmount > 0);
|
||||
|
||||
// stats
|
||||
l1->setText(QString::number(nQuantity)); // Quantity
|
||||
l2->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount
|
||||
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
|
||||
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
|
||||
l5->setText(((nBytes > 0) ? "~" : "") + QString::number(nBytes)); // Bytes
|
||||
l6->setText(sPriorityLabel); // Priority
|
||||
l7->setText(fDust ? tr("yes") : tr("no")); // Dust
|
||||
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
|
||||
if (nPayFee > 0 && !(payTxFee.GetFeePerK() > 0 && fPayAtLeastCustomFee && nBytes < 1000)) {
|
||||
l3->setText("~" + l3->text());
|
||||
l4->setText("~" + l4->text());
|
||||
if (nChange > 0)
|
||||
l8->setText("~" + l8->text());
|
||||
}
|
||||
|
||||
// turn labels "red"
|
||||
l5->setStyleSheet((nBytes >= MAX_FREE_TRANSACTION_CREATE_SIZE) ? "color:red;" : ""); // Bytes >= 1000
|
||||
l6->setStyleSheet((dPriority > 0 && !fAllowFree) ? "color:red;" : ""); // Priority < "medium"
|
||||
l7->setStyleSheet((fDust) ? "color:red;" : ""); // Dust = "yes"
|
||||
|
||||
// tool tips
|
||||
QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
|
||||
toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />";
|
||||
toolTip1 += tr("Can vary +/- 1 byte per input.");
|
||||
|
||||
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
|
||||
toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
|
||||
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK()));
|
||||
|
||||
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
|
||||
|
||||
// how many satoshis the estimated fee can vary per byte we guess wrong
|
||||
double dFeeVary;
|
||||
if (payTxFee.GetFeePerK() > 0)
|
||||
dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
|
||||
else
|
||||
dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK()) / 1000;
|
||||
QString toolTip4 = tr("Can vary +/- %1 uagr per input.").arg(dFeeVary);
|
||||
|
||||
l3->setToolTip(toolTip4);
|
||||
l4->setToolTip(toolTip4);
|
||||
l5->setToolTip(toolTip1);
|
||||
l6->setToolTip(toolTip2);
|
||||
l7->setToolTip(toolTip3);
|
||||
l8->setToolTip(toolTip4);
|
||||
dialog->findChild<QLabel*>("labelCoinControlFeeText")->setToolTip(l3->toolTip());
|
||||
dialog->findChild<QLabel*>("labelCoinControlAfterFeeText")->setToolTip(l4->toolTip());
|
||||
dialog->findChild<QLabel*>("labelCoinControlBytesText")->setToolTip(l5->toolTip());
|
||||
dialog->findChild<QLabel*>("labelCoinControlPriorityText")->setToolTip(l6->toolTip());
|
||||
dialog->findChild<QLabel*>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
|
||||
dialog->findChild<QLabel*>("labelCoinControlChangeText")->setToolTip(l8->toolTip());
|
||||
|
||||
// Insufficient funds
|
||||
QLabel* label = dialog->findChild<QLabel*>("labelCoinControlInsuffFunds");
|
||||
if (label)
|
||||
label->setVisible(nChange < 0);
|
||||
}
|
||||
|
||||
void CoinControlDialog::updateView()
|
||||
{
|
||||
if (!model || !model->getOptionsModel() || !model->getAddressTableModel())
|
||||
return;
|
||||
|
||||
bool treeMode = ui->radioTreeMode->isChecked();
|
||||
|
||||
ui->treeWidget->clear();
|
||||
ui->treeWidget->setEnabled(false); // performance, otherwise updateLabels would be called for every checked checkbox
|
||||
ui->treeWidget->setAlternatingRowColors(!treeMode);
|
||||
QFlags<Qt::ItemFlag> flgCheckbox = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
|
||||
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
|
||||
|
||||
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
||||
double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
|
||||
|
||||
map<QString, vector<COutput>> mapCoins;
|
||||
model->listCoins(mapCoins);
|
||||
|
||||
for (PAIRTYPE(QString, vector<COutput>) coins : mapCoins) {
|
||||
CCoinControlWidgetItem* itemWalletAddress = new CCoinControlWidgetItem();
|
||||
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||
QString sWalletAddress = coins.first;
|
||||
QString sWalletLabel = model->getAddressTableModel()->labelForAddress(sWalletAddress);
|
||||
if (sWalletLabel.isEmpty())
|
||||
sWalletLabel = tr("(no label)");
|
||||
|
||||
if (treeMode) {
|
||||
// wallet address
|
||||
ui->treeWidget->addTopLevelItem(itemWalletAddress);
|
||||
|
||||
itemWalletAddress->setFlags(flgTristate);
|
||||
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||
|
||||
// label
|
||||
itemWalletAddress->setText(COLUMN_LABEL, sWalletLabel);
|
||||
itemWalletAddress->setToolTip(COLUMN_LABEL, sWalletLabel);
|
||||
|
||||
// address
|
||||
itemWalletAddress->setText(COLUMN_ADDRESS, sWalletAddress);
|
||||
itemWalletAddress->setToolTip(COLUMN_ADDRESS, sWalletAddress);
|
||||
}
|
||||
|
||||
CAmount nSum = 0;
|
||||
double dPrioritySum = 0;
|
||||
int nChildren = 0;
|
||||
int nInputSum = 0;
|
||||
for(const COutput& out: coins.second) {
|
||||
isminetype mine = pwalletMain->IsMine(out.tx->vout[out.i]);
|
||||
bool fMultiSigUTXO = (mine & ISMINE_MULTISIG);
|
||||
// when multisig is enabled, it will only display outputs from multisig addresses
|
||||
if (fMultisigEnabled && !fMultiSigUTXO)
|
||||
continue;
|
||||
int nInputSize = 0;
|
||||
nSum += out.tx->vout[out.i].nValue;
|
||||
nChildren++;
|
||||
|
||||
CCoinControlWidgetItem* itemOutput;
|
||||
if (treeMode)
|
||||
itemOutput = new CCoinControlWidgetItem(itemWalletAddress);
|
||||
else
|
||||
itemOutput = new CCoinControlWidgetItem(ui->treeWidget);
|
||||
itemOutput->setFlags(flgCheckbox);
|
||||
itemOutput->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||
|
||||
//MultiSig
|
||||
if (fMultiSigUTXO) {
|
||||
itemOutput->setText(COLUMN_TYPE, "MultiSig");
|
||||
|
||||
if (!fMultisigEnabled) {
|
||||
COutPoint outpt(out.tx->GetHash(), out.i);
|
||||
coinControl->UnSelect(outpt); // just to be sure
|
||||
itemOutput->setDisabled(true);
|
||||
itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
|
||||
}
|
||||
} else {
|
||||
itemOutput->setText(COLUMN_TYPE, "Personal");
|
||||
}
|
||||
|
||||
// address
|
||||
CTxDestination outputAddress;
|
||||
QString sAddress = "";
|
||||
if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress)) {
|
||||
sAddress = QString::fromStdString(CBitcoinAddress(outputAddress).ToString());
|
||||
|
||||
// if listMode or change => show Agrarian address. In tree mode, address is not shown again for direct wallet address outputs
|
||||
if (!treeMode || (!(sAddress == sWalletAddress)))
|
||||
itemOutput->setText(COLUMN_ADDRESS, sAddress);
|
||||
|
||||
itemOutput->setToolTip(COLUMN_ADDRESS, sAddress);
|
||||
|
||||
CPubKey pubkey;
|
||||
CKeyID* keyid = boost::get<CKeyID>(&outputAddress);
|
||||
if (keyid && model->getPubKey(*keyid, pubkey) && !pubkey.IsCompressed())
|
||||
nInputSize = 29; // 29 = 180 - 151 (public key is 180 bytes, priority free area is 151 bytes)
|
||||
}
|
||||
|
||||
// label
|
||||
if (!(sAddress == sWalletAddress)) // change
|
||||
{
|
||||
// tooltip from where the change comes from
|
||||
itemOutput->setToolTip(COLUMN_LABEL, tr("change from %1 (%2)").arg(sWalletLabel).arg(sWalletAddress));
|
||||
itemOutput->setText(COLUMN_LABEL, tr("(change)"));
|
||||
} else if (!treeMode) {
|
||||
QString sLabel = model->getAddressTableModel()->labelForAddress(sAddress);
|
||||
if (sLabel.isEmpty())
|
||||
sLabel = tr("(no label)");
|
||||
itemOutput->setText(COLUMN_LABEL, sLabel);
|
||||
}
|
||||
|
||||
// amount
|
||||
itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
|
||||
itemOutput->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
|
||||
itemOutput->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong) out.tx->vout[out.i].nValue));
|
||||
|
||||
// date
|
||||
itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime()));
|
||||
itemOutput->setToolTip(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime()));
|
||||
itemOutput->setData(COLUMN_DATE, Qt::UserRole, QVariant((qlonglong) out.tx->GetTxTime()));
|
||||
|
||||
// confirmations
|
||||
itemOutput->setText(COLUMN_CONFIRMATIONS, QString::number(out.nDepth));
|
||||
itemOutput->setData(COLUMN_CONFIRMATIONS, Qt::UserRole, QVariant((qlonglong) out.nDepth));
|
||||
|
||||
// priority
|
||||
double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth + 1); // 78 = 2 * 34 + 10
|
||||
itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority));
|
||||
itemOutput->setData(COLUMN_PRIORITY, Qt::UserRole, QVariant((qlonglong) dPriority));
|
||||
dPrioritySum += (double)out.tx->vout[out.i].nValue * (out.nDepth + 1);
|
||||
nInputSum += nInputSize;
|
||||
|
||||
// transaction hash
|
||||
uint256 txhash = out.tx->GetHash();
|
||||
itemOutput->setText(COLUMN_TXHASH, QString::fromStdString(txhash.GetHex()));
|
||||
|
||||
// vout index
|
||||
itemOutput->setText(COLUMN_VOUT_INDEX, QString::number(out.i));
|
||||
|
||||
// disable locked coins
|
||||
if (model->isLockedCoin(txhash, out.i)) {
|
||||
COutPoint outpt(txhash, out.i);
|
||||
coinControl->UnSelect(outpt); // just to be sure
|
||||
itemOutput->setDisabled(true);
|
||||
itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
|
||||
}
|
||||
|
||||
// set checkbox
|
||||
if (coinControl->IsSelected(txhash, out.i))
|
||||
itemOutput->setCheckState(COLUMN_CHECKBOX, Qt::Checked);
|
||||
}
|
||||
|
||||
// amount
|
||||
if (treeMode) {
|
||||
dPrioritySum = dPrioritySum / (nInputSum + 78);
|
||||
itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
|
||||
itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
|
||||
itemWalletAddress->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
|
||||
itemWalletAddress->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong) nSum));
|
||||
itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority));
|
||||
itemWalletAddress->setData(COLUMN_PRIORITY, Qt::UserRole, QVariant((qlonglong) dPrioritySum));
|
||||
}
|
||||
}
|
||||
|
||||
// expand all partially selected
|
||||
if (treeMode) {
|
||||
for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++)
|
||||
if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)
|
||||
ui->treeWidget->topLevelItem(i)->setExpanded(true);
|
||||
}
|
||||
|
||||
// sort view
|
||||
sortView(sortColumn, sortOrder);
|
||||
ui->treeWidget->setEnabled(true);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_COINCONTROLDIALOG_H
|
||||
#define BITCOIN_QT_COINCONTROLDIALOG_H
|
||||
|
||||
#include "amount.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QAction>
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QPoint>
|
||||
#include <QString>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
class WalletModel;
|
||||
|
||||
class MultisigDialog;
|
||||
class CCoinControl;
|
||||
class CTxMemPool;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CoinControlDialog;
|
||||
}
|
||||
|
||||
class CCoinControlWidgetItem : public QTreeWidgetItem
|
||||
{
|
||||
public:
|
||||
explicit CCoinControlWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
|
||||
explicit CCoinControlWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
|
||||
explicit CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
|
||||
|
||||
bool operator<(const QTreeWidgetItem &other) const;
|
||||
};
|
||||
|
||||
class CoinControlDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoinControlDialog(QWidget* parent = nullptr, bool fMultisigEnabled = false);
|
||||
~CoinControlDialog();
|
||||
|
||||
void setModel(WalletModel* model);
|
||||
void updateDialogLabels();
|
||||
|
||||
// static because also called from sendcoinsdialog
|
||||
static void updateLabels(WalletModel*, QDialog*);
|
||||
static QString getPriorityLabel(double dPriority, double mempoolEstimatePriority);
|
||||
|
||||
static QList<CAmount> payAmounts;
|
||||
static CCoinControl* coinControl;
|
||||
static int nSplitBlockDummy;
|
||||
|
||||
private:
|
||||
Ui::CoinControlDialog* ui;
|
||||
WalletModel* model;
|
||||
int sortColumn;
|
||||
Qt::SortOrder sortOrder;
|
||||
bool fMultisigEnabled;
|
||||
|
||||
QMenu* contextMenu;
|
||||
QTreeWidgetItem* contextMenuItem;
|
||||
QAction* copyTransactionHashAction;
|
||||
QAction* lockAction;
|
||||
QAction* unlockAction;
|
||||
|
||||
void sortView(int, Qt::SortOrder);
|
||||
void updateView();
|
||||
|
||||
enum {
|
||||
COLUMN_CHECKBOX,
|
||||
COLUMN_AMOUNT,
|
||||
COLUMN_LABEL,
|
||||
COLUMN_ADDRESS,
|
||||
COLUMN_TYPE,
|
||||
COLUMN_DATE,
|
||||
COLUMN_CONFIRMATIONS,
|
||||
COLUMN_PRIORITY,
|
||||
COLUMN_TXHASH,
|
||||
COLUMN_VOUT_INDEX,
|
||||
};
|
||||
friend class CCoinControlWidgetItem;
|
||||
|
||||
private slots:
|
||||
void showMenu(const QPoint&);
|
||||
void copyAmount();
|
||||
void copyLabel();
|
||||
void copyAddress();
|
||||
void copyTransactionHash();
|
||||
void lockCoin();
|
||||
void unlockCoin();
|
||||
void clipboardQuantity();
|
||||
void clipboardAmount();
|
||||
void clipboardFee();
|
||||
void clipboardAfterFee();
|
||||
void clipboardBytes();
|
||||
void clipboardPriority();
|
||||
void clipboardLowOutput();
|
||||
void clipboardChange();
|
||||
void radioTreeMode(bool);
|
||||
void radioListMode(bool);
|
||||
void viewItemChanged(QTreeWidgetItem*, int);
|
||||
void headerSectionClicked(int);
|
||||
void buttonBoxClicked(QAbstractButton*);
|
||||
void buttonSelectAllClicked();
|
||||
void buttonToggleLockClicked();
|
||||
void updateLabelLocked();
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_COINCONTROLDIALOG_H
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "coincontroltreewidget.h"
|
||||
#include "coincontroldialog.h"
|
||||
|
||||
CoinControlTreeWidget::CoinControlTreeWidget(QWidget* parent) : QTreeWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void CoinControlTreeWidget::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Space) // press spacebar -> select checkbox
|
||||
{
|
||||
event->ignore();
|
||||
int COLUMN_CHECKBOX = 0;
|
||||
if (this->currentItem())
|
||||
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
|
||||
} else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
|
||||
{
|
||||
event->ignore();
|
||||
CoinControlDialog* coinControlDialog = (CoinControlDialog*)this->parentWidget();
|
||||
coinControlDialog->done(QDialog::Accepted);
|
||||
} else {
|
||||
this->QTreeWidget::keyPressEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_COINCONTROLTREEWIDGET_H
|
||||
#define BITCOIN_QT_COINCONTROLTREEWIDGET_H
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QTreeWidget>
|
||||
|
||||
class CoinControlTreeWidget : public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoinControlTreeWidget(QWidget* parent = 0);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent* event);
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_COINCONTROLTREEWIDGET_H
|
||||
@@ -0,0 +1,85 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "csvmodelwriter.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
CSVModelWriter::CSVModelWriter(const QString& filename, QObject* parent) : QObject(parent),
|
||||
filename(filename), model(0)
|
||||
{
|
||||
}
|
||||
|
||||
void CSVModelWriter::setModel(const QAbstractItemModel* model)
|
||||
{
|
||||
this->model = model;
|
||||
}
|
||||
|
||||
void CSVModelWriter::addColumn(const QString& title, int column, int role)
|
||||
{
|
||||
Column col;
|
||||
col.title = title;
|
||||
col.column = column;
|
||||
col.role = role;
|
||||
|
||||
columns.append(col);
|
||||
}
|
||||
|
||||
static void writeValue(QTextStream& f, const QString& value)
|
||||
{
|
||||
QString escaped = value;
|
||||
escaped.replace('"', "\"\"");
|
||||
f << "\"" << escaped << "\"";
|
||||
}
|
||||
|
||||
static void writeSep(QTextStream& f)
|
||||
{
|
||||
f << ",";
|
||||
}
|
||||
|
||||
static void writeNewline(QTextStream& f)
|
||||
{
|
||||
f << "\n";
|
||||
}
|
||||
|
||||
bool CSVModelWriter::write()
|
||||
{
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
return false;
|
||||
QTextStream out(&file);
|
||||
|
||||
int numRows = 0;
|
||||
if (model) {
|
||||
numRows = model->rowCount();
|
||||
}
|
||||
|
||||
// Header row
|
||||
for (int i = 0; i < columns.size(); ++i) {
|
||||
if (i != 0) {
|
||||
writeSep(out);
|
||||
}
|
||||
writeValue(out, columns[i].title);
|
||||
}
|
||||
writeNewline(out);
|
||||
|
||||
// Data rows
|
||||
for (int j = 0; j < numRows; ++j) {
|
||||
for (int i = 0; i < columns.size(); ++i) {
|
||||
if (i != 0) {
|
||||
writeSep(out);
|
||||
}
|
||||
QVariant data = model->index(j, columns[i].column).data(columns[i].role);
|
||||
writeValue(out, data.toString());
|
||||
}
|
||||
writeNewline(out);
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
return file.error() == QFile::NoError;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_CSVMODELWRITER_H
|
||||
#define BITCOIN_QT_CSVMODELWRITER_H
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractItemModel;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Export a Qt table model to a CSV file. This is useful for analyzing or post-processing the data in
|
||||
a spreadsheet.
|
||||
*/
|
||||
class CSVModelWriter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CSVModelWriter(const QString& filename, QObject* parent = 0);
|
||||
|
||||
void setModel(const QAbstractItemModel* model);
|
||||
void addColumn(const QString& title, int column, int role = Qt::EditRole);
|
||||
|
||||
/** Perform export of the model to CSV.
|
||||
@returns true on success, false otherwise
|
||||
*/
|
||||
bool write();
|
||||
|
||||
private:
|
||||
QString filename;
|
||||
const QAbstractItemModel* model;
|
||||
|
||||
struct Column {
|
||||
QString title;
|
||||
int column;
|
||||
int role;
|
||||
};
|
||||
QList<Column> columns;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_CSVMODELWRITER_H
|
||||
@@ -0,0 +1,139 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2017 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "editaddressdialog.h"
|
||||
#include "ui_editaddressdialog.h"
|
||||
|
||||
#include "addresstablemodel.h"
|
||||
#include "guiutil.h"
|
||||
|
||||
#include <QDataWidgetMapper>
|
||||
#include <QMessageBox>
|
||||
|
||||
EditAddressDialog::EditAddressDialog(Mode mode, QWidget* parent) : QDialog(parent),
|
||||
ui(new Ui::EditAddressDialog),
|
||||
mapper(0),
|
||||
mode(mode),
|
||||
model(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
GUIUtil::setupAddressWidget(ui->addressEdit, this);
|
||||
|
||||
switch (mode) {
|
||||
case NewReceivingAddress:
|
||||
setWindowTitle(tr("New receiving address"));
|
||||
ui->addressEdit->setEnabled(false);
|
||||
break;
|
||||
case NewSendingAddress:
|
||||
setWindowTitle(tr("New sending address"));
|
||||
break;
|
||||
case EditReceivingAddress:
|
||||
setWindowTitle(tr("Edit receiving address"));
|
||||
ui->addressEdit->setEnabled(false);
|
||||
break;
|
||||
case EditSendingAddress:
|
||||
setWindowTitle(tr("Edit sending address"));
|
||||
break;
|
||||
}
|
||||
|
||||
mapper = new QDataWidgetMapper(this);
|
||||
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
||||
}
|
||||
|
||||
EditAddressDialog::~EditAddressDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void EditAddressDialog::setModel(AddressTableModel* model)
|
||||
{
|
||||
this->model = model;
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
mapper->setModel(model);
|
||||
mapper->addMapping(ui->labelEdit, AddressTableModel::Label);
|
||||
mapper->addMapping(ui->addressEdit, AddressTableModel::Address);
|
||||
}
|
||||
|
||||
void EditAddressDialog::loadRow(int row)
|
||||
{
|
||||
mapper->setCurrentIndex(row);
|
||||
}
|
||||
|
||||
bool EditAddressDialog::saveCurrentRow()
|
||||
{
|
||||
if (!model)
|
||||
return false;
|
||||
|
||||
switch (mode) {
|
||||
case NewReceivingAddress:
|
||||
case NewSendingAddress:
|
||||
address = model->addRow(
|
||||
mode == NewSendingAddress ? AddressTableModel::Send : AddressTableModel::Receive,
|
||||
ui->labelEdit->text(),
|
||||
ui->addressEdit->text());
|
||||
break;
|
||||
case EditReceivingAddress:
|
||||
case EditSendingAddress:
|
||||
if (mapper->submit()) {
|
||||
address = ui->addressEdit->text();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return !address.isEmpty();
|
||||
}
|
||||
|
||||
void EditAddressDialog::accept()
|
||||
{
|
||||
if (!model)
|
||||
return;
|
||||
|
||||
if (!saveCurrentRow()) {
|
||||
switch (model->getEditStatus()) {
|
||||
case AddressTableModel::OK:
|
||||
// Failed with unknown reason. Just reject.
|
||||
break;
|
||||
case AddressTableModel::NO_CHANGES:
|
||||
// No changes were made during edit operation. Just reject.
|
||||
break;
|
||||
case AddressTableModel::INVALID_ADDRESS:
|
||||
QMessageBox::warning(this, windowTitle(),
|
||||
tr("The entered address \"%1\" is not a valid Agrarian address.").arg(ui->addressEdit->text()),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
break;
|
||||
case AddressTableModel::DUPLICATE_ADDRESS:
|
||||
QMessageBox::warning(this, windowTitle(),
|
||||
tr("The entered address \"%1\" is already in the address book.").arg(ui->addressEdit->text()),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
break;
|
||||
case AddressTableModel::WALLET_UNLOCK_FAILURE:
|
||||
QMessageBox::critical(this, windowTitle(),
|
||||
tr("Could not unlock wallet."),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
break;
|
||||
case AddressTableModel::KEY_GENERATION_FAILURE:
|
||||
QMessageBox::critical(this, windowTitle(),
|
||||
tr("New key generation failed."),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
QString EditAddressDialog::getAddress() const
|
||||
{
|
||||
return address;
|
||||
}
|
||||
|
||||
void EditAddressDialog::setAddress(const QString& address)
|
||||
{
|
||||
this->address = address;
|
||||
ui->addressEdit->setText(address);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_EDITADDRESSDIALOG_H
|
||||
#define BITCOIN_QT_EDITADDRESSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class AddressTableModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class EditAddressDialog;
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDataWidgetMapper;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Dialog for editing an address and associated information.
|
||||
*/
|
||||
class EditAddressDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Mode {
|
||||
NewReceivingAddress,
|
||||
NewSendingAddress,
|
||||
EditReceivingAddress,
|
||||
EditSendingAddress
|
||||
};
|
||||
|
||||
explicit EditAddressDialog(Mode mode, QWidget* parent);
|
||||
~EditAddressDialog();
|
||||
|
||||
void setModel(AddressTableModel* model);
|
||||
void loadRow(int row);
|
||||
|
||||
QString getAddress() const;
|
||||
void setAddress(const QString& address);
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
|
||||
private:
|
||||
bool saveCurrentRow();
|
||||
|
||||
Ui::EditAddressDialog* ui;
|
||||
QDataWidgetMapper* mapper;
|
||||
Mode mode;
|
||||
AddressTableModel* model;
|
||||
|
||||
QString address;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_EDITADDRESSDIALOG_H
|
||||
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AddressBookPage</class>
|
||||
<widget class="QWidget" name="AddressBookPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>760</width>
|
||||
<height>380</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelExplanation">
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableView">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>85</green>
|
||||
<blue>85</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Right-click to edit address or label</string>
|
||||
</property>
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="newAddress">
|
||||
<property name="toolTip">
|
||||
<string>Create a new address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&New</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="copyAddress">
|
||||
<property name="toolTip">
|
||||
<string>Copy the currently selected address to the system clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Copy</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deleteAddress">
|
||||
<property name="toolTip">
|
||||
<string>Delete the currently selected address from the list</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Delete</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="exportButton">
|
||||
<property name="toolTip">
|
||||
<string>Export the data in the current tab to a file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Export</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/export</normaloff>:/icons/export</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C&lose</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AskPassphraseDialog</class>
|
||||
<widget class="QDialog" name="AskPassphraseDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>598</width>
|
||||
<height>222</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>550</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Passphrase Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="warningLabel">
|
||||
<property name="text">
|
||||
<string notr="true">Placeholder text</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="passLabel1">
|
||||
<property name="text">
|
||||
<string>Enter passphrase</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="passEdit1">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="passLabel2">
|
||||
<property name="text">
|
||||
<string>New passphrase</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="passEdit2">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="passLabel3">
|
||||
<property name="text">
|
||||
<string>Repeat new passphrase</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="passEdit3">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="capsLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="anonymizationCheckBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>For anonymization, automint, and staking only</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>AskPassphraseDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>AskPassphraseDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,483 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Bip38ToolDialog</class>
|
||||
<widget class="QDialog" name="Bip38ToolDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>334</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>BIP 38 Tool</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabBip38Encrypt">
|
||||
<attribute name="title">
|
||||
<string>&BIP 38 Encrypt</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_SM">
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel_ENC">
|
||||
<property name="text">
|
||||
<string>Enter a Agrarian Address that you would like to encrypt using BIP 38. Enter a passphrase in the middle box. Press encrypt to compute the encrypted private key.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1_ENC">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="addressIn_ENC">
|
||||
<property name="toolTip">
|
||||
<string>The Agrarian address to encrypt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addressBookButton_ENC">
|
||||
<property name="toolTip">
|
||||
<string>Choose previously used address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pasteButton_ENC">
|
||||
<property name="toolTip">
|
||||
<string>Paste address from clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+P</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Passphrase: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="passphraseIn_ENC">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_ENC">
|
||||
<item>
|
||||
<widget class="QLabel" name="encryptedKeyLabel_ENC">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encrypted Key:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="encryptedKeyOut_ENC">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="copyKeyButton_ENC">
|
||||
<property name="toolTip">
|
||||
<string>Copy the current signature to the system clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3_ENC">
|
||||
<item>
|
||||
<widget class="QPushButton" name="encryptKeyButton_ENC">
|
||||
<property name="toolTip">
|
||||
<string>Encrypt the private key for this Agrarian address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encrypt &Key</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton_ENC">
|
||||
<property name="toolTip">
|
||||
<string>Reset all fields</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear &All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1_ENC">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusLabel_ENC">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2_ENC">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabBip38Decrypt">
|
||||
<attribute name="title">
|
||||
<string>&BIP 38 Decrypt</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_VM">
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel_DEC">
|
||||
<property name="text">
|
||||
<string>Enter the BIP 38 encrypted private key. Enter the passphrase in the middle box. Click Decrypt Key to compute the private key. After the key is decrypted, clicking 'Import Address' will add this private key to the wallet.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encrypted Key:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="encryptedKeyIn_DEC">
|
||||
<property name="toolTip">
|
||||
<string>The encrypted private key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pasteButton_DEC">
|
||||
<property name="toolTip">
|
||||
<string>Paste address from clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+P</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Passphrase: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="passphraseIn_DEC">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_DEC">
|
||||
<item>
|
||||
<widget class="QPushButton" name="decryptKeyButton_DEC">
|
||||
<property name="toolTip">
|
||||
<string>Decrypt the entered key using the passphrase</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Decrypt &Key</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton_DEC">
|
||||
<property name="toolTip">
|
||||
<string>Reset all fields</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear &All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1_DEC">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusLabel_DEC">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2_DEC">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Decrypted Key:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="decryptedKeyOut_DEC"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="importAddressButton_DEC">
|
||||
<property name="text">
|
||||
<string>Import Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="addressOut_DEC"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QValidatedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qvalidatedlineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BlockExplorer</class>
|
||||
<widget class="QMainWindow" name="BlockExplorer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Blockchain Explorer</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="back">
|
||||
<property name="text">
|
||||
<string>Back</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/back</normaloff>:/icons/back</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="forward">
|
||||
<property name="text">
|
||||
<string>Forward</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/forward</normaloff>:/icons/forward</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>5</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Address / Block / Transaction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushSearch">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>780</width>
|
||||
<height>489</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="content">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,540 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CoinControlDialog</class>
|
||||
<widget class="QDialog" name="CoinControlDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>954</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Coin Selection</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayoutTop" stretch="0,0,0,0">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayoutCoinControl1">
|
||||
<property name="horizontalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlQuantityText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Quantity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlQuantity">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlBytesText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bytes:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlBytes">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayoutCoinControl2">
|
||||
<property name="horizontalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlAmountText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Amount:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlAmount">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0.00 AGR</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlPriorityText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Priority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlPriority">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>medium</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayoutCoinControl3">
|
||||
<property name="horizontalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlFeeText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fee:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlFee">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0.00 AGR</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlLowOutputText">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dust:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlLowOutput">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>no</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayoutCoinControl4">
|
||||
<property name="horizontalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlAfterFeeText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>After Fee:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlAfterFee">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0.00 AGR</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelCoinControlChangeText">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Change:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelCoinControlChange">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0.00 AGR</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayoutPanel" stretch="0,0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonSelectAll">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(un)select all</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonToggleLock">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>toggle lock state</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioTreeMode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tree mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioListMode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>List mode</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelLocked">
|
||||
<property name="text">
|
||||
<string>(1 locked)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="CoinControlTreeWidget" name="treeWidget">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<attribute name="headerShowSortIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Amount</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Received with label</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Received with address</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Date</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Confirmations</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Confirmed</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Priority</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CoinControlTreeWidget</class>
|
||||
<extends>QTreeWidget</extends>
|
||||
<header>coincontroltreewidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EditAddressDialog</class>
|
||||
<widget class="QDialog" name="EditAddressDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>457</width>
|
||||
<height>126</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Edit Address</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>&Label</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>labelEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="labelEdit">
|
||||
<property name="toolTip">
|
||||
<string>The label associated with this address list entry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>&Address</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>addressEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QValidatedLineEdit" name="addressEdit">
|
||||
<property name="toolTip">
|
||||
<string>The address associated with this address list entry. This can only be modified for sending addresses.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QValidatedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qvalidatedlineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>EditAddressDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>EditAddressDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,340 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GovernancePage</class>
|
||||
<widget class="QWidget" name="GovernancePage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>968</width>
|
||||
<height>457</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="topLayout" stretch="0">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Master" stretch="0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Header">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Header" stretch="1,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderLeft">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GOVERNANCE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderRight">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_BG">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Content">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Content">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>742</width>
|
||||
<height>282</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="proposalGrid">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="UpdateButton">
|
||||
<property name="text">
|
||||
<string>Update Proposals</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_budget_info">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="next_superblock_label">
|
||||
<property name="text">
|
||||
<string>Next super block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="next_superblock_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="blocks_before_super_label">
|
||||
<property name="text">
|
||||
<string>Blocks to next super block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="blocks_before_super_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="time_before_super_label">
|
||||
<property name="text">
|
||||
<string>Days to budget payout (estimate):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="time_before_super_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="alloted_budget_label">
|
||||
<property name="text">
|
||||
<string>Allotted budget:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="alloted_budget_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="unallocated_budget_label">
|
||||
<property name="text">
|
||||
<string>Budget left:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="unallocated_budget_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="masternode_count_label">
|
||||
<property name="text">
|
||||
<string>Masternodes count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="masternode_count_value">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>HelpMessageDialog</class>
|
||||
<widget class="QDialog" name="HelpMessageDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>585</width>
|
||||
<height>488</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Agrarian Core - Command-line options</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="graphic">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../agrarian.qrc">:/images/about</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="helpMessage">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>479</width>
|
||||
<height>213</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="aboutMessage">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="okButton">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>HelpMessageDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>HelpMessageDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Intro</class>
|
||||
<widget class="QDialog" name="Intro">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>674</width>
|
||||
<height>363</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Welcome</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel { font-style:italic; }</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Welcome to Agrarian Core.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>As this is the first time the program is launched, you can choose where Agrarian Core will store its data.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="sizeWarningLabel">
|
||||
<property name="text">
|
||||
<string>Agrarian Core will download and store a copy of the Agrarian block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="dataDirDefault">
|
||||
<property name="text">
|
||||
<string>Use the default data directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="dataDirCustom">
|
||||
<property name="text">
|
||||
<string>Use a custom data directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="dataDirectory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ellipsisButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="freeSpace">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="errorMessage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Intro</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Intro</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,323 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MasternodeList</class>
|
||||
<widget class="QWidget" name="MasternodeList">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>723</width>
|
||||
<height>457</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="topLayout" stretch="0">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Master" stretch="0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Header">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Header" stretch="1,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderLeft">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MASTERNODES</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderRight">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_BG">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Content">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frameList">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_note">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="updateNote">
|
||||
<property name="text">
|
||||
<string>Note: Status of your masternodes in local wallet can potentially be slightly incorrect.<br />Always wait for wallet to sync additional data and then double check from another node<br />if your node should be running but you still see "MISSING" in "Status" field.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidgetMyMasternodes">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>695</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>85</green>
|
||||
<blue>85</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Alias</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Address</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Protocol</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Active</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Last Seen (UTC)</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Pubkey</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startButton">
|
||||
<property name="text">
|
||||
<string>S&tart alias</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startAllButton">
|
||||
<property name="text">
|
||||
<string>Start &all</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startMissingButton">
|
||||
<property name="text">
|
||||
<string>Start &MISSING</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="UpdateButton">
|
||||
<property name="text">
|
||||
<string>&Update status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="autoupdate_label">
|
||||
<property name="text">
|
||||
<string>Status will be updated automatically in (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="secondsLabel">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,325 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MultiSendDialog</class>
|
||||
<widget class="QDialog" name="MultiSendDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>594</width>
|
||||
<height>526</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MultiSend</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Main" stretch="1,1,1,0,1,1,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MultiSend allows you to automatically send up to 100% of your stake or masternode reward to a list of other Agrarian addresses after it matures.
|
||||
To Add: enter percentage to give and Agrarian address to add to the MultiSend vector.
|
||||
To Delete: Enter address to delete and press delete.
|
||||
MultiSend will not be activated unless you have clicked Activate</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Settings">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="multiSendStakeCheckBox">
|
||||
<property name="text">
|
||||
<string>Send For Stakes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="multiSendMasternodeCheckBox">
|
||||
<property name="text">
|
||||
<string>Send For Masternode Rewards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Percentage of stake to send</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Percentage:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="multiSendPercentEdit">
|
||||
<property name="toolTip">
|
||||
<string>Enter whole numbers 1 - 100</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Enter % to Give (1-100)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Address to send portion of stake to</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="multiSendAddressEdit">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Enter Address to Send to</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addressBookButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Choose an address from the address book</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Label:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="labelAddressLabelEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Enter a label for this address to add it to your address book</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Buttons">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="viewButton">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>View MultiSend Vector</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View MultiSend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addButton">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Add to MultiSend Vector</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deleteButton">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Delete Address From MultiSend Vector</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="activateButton">
|
||||
<property name="statusTip">
|
||||
<string>Activate MultiSend</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="disableButton">
|
||||
<property name="statusTip">
|
||||
<string>Deactivate MultiSend</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deactivate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="message">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>180</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="midLineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,821 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MultisigDialog</class>
|
||||
<widget class="QDialog" name="MultisigDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>801</width>
|
||||
<height>515</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Multisignature Address Interactions</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="multisigTabWidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollArea{border: 1px solid #5b4c7c;}</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="addMultisigTab">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Create MultiSignature &Address</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="enterMLayout">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="enterMSpinbox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How many people must sign to verify a transaction</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="enterMLabel">
|
||||
<property name="text">
|
||||
<string>Enter the minimum number of signatures required to sign transactions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addressLabelLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="addressLableLabel">
|
||||
<property name="text">
|
||||
<string>Address Label:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="multisigAddressLabel"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addAddressLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addAddressButton">
|
||||
<property name="toolTip">
|
||||
<string>Add another address that could sign to verify a transaction from the multisig address.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Add Address / Key</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="addAddressLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Local addresses or public keys that can sign:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="addAddressSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="addAddressScrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="addAddressWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>759</width>
|
||||
<height>166</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="addressList"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addMultisigLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addMultisigButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create a new multisig address</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>-3</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C&reate</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/filesave</normaloff>:/icons/filesave</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="addMultisigStatus">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use below to quickly import an address by its redeem. Don't forget to add a label before clicking import!
|
||||
Keep in mind, the wallet will rescan the blockchain to find transactions containing the new address.
|
||||
Please be patient after clicking import.</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="importLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="importAddressButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Import Redeem</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="importRedeem">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="createTransactionTab">
|
||||
<attribute name="title">
|
||||
<string>&Create MultiSignature Tx</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="createTxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addTxInputLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="addTxInputLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inputs:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonCoinControl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Coin Control</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelQuantity">
|
||||
<property name="text">
|
||||
<string>Quantity Selected:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelQuantity_int">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelAmount">
|
||||
<property name="text">
|
||||
<string>Amount:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelAmount_int">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addInputButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add an input to fund the outputs</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add a Raw Input</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/css/default</normaloff>:/css/default</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="txInputsScrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="txInputsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>747</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="inputsList"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="txInputsSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addDestinationLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="addDestinationLabel">
|
||||
<property name="text">
|
||||
<string>Address / Amount:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addDestinationButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add destinations to send AGR to</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add &Destination</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="addDestinationHorizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="destionationsScrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="destinationsScrollAreaContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>747</width>
|
||||
<height>130</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="destinationsList"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="destinationsSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="createButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create a transaction object using the given inputs to the given outputs</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cr&eate</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/export</normaloff>:/icons/export</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="createButtonLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="createButtonStatus">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="signMultisigTransaction">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">txScrollArea:{
|
||||
border: 1px solid #5b4c7c;
|
||||
}
|
||||
keyScrollArea:{
|
||||
border: 1px solid #5b4c7c;
|
||||
}
|
||||
txScrollArea:{
|
||||
border: 1px solid #5b4c7c;
|
||||
}</string>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>&Sign MultiSignature Tx</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="transactionHexLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="transactionHexLabel">
|
||||
<property name="text">
|
||||
<string>Transaction Hex:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="transactionHex">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QPushButton" name="signButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sign the transaction from this wallet or from provided private keys</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>S&ign</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="commitButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>DISABLED until transaction has been signed enough times.</p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Co&mmit</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/send</normaloff>:/icons/send</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="addPrivKeyLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addPrivKeyButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add private keys to sign the transaction with</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Private &Key</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="addPrivKeyLabel">
|
||||
<property name="text">
|
||||
<string>Sign with only private keys (Not Recommened)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="signButtonStatusLabel">
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="signButtonStatus">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="keyScrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="keyScrollAreaContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>755</width>
|
||||
<height>168</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="keyList"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="keySpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ObfuscationConfig</class>
|
||||
<widget class="QDialog" name="ObfuscationConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<height>307</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Configure Obfuscation</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="buttonBasic">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>151</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic Privacy</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonHigh">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>140</y>
|
||||
<width>151</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>High Privacy</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonMax">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>210</y>
|
||||
<width>151</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Maximum Privacy</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>20</y>
|
||||
<width>571</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please select a privacy level.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>70</y>
|
||||
<width>421</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use 2 separate masternodes to mix funds up to 10000 AGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>140</y>
|
||||
<width>411</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use 8 separate masternodes to mix funds up to 10000 AGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>210</y>
|
||||
<width>421</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use 16 separate masternodes</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>100</y>
|
||||
<width>561</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This option is the quickest and will cost about ~0.025 AGR to anonymize 10000 AGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>170</y>
|
||||
<width>561</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This option is moderately fast and will cost about 0.05 AGR to anonymize 10000 AGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>240</y>
|
||||
<width>561</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This is the slowest and most secure option. Using maximum anonymity will cost</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>260</y>
|
||||
<width>561</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.1 AGR per 10000 AGR you anonymize.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>120</y>
|
||||
<width>601</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>190</y>
|
||||
<width>601</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OpenURIDialog</class>
|
||||
<widget class="QDialog" name="OpenURIDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>564</width>
|
||||
<height>109</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Open URI</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Open payment request from URI or file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>URI:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="uriEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectFileButton">
|
||||
<property name="toolTip">
|
||||
<string>Select payment request file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QValidatedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qvalidatedlineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>OpenURIDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>OpenURIDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,845 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OptionsDialog</class>
|
||||
<widget class="QDialog" name="OptionsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>576</width>
|
||||
<height>442</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabMain">
|
||||
<attribute name="title">
|
||||
<string>&Main</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Main">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="bitcoinAtStartup">
|
||||
<property name="toolTip">
|
||||
<string>Automatically start Agrarian after logging in to the system.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Start Agrarian on system login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_Main">
|
||||
<item>
|
||||
<widget class="QLabel" name="databaseCacheLabel">
|
||||
<property name="text">
|
||||
<string>Size of &database cache</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>databaseCache</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="databaseCache"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="databaseCacheUnitLabel">
|
||||
<property name="text">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2_Main">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3_Main">
|
||||
<item>
|
||||
<widget class="QLabel" name="threadsScriptVerifLabel">
|
||||
<property name="text">
|
||||
<string>Number of script &verification threads</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>threadsScriptVerif</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="threadsScriptVerif">
|
||||
<property name="toolTip">
|
||||
<string>(0 = auto, <0 = leave that many cores free)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3_Main">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="verticalZagrOptionsWidget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalZagrOptionsLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalAutomintingLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxZeromintEnable">
|
||||
<property name="toolTip">
|
||||
<string>Enable automatic minting of AGR units to zAGR</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable zAGR Automint</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxZeromintAddresses">
|
||||
<property name="toolTip">
|
||||
<string>Enable automatic zAGR minting from specific addresses</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable Automint Addresses</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalZmintPercentageLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="percentage_label">
|
||||
<property name="toolTip">
|
||||
<string>Percentage of incoming AGR which get automatically converted to zAGR via Zerocoin Protocol (min: 10%)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Percentage of autominted zAGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="zeromintPercentage">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPreferredDenom">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Wait with automatic conversion to Zerocoin until enough AGR for this denomination is available</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preferred Automint zAGR Denomination</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="preferredDenom">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>27</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Wait with automatic conversion to Zerocoin until enough AGR for this denomination is available</string>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="maxCount">
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabWallet">
|
||||
<attribute name="title">
|
||||
<string>W&allet</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Wallet">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_Wallet">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelStakeSplitThresholdText">
|
||||
<property name="text">
|
||||
<string>Stake split threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBoxStakeSplitThreshold">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Expert</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="coinControlFeatures">
|
||||
<property name="toolTip">
|
||||
<string>Whether to show coin control features or not.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable coin &control features</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showMasternodesTab">
|
||||
<property name="toolTip">
|
||||
<string>Show additional tab listing all your masternodes in first sub-tab<br/>and all masternodes on the network in second sub-tab.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Masternodes Tab</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="spendZeroConfChange">
|
||||
<property name="toolTip">
|
||||
<string>If you disable the spending of unconfirmed change, the change from a transaction<br/>cannot be used until that transaction has at least one confirmation.<br/>This also affects how your balance is computed.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Spend unconfirmed change</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_Wallet">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabNetwork">
|
||||
<attribute name="title">
|
||||
<string>&Network</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Network">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mapPortUpnp">
|
||||
<property name="toolTip">
|
||||
<string>Automatically open the Agrarian client port on the router. This only works when your router supports UPnP and it is enabled.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Map port using &UPnP</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="allowIncoming">
|
||||
<property name="toolTip">
|
||||
<string>Accept connections from outside</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Allow incoming connections</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="connectSocks">
|
||||
<property name="toolTip">
|
||||
<string>Connect to the Agrarian network through a SOCKS5 proxy.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Connect through SOCKS5 proxy (default proxy):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1_Network">
|
||||
<item>
|
||||
<widget class="QLabel" name="proxyIpLabel">
|
||||
<property name="text">
|
||||
<string>Proxy &IP:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>proxyIp</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="proxyIp">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="proxyPortLabel">
|
||||
<property name="text">
|
||||
<string>&Port:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>proxyPort</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="proxyPort">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>55</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>55</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Port of the proxy (e.g. 9050)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1_Network">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_Network">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabWindow">
|
||||
<attribute name="title">
|
||||
<string>&Window</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Window">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="minimizeToTray">
|
||||
<property name="toolTip">
|
||||
<string>Show only a tray icon after minimizing the window.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Minimize to the tray instead of the taskbar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="minimizeOnClose">
|
||||
<property name="toolTip">
|
||||
<string>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>M&inimize on close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_Window">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabDisplay">
|
||||
<attribute name="title">
|
||||
<string>&Display</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Display">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1_Display">
|
||||
<item>
|
||||
<widget class="QLabel" name="langLabel">
|
||||
<property name="text">
|
||||
<string>User Interface &language:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>lang</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValueComboBox" name="lang">
|
||||
<property name="toolTip">
|
||||
<string>The user interface language can be set here. This setting will take effect after restarting Agrarian.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Language missing or translation incomplete? Help contributing translations here:
|
||||
https://www.transifex.com/agrarian-project/agrarian-project-translations</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_Display" stretch="0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="themeLabel">
|
||||
<property name="text">
|
||||
<string>User Interface Theme:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValueComboBox" name="theme"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="verticalZagrDisplayWidget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalZagrDisplayLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3_Display">
|
||||
<item>
|
||||
<widget class="QLabel" name="unitLabel">
|
||||
<property name="text">
|
||||
<string>Unit to show amounts in:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValueComboBox" name="unit">
|
||||
<property name="toolTip">
|
||||
<string>Choose the default subdivision unit to show in the interface and when sending coins.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4_Display">
|
||||
<item>
|
||||
<widget class="QLabel" name="digitsLabel">
|
||||
<property name="text">
|
||||
<string>Decimal digits</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValueComboBox" name="digits"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5_Display">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxHideZeroBalances">
|
||||
<property name="toolTip">
|
||||
<string>Hide empty balances</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide empty balances</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxHideOrphans">
|
||||
<property name="toolTip">
|
||||
<string>Hide orphan stakes in transaction lists</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide orphan stakes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6_Display">
|
||||
<item>
|
||||
<widget class="QLabel" name="thirdPartyTxUrlsLabel">
|
||||
<property name="toolTip">
|
||||
<string>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Third party transaction URLs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="thirdPartyTxUrls">
|
||||
<property name="toolTip">
|
||||
<string>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Bottom">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Bottom">
|
||||
<item>
|
||||
<widget class="QLabel" name="overriddenByCommandLineInfoLabel">
|
||||
<property name="text">
|
||||
<string>Active command-line options that override above options:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_Bottom">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="overriddenByCommandLineLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Buttons">
|
||||
<item>
|
||||
<widget class="QPushButton" name="resetButton">
|
||||
<property name="toolTip">
|
||||
<string>Reset all client options to default.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Reset Options</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QValidatedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qvalidatedlineedit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QValueComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>qvaluecombobox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,517 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ReceiveCoinsDialog</class>
|
||||
<widget class="QWidget" name="ReceiveCoinsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>962</width>
|
||||
<height>616</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Master" stretch="0,1">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Header">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Header" stretch="1,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderLeft">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RECEIVE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelOverviewHeaderRight">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>464</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_BG">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Use this form to request payments. All fields are <b>optional</b>.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="toolTip">
|
||||
<string>An optional label to associate with the new receiving address.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Label:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>reqLabel</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="reqLabel">
|
||||
<property name="toolTip">
|
||||
<string>An optional label to associate with the new receiving address.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="toolTip">
|
||||
<string>Your receiving address. You can copy and use it to receive coins on this wallet. A new one will be generated once it is used.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Address:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>reqAddress</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="reqAddress">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Your receiving address. You can copy and use it to receive coins on this wallet. A new one will be generated once it is used.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="toolTip">
|
||||
<string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>A&mount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>reqAmount</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="BitcoinAmountField" name="reqAmount">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="toolTip">
|
||||
<string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Agrarian network.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Message:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>reqMessage</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLineEdit" name="reqMessage">
|
||||
<property name="toolTip">
|
||||
<string>An optional message to attach to the payment request, which will be displayed when the request is opened.<br>Note: The message will not be sent with the payment over the Agrarian network.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QCheckBox" name="reuseAddress">
|
||||
<property name="toolTip">
|
||||
<string>Reuse one of the previously used receiving addresses.<br>Reusing addresses has security and privacy issues.<br>Do not use this unless re-generating a payment request made before.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>R&euse an existing receiving address (not recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="receiveButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Request payment</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear all fields of the form.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="receivingAddressesButton">
|
||||
<property name="text">
|
||||
<string>Receiving Addresses</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Requested payments history</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="recentRequestsView">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>51</red>
|
||||
<green>51</green>
|
||||
<blue>51</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>85</green>
|
||||
<blue>85</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="showRequestButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show the selected request (does the same as double clicking an entry)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeRequestButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove the selected entries from the list</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BitcoinAmountField</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>bitcoinamountfield.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>reqLabel</tabstop>
|
||||
<tabstop>reqAddress</tabstop>
|
||||
<tabstop>reqAmount</tabstop>
|
||||
<tabstop>reqMessage</tabstop>
|
||||
<tabstop>reuseAddress</tabstop>
|
||||
<tabstop>receiveButton</tabstop>
|
||||
<tabstop>clearButton</tabstop>
|
||||
<tabstop>recentRequestsView</tabstop>
|
||||
<tabstop>showRequestButton</tabstop>
|
||||
<tabstop>removeRequestButton</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ReceiveRequestDialog</class>
|
||||
<widget class="QDialog" name="ReceiveRequestDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>487</width>
|
||||
<height>597</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QRImageWidget" name="lblQRCode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>QR Code</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="outUri">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnCopyURI">
|
||||
<property name="text">
|
||||
<string>Copy &URI</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnCopyAddress">
|
||||
<property name="text">
|
||||
<string>Copy &Address</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSaveAs">
|
||||
<property name="text">
|
||||
<string>&Save Image...</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QRImageWidget</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>receiverequestdialog.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ReceiveRequestDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>452</x>
|
||||
<y>573</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>243</x>
|
||||
<y>298</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ReceiveRequestDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>452</x>
|
||||
<y>573</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>243</x>
|
||||
<y>298</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,369 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SignVerifyMessageDialog</class>
|
||||
<widget class="QDialog" name="SignVerifyMessageDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>380</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Signatures - Sign / Verify a Message</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabSignMessage">
|
||||
<attribute name="title">
|
||||
<string>&Sign Message</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_SM">
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel_SM">
|
||||
<property name="text">
|
||||
<string>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1_SM">
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="addressIn_SM">
|
||||
<property name="toolTip">
|
||||
<string>The Agrarian address to sign the message with</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addressBookButton_SM">
|
||||
<property name="toolTip">
|
||||
<string>Choose previously used address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pasteButton_SM">
|
||||
<property name="toolTip">
|
||||
<string>Paste address from clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+P</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="messageIn_SM">
|
||||
<property name="toolTip">
|
||||
<string>Enter the message you want to sign here</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="signatureLabel_SM">
|
||||
<property name="text">
|
||||
<string>Signature</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_SM">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="signatureOut_SM">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="copySignatureButton_SM">
|
||||
<property name="toolTip">
|
||||
<string>Copy the current signature to the system clipboard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3_SM">
|
||||
<item>
|
||||
<widget class="QPushButton" name="signMessageButton_SM">
|
||||
<property name="toolTip">
|
||||
<string>Sign the message to prove you own this Agrarian address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sign &Message</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton_SM">
|
||||
<property name="toolTip">
|
||||
<string>Reset all sign message fields</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear &All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1_SM">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusLabel_SM">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2_SM">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabVerifyMessage">
|
||||
<attribute name="title">
|
||||
<string>&Verify Message</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_VM">
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel_VM">
|
||||
<property name="text">
|
||||
<string>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1_VM">
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="addressIn_VM">
|
||||
<property name="toolTip">
|
||||
<string>The Agrarian address the message was signed with</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addressBookButton_VM">
|
||||
<property name="toolTip">
|
||||
<string>Choose previously used address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="messageIn_VM"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QValidatedLineEdit" name="signatureIn_VM"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2_VM">
|
||||
<item>
|
||||
<widget class="QPushButton" name="verifyMessageButton_VM">
|
||||
<property name="toolTip">
|
||||
<string>Verify the message to ensure it was signed with the specified Agrarian address</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Verify &Message</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton_VM">
|
||||
<property name="toolTip">
|
||||
<string>Reset all verify message fields</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear &All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../agrarian.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_1_VM">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusLabel_VM">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2_VM">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QValidatedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qvalidatedlineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../agrarian.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TransactionDescDialog</class>
|
||||
<widget class="QDialog" name="TransactionDescDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>620</width>
|
||||
<height>250</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Transaction details</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="detailText">
|
||||
<property name="toolTip">
|
||||
<string>This pane shows a detailed description of the transaction</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>TransactionDescDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>TransactionDescDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ZPivControlDialog</class>
|
||||
<widget class="QDialog" name="ZPivControlDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>781</width>
|
||||
<height>450</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>781</width>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Select zAGR to Spend</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<property name="spacing">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelQuantity">
|
||||
<property name="text">
|
||||
<string>Quantity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelQuantity_int">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelZPiv">
|
||||
<property name="text">
|
||||
<string>zAGR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelZPiv_int">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout3" stretch="0,0">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonAll">
|
||||
<property name="text">
|
||||
<string>Select/Deselect All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>100</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Select</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Denomination</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">ID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Version</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Precomputed</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Confirmations</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Spendable?</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ZPivControlDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ZPivControlDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,148 @@
|
||||
// Copyright (c) 2018-2019 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "governancepage.h"
|
||||
#include "ui_governancepage.h"
|
||||
|
||||
#include "activemasternode.h"
|
||||
#include "chainparams.h"
|
||||
#include "clientmodel.h"
|
||||
#include "masternode-budget.h"
|
||||
#include "masternode-sync.h"
|
||||
#include "masternodeconfig.h"
|
||||
#include "masternodeman.h"
|
||||
#include "utilmoneystr.h"
|
||||
#include "walletmodel.h"
|
||||
#include "askpassphrasedialog.h"
|
||||
#include "proposalframe.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <QToolButton>
|
||||
|
||||
GovernancePage::GovernancePage(QWidget* parent) : QWidget(parent),
|
||||
ui(new Ui::GovernancePage),
|
||||
clientModel(0),
|
||||
walletModel(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(updateProposalList()));
|
||||
timer->start(100000);
|
||||
fLockUpdating = false;
|
||||
}
|
||||
|
||||
|
||||
GovernancePage::~GovernancePage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GovernancePage::setClientModel(ClientModel* model)
|
||||
{
|
||||
this->clientModel = model;
|
||||
}
|
||||
|
||||
void GovernancePage::setWalletModel(WalletModel* model)
|
||||
{
|
||||
this->walletModel = model;
|
||||
}
|
||||
|
||||
void GovernancePage::lockUpdating(bool lock)
|
||||
{
|
||||
fLockUpdating = lock;
|
||||
}
|
||||
|
||||
struct sortProposalsByVotes
|
||||
{
|
||||
bool operator() (const CBudgetProposal* left, const CBudgetProposal* right)
|
||||
{
|
||||
if (left != right)
|
||||
return (left->GetYeas() - left->GetNays() > right->GetYeas() - right->GetNays());
|
||||
return (left->nFeeTXHash > right->nFeeTXHash);
|
||||
}
|
||||
};
|
||||
|
||||
void GovernancePage::updateProposalList()
|
||||
{
|
||||
if (fLockUpdating) return;
|
||||
|
||||
QLayoutItem* child;
|
||||
while ((child = ui->proposalGrid->takeAt(0)) != 0) {
|
||||
if (child->widget() != 0)
|
||||
{
|
||||
delete child->widget();
|
||||
}
|
||||
delete child;
|
||||
}
|
||||
|
||||
std::vector<CBudgetProposal*> allotedProposals = budget.GetBudget();
|
||||
CAmount nTotalAllotted = 0;
|
||||
std::vector<CBudgetProposal*> proposalsList = budget.GetAllProposals();
|
||||
std::sort (proposalsList.begin(), proposalsList.end(), sortProposalsByVotes());
|
||||
int nRow = 0;
|
||||
CBlockIndex* pindexPrev;
|
||||
{
|
||||
LOCK(cs_main);
|
||||
pindexPrev = chainActive.Tip();
|
||||
}
|
||||
if (!pindexPrev) return;
|
||||
int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % Params().GetBudgetCycleBlocks() + Params().GetBudgetCycleBlocks();
|
||||
int nBlocksLeft = nBlockStart - pindexPrev->nHeight;
|
||||
int nBlockEnd = nBlockStart + Params().GetBudgetCycleBlocks() - 1;
|
||||
int mnCount = mnodeman.CountEnabled(ActiveProtocol());
|
||||
|
||||
for (CBudgetProposal* pbudgetProposal : proposalsList) {
|
||||
if (!pbudgetProposal->fValid) continue;
|
||||
if (pbudgetProposal->GetRemainingPaymentCount() < 1) continue;
|
||||
|
||||
ProposalFrame* proposalFrame = new ProposalFrame();
|
||||
proposalFrame->setWalletModel(walletModel);
|
||||
proposalFrame->setProposal(pbudgetProposal);
|
||||
proposalFrame->setGovernancePage(this);
|
||||
|
||||
if (std::find(allotedProposals.begin(), allotedProposals.end(), pbudgetProposal) != allotedProposals.end()) {
|
||||
nTotalAllotted += pbudgetProposal->GetAllotted();
|
||||
proposalFrame->setObjectName(QStringLiteral("proposalFramePassing"));
|
||||
} else if (!pbudgetProposal->IsEstablished()) {
|
||||
proposalFrame->setObjectName(QStringLiteral("proposalFrameNotEstablished"));
|
||||
} else if (pbudgetProposal->IsPassing(pindexPrev, nBlockStart, nBlockEnd, mnCount)) {
|
||||
proposalFrame->setObjectName(QStringLiteral("proposalFramePassingUnfunded"));
|
||||
} else {
|
||||
proposalFrame->setObjectName(QStringLiteral("proposalFrame"));
|
||||
}
|
||||
proposalFrame->setFrameShape(QFrame::StyledPanel);
|
||||
|
||||
if (extendedProposal == pbudgetProposal)
|
||||
proposalFrame->extend();
|
||||
proposalFrame->setMaximumHeight(150);
|
||||
ui->proposalGrid->addWidget(proposalFrame, nRow);
|
||||
|
||||
++nRow;
|
||||
}
|
||||
|
||||
ui->next_superblock_value->setText(QString::number(nBlockStart));
|
||||
ui->blocks_before_super_value->setText(QString::number(nBlocksLeft));
|
||||
ui->time_before_super_value->setText(QString::number(nBlocksLeft/60/24));
|
||||
ui->alloted_budget_value->setText(QString::number(nTotalAllotted/COIN));
|
||||
ui->unallocated_budget_value->setText(QString::number((budget.GetTotalBudget(pindexPrev->nHeight) - nTotalAllotted)/COIN));
|
||||
ui->masternode_count_value->setText(QString::number(mnodeman.CountEnabled(ActiveProtocol())));
|
||||
}
|
||||
|
||||
void GovernancePage::setExtendedProposal(CBudgetProposal* proposal)
|
||||
{
|
||||
bool update = false;
|
||||
if (extendedProposal != proposal)
|
||||
update = true;
|
||||
extendedProposal = proposal;
|
||||
if (update)
|
||||
updateProposalList();
|
||||
}
|
||||
|
||||
void GovernancePage::on_UpdateButton_clicked()
|
||||
{
|
||||
updateProposalList();
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// Copyright (c) 2018 The PIVX developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_GOVERNANCEPAGE_H
|
||||
#define BITCOIN_QT_GOVERNANCEPAGE_H
|
||||
|
||||
#include "masternode.h"
|
||||
#include "platformstyle.h"
|
||||
#include "sync.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
class ClientModel;
|
||||
class WalletModel;
|
||||
class CBudgetProposal;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class GovernancePage;
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QModelIndex;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class GovernancePage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GovernancePage(QWidget* parent = 0);
|
||||
~GovernancePage();
|
||||
|
||||
void setClientModel(ClientModel* clientModel);
|
||||
void setWalletModel(WalletModel* walletModel);
|
||||
void setExtendedProposal(CBudgetProposal* proposal);
|
||||
void lockUpdating(bool lock);
|
||||
|
||||
private:
|
||||
QMenu* contextMenu;
|
||||
int64_t nTimeFilterUpdated;
|
||||
bool fFilterUpdated;
|
||||
bool fLockUpdating;
|
||||
|
||||
public Q_SLOTS:
|
||||
void updateProposalList();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
private:
|
||||
QTimer* timer;
|
||||
Ui::GovernancePage* ui;
|
||||
ClientModel* clientModel;
|
||||
WalletModel* walletModel;
|
||||
QString strCurrentFilter;
|
||||
CBudgetProposal* extendedProposal;
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_UpdateButton_clicked();
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_GOVERNANCEPAGE_H
|
||||
@@ -0,0 +1,61 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_GUICONSTANTS_H
|
||||
#define BITCOIN_QT_GUICONSTANTS_H
|
||||
|
||||
/* Milliseconds between model updates */
|
||||
static const int MODEL_UPDATE_DELAY = 1000;
|
||||
|
||||
/* AskPassphraseDialog -- Maximum passphrase length */
|
||||
static const int MAX_PASSPHRASE_SIZE = 1024;
|
||||
|
||||
/* Agrarian GUI -- Size of icons in status bar */
|
||||
static const int STATUSBAR_ICONSIZE = 16;
|
||||
|
||||
static const bool DEFAULT_SPLASHSCREEN = true;
|
||||
|
||||
/* Invalid field background style */
|
||||
#define STYLE_INVALID "background:#FF8080"
|
||||
|
||||
/* Transaction list -- unconfirmed transaction */
|
||||
#define COLOR_UNCONFIRMED QColor(91, 76, 134)
|
||||
/* Transaction list -- negative amount */
|
||||
#define COLOR_NEGATIVE QColor(206, 0, 188)
|
||||
/* Transaction list -- bare address (without label) */
|
||||
#define COLOR_BAREADDRESS QColor(140, 140, 140)
|
||||
/* Transaction list -- TX status decoration - open until date */
|
||||
#define COLOR_TX_STATUS_OPENUNTILDATE QColor(64, 64, 255)
|
||||
/* Transaction list -- TX status decoration - offline */
|
||||
#define COLOR_TX_STATUS_OFFLINE QColor(192, 192, 192)
|
||||
/* Transaction list -- TX status decoration - default color */
|
||||
#define COLOR_BLACK QColor(51, 51, 51)
|
||||
/* Transaction list -- TX status decoration - conflicted */
|
||||
#define COLOR_CONFLICTED QColor(255, 0, 0)
|
||||
/* Transaction list -- TX status decoration - orphan (Light Gray #D3D3D3) */
|
||||
#define COLOR_ORPHAN QColor(211, 211, 211)
|
||||
/* Transaction list -- TX status decoration - stake (BlueViolet #8A2BE2) */
|
||||
#define COLOR_STAKE QColor(138,43,226)
|
||||
/* Tooltips longer than this (in characters) are converted into rich text,
|
||||
so that they can be word-wrapped.
|
||||
*/
|
||||
static const int TOOLTIP_WRAP_THRESHOLD = 80;
|
||||
|
||||
/* Maximum allowed URI length */
|
||||
static const int MAX_URI_LENGTH = 255;
|
||||
|
||||
/* QRCodeDialog -- size of exported QR Code image */
|
||||
#define EXPORT_IMAGE_SIZE 256
|
||||
|
||||
/* Number of frames in spinner animation */
|
||||
#define SPINNER_FRAMES 35
|
||||
|
||||
#define QAPP_ORG_NAME "Agrarian"
|
||||
#define QAPP_ORG_DOMAIN "agrarian.org"
|
||||
#define QAPP_APP_NAME_DEFAULT "Agrarian-Qt"
|
||||
#define QAPP_APP_NAME_TESTNET "Agrarian-Qt-testnet"
|
||||
|
||||
#endif // BITCOIN_QT_GUICONSTANTS_H
|
||||
@@ -0,0 +1,930 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "guiutil.h"
|
||||
|
||||
#include "bitcoinaddressvalidator.h"
|
||||
#include "bitcoinunits.h"
|
||||
#include "qvalidatedlineedit.h"
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include "init.h"
|
||||
#include "main.h"
|
||||
#include "primitives/transaction.h"
|
||||
#include "protocol.h"
|
||||
#include "script/script.h"
|
||||
#include "script/standard.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0501
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "shellapi.h"
|
||||
#include "shlobj.h"
|
||||
#include "shlwapi.h"
|
||||
#endif
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
|
||||
#endif
|
||||
|
||||
#include <QAbstractItemView>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDateTime>
|
||||
#include <QDesktopServices>
|
||||
#include <QDesktopWidget>
|
||||
#include <QDoubleValidator>
|
||||
#include <QFileDialog>
|
||||
#include <QFont>
|
||||
#include <QLineEdit>
|
||||
#include <QSettings>
|
||||
#include <QTextDocument> // for Qt::mightBeRichText
|
||||
#include <QThread>
|
||||
#include <QUrlQuery>
|
||||
#include <QMouseEvent>
|
||||
|
||||
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
static boost::filesystem::detail::utf8_codecvt_facet utf8;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
extern double NSAppKitVersionNumber;
|
||||
#if !defined(NSAppKitVersionNumber10_8)
|
||||
#define NSAppKitVersionNumber10_8 1187
|
||||
#endif
|
||||
#if !defined(NSAppKitVersionNumber10_9)
|
||||
#define NSAppKitVersionNumber10_9 1265
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define URI_SCHEME "agrarian"
|
||||
|
||||
namespace GUIUtil
|
||||
{
|
||||
QString dateTimeStr(const QDateTime& date)
|
||||
{
|
||||
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
|
||||
}
|
||||
|
||||
QString dateTimeStr(qint64 nTime)
|
||||
{
|
||||
return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
|
||||
}
|
||||
|
||||
QFont bitcoinAddressFont()
|
||||
{
|
||||
QFont font("Monospace");
|
||||
font.setStyleHint(QFont::Monospace);
|
||||
return font;
|
||||
}
|
||||
|
||||
void setupAddressWidget(QValidatedLineEdit* widget, QWidget* parent)
|
||||
{
|
||||
parent->setFocusProxy(widget);
|
||||
|
||||
widget->setFont(bitcoinAddressFont());
|
||||
// We don't want translators to use own addresses in translations
|
||||
// and this is the only place, where this address is supplied.
|
||||
widget->setPlaceholderText(QObject::tr("Enter a Agrarian address (e.g. %1)").arg("A7VFR83SQbiezrW72hjcWJtcfip5krte2Z"));
|
||||
widget->setValidator(new BitcoinAddressEntryValidator(parent));
|
||||
widget->setCheckValidator(new BitcoinAddressCheckValidator(parent));
|
||||
}
|
||||
|
||||
void setupAmountWidget(QLineEdit* widget, QWidget* parent)
|
||||
{
|
||||
QDoubleValidator* amountValidator = new QDoubleValidator(parent);
|
||||
amountValidator->setDecimals(8);
|
||||
amountValidator->setBottom(0.0);
|
||||
widget->setValidator(amountValidator);
|
||||
widget->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
||||
}
|
||||
|
||||
bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out)
|
||||
{
|
||||
// return if URI is not valid or is no Agrarian: URI
|
||||
if (!uri.isValid() || uri.scheme() != QString(URI_SCHEME))
|
||||
return false;
|
||||
|
||||
SendCoinsRecipient rv;
|
||||
rv.address = uri.path();
|
||||
// Trim any following forward slash which may have been added by the OS
|
||||
if (rv.address.endsWith("/")) {
|
||||
rv.address.truncate(rv.address.length() - 1);
|
||||
}
|
||||
rv.amount = 0;
|
||||
|
||||
QUrlQuery uriQuery(uri);
|
||||
QList<QPair<QString, QString> > items = uriQuery.queryItems();
|
||||
for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
|
||||
{
|
||||
bool fShouldReturnFalse = false;
|
||||
if (i->first.startsWith("req-")) {
|
||||
i->first.remove(0, 4);
|
||||
fShouldReturnFalse = true;
|
||||
}
|
||||
|
||||
if (i->first == "label") {
|
||||
rv.label = i->second;
|
||||
fShouldReturnFalse = false;
|
||||
}
|
||||
if (i->first == "message") {
|
||||
rv.message = i->second;
|
||||
fShouldReturnFalse = false;
|
||||
} else if (i->first == "amount") {
|
||||
if (!i->second.isEmpty()) {
|
||||
if (!BitcoinUnits::parse(BitcoinUnits::AGR, i->second, &rv.amount)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
fShouldReturnFalse = false;
|
||||
}
|
||||
|
||||
if (fShouldReturnFalse)
|
||||
return false;
|
||||
}
|
||||
if (out) {
|
||||
*out = rv;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool parseBitcoinURI(QString uri, SendCoinsRecipient* out)
|
||||
{
|
||||
// Convert agrarian:// to agrarian:
|
||||
//
|
||||
// Cannot handle this later, because agrarian:// will cause Qt to see the part after // as host,
|
||||
// which will lower-case it (and thus invalidate the address).
|
||||
if (uri.startsWith(URI_SCHEME "://", Qt::CaseInsensitive)) {
|
||||
uri.replace(0, std::strlen(URI_SCHEME) + 3, URI_SCHEME ":");
|
||||
}
|
||||
QUrl uriInstance(uri);
|
||||
return parseBitcoinURI(uriInstance, out);
|
||||
}
|
||||
|
||||
QString formatBitcoinURI(const SendCoinsRecipient& info)
|
||||
{
|
||||
QString ret = QString(URI_SCHEME ":%1").arg(info.address);
|
||||
int paramCount = 0;
|
||||
|
||||
if (info.amount) {
|
||||
ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::AGR, info.amount, false, BitcoinUnits::separatorNever));
|
||||
paramCount++;
|
||||
}
|
||||
|
||||
if (!info.label.isEmpty()) {
|
||||
QString lbl(QUrl::toPercentEncoding(info.label));
|
||||
ret += QString("%1label=%2").arg(paramCount == 0 ? "?" : "&").arg(lbl);
|
||||
paramCount++;
|
||||
}
|
||||
|
||||
if (!info.message.isEmpty()) {
|
||||
QString msg(QUrl::toPercentEncoding(info.message));
|
||||
ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg);
|
||||
paramCount++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool isDust(const QString& address, const CAmount& amount)
|
||||
{
|
||||
CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
|
||||
CScript script = GetScriptForDestination(dest);
|
||||
CTxOut txOut(amount, script);
|
||||
return txOut.IsDust(::minRelayTxFee);
|
||||
}
|
||||
|
||||
QString HtmlEscape(const QString& str, bool fMultiLine)
|
||||
{
|
||||
QString escaped = str.toHtmlEscaped();
|
||||
escaped = escaped.replace(" ", " ");
|
||||
if (fMultiLine) {
|
||||
escaped = escaped.replace("\n", "<br>\n");
|
||||
}
|
||||
return escaped;
|
||||
}
|
||||
|
||||
QString HtmlEscape(const std::string& str, bool fMultiLine)
|
||||
{
|
||||
return HtmlEscape(QString::fromStdString(str), fMultiLine);
|
||||
}
|
||||
|
||||
void copyEntryData(QAbstractItemView* view, int column, int role)
|
||||
{
|
||||
if (!view || !view->selectionModel())
|
||||
return;
|
||||
QModelIndexList selection = view->selectionModel()->selectedRows(column);
|
||||
|
||||
if (!selection.isEmpty()) {
|
||||
// Copy first item
|
||||
setClipboard(selection.at(0).data(role).toString());
|
||||
}
|
||||
}
|
||||
|
||||
QString getEntryData(QAbstractItemView *view, int column, int role)
|
||||
{
|
||||
if(!view || !view->selectionModel())
|
||||
return QString();
|
||||
QModelIndexList selection = view->selectionModel()->selectedRows(column);
|
||||
|
||||
if(!selection.isEmpty()) {
|
||||
// Return first item
|
||||
return (selection.at(0).data(role).toString());
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString getSaveFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut)
|
||||
{
|
||||
QString selectedFilter;
|
||||
QString myDir;
|
||||
if (dir.isEmpty()) // Default to user documents location
|
||||
{
|
||||
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
}
|
||||
else
|
||||
{
|
||||
myDir = dir;
|
||||
}
|
||||
/* Directly convert path to native OS path separators */
|
||||
QString result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter));
|
||||
|
||||
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
|
||||
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
|
||||
QString selectedSuffix;
|
||||
if (filter_re.exactMatch(selectedFilter)) {
|
||||
selectedSuffix = filter_re.cap(1);
|
||||
}
|
||||
|
||||
/* Add suffix if needed */
|
||||
QFileInfo info(result);
|
||||
if (!result.isEmpty()) {
|
||||
if (info.suffix().isEmpty() && !selectedSuffix.isEmpty()) {
|
||||
/* No suffix specified, add selected suffix */
|
||||
if (!result.endsWith("."))
|
||||
result.append(".");
|
||||
result.append(selectedSuffix);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return selected suffix if asked to */
|
||||
if (selectedSuffixOut) {
|
||||
*selectedSuffixOut = selectedSuffix;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QString getOpenFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut)
|
||||
{
|
||||
QString selectedFilter;
|
||||
QString myDir;
|
||||
if (dir.isEmpty()) // Default to user documents location
|
||||
{
|
||||
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
}
|
||||
else
|
||||
{
|
||||
myDir = dir;
|
||||
}
|
||||
/* Directly convert path to native OS path separators */
|
||||
QString result = QDir::toNativeSeparators(QFileDialog::getOpenFileName(parent, caption, myDir, filter, &selectedFilter));
|
||||
|
||||
if (selectedSuffixOut) {
|
||||
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
|
||||
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
|
||||
QString selectedSuffix;
|
||||
if (filter_re.exactMatch(selectedFilter)) {
|
||||
selectedSuffix = filter_re.cap(1);
|
||||
}
|
||||
*selectedSuffixOut = selectedSuffix;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Qt::ConnectionType blockingGUIThreadConnection()
|
||||
{
|
||||
if (QThread::currentThread() != qApp->thread()) {
|
||||
return Qt::BlockingQueuedConnection;
|
||||
} else {
|
||||
return Qt::DirectConnection;
|
||||
}
|
||||
}
|
||||
|
||||
bool checkPoint(const QPoint& p, const QWidget* w)
|
||||
{
|
||||
QWidget* atW = QApplication::widgetAt(w->mapToGlobal(p));
|
||||
if (!atW) return false;
|
||||
return atW->topLevelWidget() == w;
|
||||
}
|
||||
|
||||
bool isObscured(QWidget* w)
|
||||
{
|
||||
return !(checkPoint(QPoint(0, 0), w) && checkPoint(QPoint(w->width() - 1, 0), w) && checkPoint(QPoint(0, w->height() - 1), w) && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) && checkPoint(QPoint(w->width() / 2, w->height() / 2), w));
|
||||
}
|
||||
|
||||
void openDebugLogfile()
|
||||
{
|
||||
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
|
||||
|
||||
/* Open debug.log with the associated application */
|
||||
if (boost::filesystem::exists(pathDebug))
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
|
||||
}
|
||||
|
||||
void openConfigfile()
|
||||
{
|
||||
boost::filesystem::path pathConfig = GetConfigFile();
|
||||
|
||||
/* Open agrarian.conf with the associated application */
|
||||
if (boost::filesystem::exists(pathConfig))
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
|
||||
}
|
||||
|
||||
void openMNConfigfile()
|
||||
{
|
||||
boost::filesystem::path pathConfig = GetMasternodeConfigFile();
|
||||
|
||||
/* Open masternode.conf with the associated application */
|
||||
if (boost::filesystem::exists(pathConfig))
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
|
||||
}
|
||||
|
||||
void showBackups()
|
||||
{
|
||||
boost::filesystem::path pathBackups = GetDataDir() / "backups";
|
||||
|
||||
/* Open folder with default browser */
|
||||
if (boost::filesystem::exists(pathBackups))
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathBackups)));
|
||||
}
|
||||
|
||||
void SubstituteFonts(const QString& language)
|
||||
{
|
||||
#if defined(Q_OS_MAC)
|
||||
// Background:
|
||||
// OSX's default font changed in 10.9 and QT is unable to find it with its
|
||||
// usual fallback methods when building against the 10.7 sdk or lower.
|
||||
// The 10.8 SDK added a function to let it find the correct fallback font.
|
||||
// If this fallback is not properly loaded, some characters may fail to
|
||||
// render correctly.
|
||||
//
|
||||
// The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default.
|
||||
//
|
||||
// Solution: If building with the 10.7 SDK or lower and the user's platform
|
||||
// is 10.9 or higher at runtime, substitute the correct font. This needs to
|
||||
// happen before the QApplication is created.
|
||||
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
|
||||
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) {
|
||||
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
|
||||
/* On a 10.9 - 10.9.x system */
|
||||
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
|
||||
else {
|
||||
/* 10.10 or later system */
|
||||
if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese
|
||||
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC");
|
||||
else if (language == "ja") // Japanesee
|
||||
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC");
|
||||
else
|
||||
QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject* parent) : QObject(parent),
|
||||
size_threshold(size_threshold)
|
||||
{
|
||||
}
|
||||
|
||||
bool ToolTipToRichTextFilter::eventFilter(QObject* obj, QEvent* evt)
|
||||
{
|
||||
if (evt->type() == QEvent::ToolTipChange) {
|
||||
QWidget* widget = static_cast<QWidget*>(obj);
|
||||
QString tooltip = widget->toolTip();
|
||||
if (tooltip.size() > size_threshold && !tooltip.startsWith("<qt")) {
|
||||
// Escape the current message as HTML and replace \n by <br> if it's not rich text
|
||||
if (!Qt::mightBeRichText(tooltip))
|
||||
tooltip = HtmlEscape(tooltip, true);
|
||||
// Envelop with <qt></qt> to make sure Qt detects every tooltip as rich text
|
||||
// and style='white-space:pre' to preserve line composition
|
||||
tooltip = "<qt style='white-space:pre'>" + tooltip + "</qt>";
|
||||
widget->setToolTip(tooltip);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return QObject::eventFilter(obj, evt);
|
||||
}
|
||||
|
||||
void TableViewLastColumnResizingFixer::connectViewHeadersSignals()
|
||||
{
|
||||
connect(tableView->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(on_sectionResized(int, int, int)));
|
||||
connect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged()));
|
||||
}
|
||||
|
||||
// We need to disconnect these while handling the resize events, otherwise we can enter infinite loops.
|
||||
void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals()
|
||||
{
|
||||
disconnect(tableView->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(on_sectionResized(int, int, int)));
|
||||
disconnect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged()));
|
||||
}
|
||||
|
||||
// Setup the resize mode, handles compatibility for Qt5 and below as the method signatures changed.
|
||||
// Refactored here for readability.
|
||||
void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode)
|
||||
{
|
||||
tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode);
|
||||
}
|
||||
|
||||
void TableViewLastColumnResizingFixer::resizeColumn(int nColumnIndex, int width)
|
||||
{
|
||||
tableView->setColumnWidth(nColumnIndex, width);
|
||||
tableView->horizontalHeader()->resizeSection(nColumnIndex, width);
|
||||
}
|
||||
|
||||
int TableViewLastColumnResizingFixer::getColumnsWidth()
|
||||
{
|
||||
int nColumnsWidthSum = 0;
|
||||
for (int i = 0; i < columnCount; i++) {
|
||||
nColumnsWidthSum += tableView->horizontalHeader()->sectionSize(i);
|
||||
}
|
||||
return nColumnsWidthSum;
|
||||
}
|
||||
|
||||
int TableViewLastColumnResizingFixer::getAvailableWidthForColumn(int column)
|
||||
{
|
||||
int nResult = lastColumnMinimumWidth;
|
||||
int nTableWidth = tableView->horizontalHeader()->width();
|
||||
|
||||
if (nTableWidth > 0) {
|
||||
int nOtherColsWidth = getColumnsWidth() - tableView->horizontalHeader()->sectionSize(column);
|
||||
nResult = std::max(nResult, nTableWidth - nOtherColsWidth);
|
||||
}
|
||||
|
||||
return nResult;
|
||||
}
|
||||
|
||||
// Make sure we don't make the columns wider than the tables viewport width.
|
||||
void TableViewLastColumnResizingFixer::adjustTableColumnsWidth()
|
||||
{
|
||||
disconnectViewHeadersSignals();
|
||||
resizeColumn(lastColumnIndex, getAvailableWidthForColumn(lastColumnIndex));
|
||||
connectViewHeadersSignals();
|
||||
|
||||
int nTableWidth = tableView->horizontalHeader()->width();
|
||||
int nColsWidth = getColumnsWidth();
|
||||
if (nColsWidth > nTableWidth) {
|
||||
resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex));
|
||||
}
|
||||
}
|
||||
|
||||
// Make column use all the space available, useful during window resizing.
|
||||
void TableViewLastColumnResizingFixer::stretchColumnWidth(int column)
|
||||
{
|
||||
disconnectViewHeadersSignals();
|
||||
resizeColumn(column, getAvailableWidthForColumn(column));
|
||||
connectViewHeadersSignals();
|
||||
}
|
||||
|
||||
// When a section is resized this is a slot-proxy for ajustAmountColumnWidth().
|
||||
void TableViewLastColumnResizingFixer::on_sectionResized(int logicalIndex, int oldSize, int newSize)
|
||||
{
|
||||
adjustTableColumnsWidth();
|
||||
int remainingWidth = getAvailableWidthForColumn(logicalIndex);
|
||||
if (newSize > remainingWidth) {
|
||||
resizeColumn(logicalIndex, remainingWidth);
|
||||
}
|
||||
}
|
||||
|
||||
// When the tabless geometry is ready, we manually perform the stretch of the "Message" column,
|
||||
// as the "Stretch" resize mode does not allow for interactive resizing.
|
||||
void TableViewLastColumnResizingFixer::on_geometriesChanged()
|
||||
{
|
||||
if ((getColumnsWidth() - this->tableView->horizontalHeader()->width()) != 0) {
|
||||
disconnectViewHeadersSignals();
|
||||
resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex));
|
||||
connectViewHeadersSignals();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all internal variables and prepares the
|
||||
* the resize modes of the last 2 columns of the table and
|
||||
*/
|
||||
TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth) : tableView(table),
|
||||
lastColumnMinimumWidth(lastColMinimumWidth),
|
||||
allColumnsMinimumWidth(allColsMinimumWidth)
|
||||
{
|
||||
columnCount = tableView->horizontalHeader()->count();
|
||||
lastColumnIndex = columnCount - 1;
|
||||
secondToLastColumnIndex = columnCount - 2;
|
||||
tableView->horizontalHeader()->setMinimumSectionSize(allColumnsMinimumWidth);
|
||||
setViewHeaderResizeMode(secondToLastColumnIndex, QHeaderView::Interactive);
|
||||
setViewHeaderResizeMode(lastColumnIndex, QHeaderView::Interactive);
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
* @param[in] seconds Number of seconds to convert to a DHMS string
|
||||
*/
|
||||
DHMSTableWidgetItem::DHMSTableWidgetItem(const int64_t seconds) : QTableWidgetItem(),
|
||||
value(seconds)
|
||||
{
|
||||
this->setText(QString::fromStdString(DurationToDHMS(seconds)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparator overload to ensure that the "DHMS"-type durations as used in
|
||||
* the "active-since" list in the masternode tab are sorted by the elapsed
|
||||
* duration (versus the string value being sorted).
|
||||
* @param[in] item Right hand side of the less than operator
|
||||
*/
|
||||
bool DHMSTableWidgetItem::operator<(QTableWidgetItem const& item) const
|
||||
{
|
||||
DHMSTableWidgetItem const* rhs =
|
||||
dynamic_cast<DHMSTableWidgetItem const*>(&item);
|
||||
|
||||
if (!rhs)
|
||||
return QTableWidgetItem::operator<(item);
|
||||
|
||||
return value < rhs->value;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
boost::filesystem::path static StartupShortcutPath()
|
||||
{
|
||||
return GetSpecialFolderPath(CSIDL_STARTUP) / "Agrarian.lnk";
|
||||
}
|
||||
|
||||
bool GetStartOnSystemStartup()
|
||||
{
|
||||
// check for Agrarian.lnk
|
||||
return boost::filesystem::exists(StartupShortcutPath());
|
||||
}
|
||||
|
||||
bool SetStartOnSystemStartup(bool fAutoStart)
|
||||
{
|
||||
// If the shortcut exists already, remove it for updating
|
||||
boost::filesystem::remove(StartupShortcutPath());
|
||||
|
||||
if (fAutoStart) {
|
||||
CoInitialize(NULL);
|
||||
|
||||
// Get a pointer to the IShellLink interface.
|
||||
IShellLink* psl = NULL;
|
||||
HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL,
|
||||
CLSCTX_INPROC_SERVER, IID_IShellLink,
|
||||
reinterpret_cast<void**>(&psl));
|
||||
|
||||
if (SUCCEEDED(hres)) {
|
||||
// Get the current executable path
|
||||
TCHAR pszExePath[MAX_PATH];
|
||||
GetModuleFileName(NULL, pszExePath, sizeof(pszExePath));
|
||||
|
||||
TCHAR pszArgs[5] = TEXT("-min");
|
||||
|
||||
// Set the path to the shortcut target
|
||||
psl->SetPath(pszExePath);
|
||||
PathRemoveFileSpec(pszExePath);
|
||||
psl->SetWorkingDirectory(pszExePath);
|
||||
psl->SetShowCmd(SW_SHOWMINNOACTIVE);
|
||||
psl->SetArguments(pszArgs);
|
||||
|
||||
// Query IShellLink for the IPersistFile interface for
|
||||
// saving the shortcut in persistent storage.
|
||||
IPersistFile* ppf = NULL;
|
||||
hres = psl->QueryInterface(IID_IPersistFile,
|
||||
reinterpret_cast<void**>(&ppf));
|
||||
if (SUCCEEDED(hres)) {
|
||||
WCHAR pwsz[MAX_PATH];
|
||||
// Ensure that the string is ANSI.
|
||||
MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH);
|
||||
// Save the link by calling IPersistFile::Save.
|
||||
hres = ppf->Save(pwsz, TRUE);
|
||||
ppf->Release();
|
||||
psl->Release();
|
||||
CoUninitialize();
|
||||
return true;
|
||||
}
|
||||
psl->Release();
|
||||
}
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#elif defined(Q_OS_LINUX)
|
||||
|
||||
// Follow the Desktop Application Autostart Spec:
|
||||
// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
|
||||
|
||||
boost::filesystem::path static GetAutostartDir()
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
char* pszConfigHome = getenv("XDG_CONFIG_HOME");
|
||||
if (pszConfigHome) return fs::path(pszConfigHome) / "autostart";
|
||||
char* pszHome = getenv("HOME");
|
||||
if (pszHome) return fs::path(pszHome) / ".config" / "autostart";
|
||||
return fs::path();
|
||||
}
|
||||
|
||||
boost::filesystem::path static GetAutostartFilePath()
|
||||
{
|
||||
return GetAutostartDir() / "agrarian.desktop";
|
||||
}
|
||||
|
||||
bool GetStartOnSystemStartup()
|
||||
{
|
||||
boost::filesystem::ifstream optionFile(GetAutostartFilePath());
|
||||
if (!optionFile.good())
|
||||
return false;
|
||||
// Scan through file for "Hidden=true":
|
||||
std::string line;
|
||||
while (!optionFile.eof()) {
|
||||
getline(optionFile, line);
|
||||
if (line.find("Hidden") != std::string::npos &&
|
||||
line.find("true") != std::string::npos)
|
||||
return false;
|
||||
}
|
||||
optionFile.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetStartOnSystemStartup(bool fAutoStart)
|
||||
{
|
||||
if (!fAutoStart)
|
||||
boost::filesystem::remove(GetAutostartFilePath());
|
||||
else {
|
||||
char pszExePath[MAX_PATH + 1];
|
||||
memset(pszExePath, 0, sizeof(pszExePath));
|
||||
if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath) - 1) == -1)
|
||||
return false;
|
||||
|
||||
boost::filesystem::create_directories(GetAutostartDir());
|
||||
|
||||
boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out | std::ios_base::trunc);
|
||||
if (!optionFile.good())
|
||||
return false;
|
||||
// Write a agrarian.desktop file to the autostart directory:
|
||||
optionFile << "[Desktop Entry]\n";
|
||||
optionFile << "Type=Application\n";
|
||||
optionFile << "Name=Agrarian\n";
|
||||
optionFile << "Exec=" << pszExePath << " -min\n";
|
||||
optionFile << "Terminal=false\n";
|
||||
optionFile << "Hidden=false\n";
|
||||
optionFile.close();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#elif defined(Q_OS_MAC)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
// based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
|
||||
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl);
|
||||
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl)
|
||||
{
|
||||
// loop through the list of startup items and try to find the agrarian app
|
||||
CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list, NULL);
|
||||
for (int i = 0; i < CFArrayGetCount(listSnapshot); i++) {
|
||||
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i);
|
||||
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
|
||||
CFURLRef currentItemURL = NULL;
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100
|
||||
if(&LSSharedFileListItemCopyResolvedURL)
|
||||
currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL);
|
||||
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100
|
||||
else
|
||||
LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL);
|
||||
#endif
|
||||
#else
|
||||
LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL);
|
||||
#endif
|
||||
|
||||
if(currentItemURL && CFEqual(currentItemURL, findUrl)) {
|
||||
// found
|
||||
CFRelease(currentItemURL);
|
||||
return item;
|
||||
}
|
||||
if (currentItemURL) {
|
||||
CFRelease(currentItemURL);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool GetStartOnSystemStartup()
|
||||
{
|
||||
CFURLRef bitcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
|
||||
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
|
||||
return !!foundItem; // return boolified object
|
||||
}
|
||||
|
||||
bool SetStartOnSystemStartup(bool fAutoStart)
|
||||
{
|
||||
CFURLRef bitcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
|
||||
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
|
||||
|
||||
if (fAutoStart && !foundItem) {
|
||||
// add agrarian app to startup item list
|
||||
LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, NULL, NULL, bitcoinAppUrl, NULL, NULL);
|
||||
} else if (!fAutoStart && foundItem) {
|
||||
// remove item
|
||||
LSSharedFileListItemRemove(loginItems, foundItem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
|
||||
bool GetStartOnSystemStartup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool SetStartOnSystemStartup(bool fAutoStart) { return false; }
|
||||
|
||||
#endif
|
||||
|
||||
void saveWindowGeometry(const QString& strSetting, QWidget* parent)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue(strSetting + "Pos", parent->pos());
|
||||
settings.setValue(strSetting + "Size", parent->size());
|
||||
}
|
||||
|
||||
void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize, QWidget* parent)
|
||||
{
|
||||
QSettings settings;
|
||||
QPoint pos = settings.value(strSetting + "Pos").toPoint();
|
||||
QSize size = settings.value(strSetting + "Size", defaultSize).toSize();
|
||||
|
||||
if (!pos.x() && !pos.y()) {
|
||||
QRect screen = QApplication::desktop()->screenGeometry();
|
||||
pos.setX((screen.width() - size.width()) / 2);
|
||||
pos.setY((screen.height() - size.height()) / 2);
|
||||
}
|
||||
|
||||
parent->resize(size);
|
||||
parent->move(pos);
|
||||
}
|
||||
|
||||
// Check whether a theme is not build-in
|
||||
bool isExternal(QString theme)
|
||||
{
|
||||
if (theme.isEmpty())
|
||||
return false;
|
||||
|
||||
return (theme.operator!=("default"));
|
||||
}
|
||||
|
||||
// Open CSS when configured
|
||||
QString loadStyleSheet()
|
||||
{
|
||||
QString styleSheet;
|
||||
QSettings settings;
|
||||
QString cssName;
|
||||
QString theme = settings.value("theme", "").toString();
|
||||
|
||||
if (isExternal(theme)) {
|
||||
// External CSS
|
||||
settings.setValue("fCSSexternal", true);
|
||||
boost::filesystem::path pathAddr = GetDataDir() / "themes/";
|
||||
cssName = pathAddr.string().c_str() + theme + "/css/theme.css";
|
||||
} else {
|
||||
// Build-in CSS
|
||||
settings.setValue("fCSSexternal", false);
|
||||
if (!theme.isEmpty()) {
|
||||
cssName = QString(":/css/") + theme;
|
||||
} else {
|
||||
cssName = QString(":/css/default");
|
||||
settings.setValue("theme", "default");
|
||||
}
|
||||
}
|
||||
|
||||
QFile qFile(cssName);
|
||||
if (qFile.open(QFile::ReadOnly)) {
|
||||
styleSheet = QLatin1String(qFile.readAll());
|
||||
}
|
||||
|
||||
return styleSheet;
|
||||
}
|
||||
|
||||
void setClipboard(const QString& str)
|
||||
{
|
||||
QApplication::clipboard()->setText(str, QClipboard::Clipboard);
|
||||
QApplication::clipboard()->setText(str, QClipboard::Selection);
|
||||
}
|
||||
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
boost::filesystem::path qstringToBoostPath(const QString& path)
|
||||
{
|
||||
return boost::filesystem::path(path.toStdString(), utf8);
|
||||
}
|
||||
|
||||
QString boostPathToQString(const boost::filesystem::path& path)
|
||||
{
|
||||
return QString::fromStdString(path.string(utf8));
|
||||
}
|
||||
#else
|
||||
#warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older
|
||||
boost::filesystem::path qstringToBoostPath(const QString& path)
|
||||
{
|
||||
return boost::filesystem::path(path.toStdString());
|
||||
}
|
||||
|
||||
QString boostPathToQString(const boost::filesystem::path& path)
|
||||
{
|
||||
return QString::fromStdString(path.string());
|
||||
}
|
||||
#endif
|
||||
|
||||
QString formatDurationStr(int secs)
|
||||
{
|
||||
QStringList strList;
|
||||
int days = secs / 86400;
|
||||
int hours = (secs % 86400) / 3600;
|
||||
int mins = (secs % 3600) / 60;
|
||||
int seconds = secs % 60;
|
||||
|
||||
if (days)
|
||||
strList.append(QString(QObject::tr("%1 d")).arg(days));
|
||||
if (hours)
|
||||
strList.append(QString(QObject::tr("%1 h")).arg(hours));
|
||||
if (mins)
|
||||
strList.append(QString(QObject::tr("%1 m")).arg(mins));
|
||||
if (seconds || (!days && !hours && !mins))
|
||||
strList.append(QString(QObject::tr("%1 s")).arg(seconds));
|
||||
|
||||
return strList.join(" ");
|
||||
}
|
||||
|
||||
QString formatServicesStr(quint64 mask)
|
||||
{
|
||||
QStringList strList;
|
||||
|
||||
// Just scan the last 8 bits for now.
|
||||
for (int i = 0; i < 8; i++) {
|
||||
uint64_t check = 1 << i;
|
||||
if (mask & check) {
|
||||
switch (check) {
|
||||
case NODE_NETWORK:
|
||||
strList.append(QObject::tr("NETWORK"));
|
||||
break;
|
||||
case NODE_BLOOM:
|
||||
case NODE_BLOOM_WITHOUT_MN:
|
||||
strList.append(QObject::tr("BLOOM"));
|
||||
break;
|
||||
case NODE_BLOOM_LIGHT_ZC:
|
||||
strList.append(QObject::tr("ZK_BLOOM"));
|
||||
break;
|
||||
default:
|
||||
strList.append(QString("%1[%2]").arg(QObject::tr("UNKNOWN")).arg(check));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strList.size())
|
||||
return strList.join(" & ");
|
||||
else
|
||||
return QObject::tr("None");
|
||||
}
|
||||
|
||||
QString formatPingTime(double dPingTime)
|
||||
{
|
||||
return dPingTime == 0 ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(dPingTime * 1000), 10));
|
||||
}
|
||||
|
||||
QString formatTimeOffset(int64_t nTimeOffset)
|
||||
{
|
||||
return QString(QObject::tr("%1 s")).arg(QString::number((int)nTimeOffset, 10));
|
||||
}
|
||||
|
||||
} // namespace GUIUtil
|
||||
@@ -0,0 +1,247 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_GUIUTIL_H
|
||||
#define BITCOIN_QT_GUIUTIL_H
|
||||
|
||||
#include "amount.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QHeaderView>
|
||||
#include <QMessageBox>
|
||||
#include <QObject>
|
||||
#include <QProgressBar>
|
||||
#include <QString>
|
||||
#include <QTableView>
|
||||
#include <QTableWidget>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
class QValidatedLineEdit;
|
||||
class SendCoinsRecipient;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractItemView;
|
||||
class QDateTime;
|
||||
class QFont;
|
||||
class QLineEdit;
|
||||
class QUrl;
|
||||
class QWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Utility functions used by the Agrarian Qt UI.
|
||||
*/
|
||||
namespace GUIUtil
|
||||
{
|
||||
// Create human-readable string from date
|
||||
QString dateTimeStr(const QDateTime& datetime);
|
||||
QString dateTimeStr(qint64 nTime);
|
||||
|
||||
// Render Agrarian addresses in monospace font
|
||||
QFont bitcoinAddressFont();
|
||||
|
||||
// Set up widgets for address and amounts
|
||||
void setupAddressWidget(QValidatedLineEdit* widget, QWidget* parent);
|
||||
void setupAmountWidget(QLineEdit* widget, QWidget* parent);
|
||||
|
||||
// Parse "agrarian:" URI into recipient object, return true on successful parsing
|
||||
bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out);
|
||||
bool parseBitcoinURI(QString uri, SendCoinsRecipient* out);
|
||||
QString formatBitcoinURI(const SendCoinsRecipient& info);
|
||||
|
||||
// Returns true if given address+amount meets "dust" definition
|
||||
bool isDust(const QString& address, const CAmount& amount);
|
||||
|
||||
// HTML escaping for rich text controls
|
||||
QString HtmlEscape(const QString& str, bool fMultiLine = false);
|
||||
QString HtmlEscape(const std::string& str, bool fMultiLine = false);
|
||||
|
||||
/** Copy a field of the currently selected entry of a view to the clipboard. Does nothing if nothing
|
||||
is selected.
|
||||
@param[in] column Data column to extract from the model
|
||||
@param[in] role Data role to extract from the model
|
||||
@see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress
|
||||
*/
|
||||
void copyEntryData(QAbstractItemView* view, int column, int role = Qt::EditRole);
|
||||
|
||||
/** Return a field of the currently selected entry as a QString. Does nothing if nothing
|
||||
is selected.
|
||||
@param[in] column Data column to extract from the model
|
||||
@param[in] role Data role to extract from the model
|
||||
@see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress
|
||||
*/
|
||||
QString getEntryData(QAbstractItemView *view, int column, int role);
|
||||
|
||||
void setClipboard(const QString& str);
|
||||
|
||||
/** Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix
|
||||
when no suffix is provided by the user.
|
||||
|
||||
@param[in] parent Parent window (or 0)
|
||||
@param[in] caption Window caption (or empty, for default)
|
||||
@param[in] dir Starting directory (or empty, to default to documents directory)
|
||||
@param[in] filter Filter specification such as "Comma Separated Files (*.csv)"
|
||||
@param[out] selectedSuffixOut Pointer to return the suffix (file type) that was selected (or 0).
|
||||
Can be useful when choosing the save file format based on suffix.
|
||||
*/
|
||||
QString getSaveFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut);
|
||||
|
||||
/** Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
|
||||
|
||||
@param[in] parent Parent window (or 0)
|
||||
@param[in] caption Window caption (or empty, for default)
|
||||
@param[in] dir Starting directory (or empty, to default to documents directory)
|
||||
@param[in] filter Filter specification such as "Comma Separated Files (*.csv)"
|
||||
@param[out] selectedSuffixOut Pointer to return the suffix (file type) that was selected (or 0).
|
||||
Can be useful when choosing the save file format based on suffix.
|
||||
*/
|
||||
QString getOpenFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut);
|
||||
|
||||
/** Get connection type to call object slot in GUI thread with invokeMethod. The call will be blocking.
|
||||
|
||||
@returns If called from the GUI thread, return a Qt::DirectConnection.
|
||||
If called from another thread, return a Qt::BlockingQueuedConnection.
|
||||
*/
|
||||
Qt::ConnectionType blockingGUIThreadConnection();
|
||||
|
||||
// Determine whether a widget is hidden behind other windows
|
||||
bool isObscured(QWidget* w);
|
||||
|
||||
// Open debug.log
|
||||
void openDebugLogfile();
|
||||
|
||||
// Open agrarian.conf
|
||||
void openConfigfile();
|
||||
|
||||
// Open masternode.conf
|
||||
void openMNConfigfile();
|
||||
|
||||
// Browse backup folder
|
||||
void showBackups();
|
||||
|
||||
// Replace invalid default fonts with known good ones
|
||||
void SubstituteFonts(const QString& language);
|
||||
|
||||
/** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
|
||||
representation if needed. This assures that Qt can word-wrap long tooltip messages.
|
||||
Tooltips longer than the provided size threshold (in characters) are wrapped.
|
||||
*/
|
||||
class ToolTipToRichTextFilter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ToolTipToRichTextFilter(int size_threshold, QObject* parent = 0);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject* obj, QEvent* evt);
|
||||
|
||||
private:
|
||||
int size_threshold;
|
||||
};
|
||||
|
||||
/**
|
||||
* Makes a QTableView last column feel as if it was being resized from its left border.
|
||||
* Also makes sure the column widths are never larger than the table's viewport.
|
||||
* In Qt, all columns are resizable from the right, but it's not intuitive resizing the last column from the right.
|
||||
* Usually our second to last columns behave as if stretched, and when on strech mode, columns aren't resizable
|
||||
* interactively or programatically.
|
||||
*
|
||||
* This helper object takes care of this issue.
|
||||
*
|
||||
*/
|
||||
class TableViewLastColumnResizingFixer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth);
|
||||
void stretchColumnWidth(int column);
|
||||
|
||||
private:
|
||||
QTableView* tableView;
|
||||
int lastColumnMinimumWidth;
|
||||
int allColumnsMinimumWidth;
|
||||
int lastColumnIndex;
|
||||
int columnCount;
|
||||
int secondToLastColumnIndex;
|
||||
|
||||
void adjustTableColumnsWidth();
|
||||
int getAvailableWidthForColumn(int column);
|
||||
int getColumnsWidth();
|
||||
void connectViewHeadersSignals();
|
||||
void disconnectViewHeadersSignals();
|
||||
void setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode);
|
||||
void resizeColumn(int nColumnIndex, int width);
|
||||
|
||||
private slots:
|
||||
void on_sectionResized(int logicalIndex, int oldSize, int newSize);
|
||||
void on_geometriesChanged();
|
||||
};
|
||||
|
||||
/**
|
||||
* Extension to QTableWidgetItem that facilitates proper ordering for "DHMS"
|
||||
* strings (primarily used in the masternode's "active" listing).
|
||||
*/
|
||||
class DHMSTableWidgetItem : public QTableWidgetItem
|
||||
{
|
||||
public:
|
||||
DHMSTableWidgetItem(const int64_t seconds);
|
||||
virtual bool operator<(QTableWidgetItem const& item) const;
|
||||
|
||||
private:
|
||||
// Private backing value for DHMS string, used for sorting.
|
||||
int64_t value;
|
||||
};
|
||||
|
||||
bool GetStartOnSystemStartup();
|
||||
bool SetStartOnSystemStartup(bool fAutoStart);
|
||||
|
||||
/** Save window size and position */
|
||||
void saveWindowGeometry(const QString& strSetting, QWidget* parent);
|
||||
/** Restore window size and position */
|
||||
void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSizeIn, QWidget* parent);
|
||||
|
||||
/** Load global CSS theme */
|
||||
QString loadStyleSheet();
|
||||
|
||||
/** Check whether a theme is not build-in */
|
||||
bool isExternal(QString theme);
|
||||
|
||||
/* Convert QString to OS specific boost path through UTF-8 */
|
||||
boost::filesystem::path qstringToBoostPath(const QString& path);
|
||||
|
||||
/* Convert OS specific boost path to QString through UTF-8 */
|
||||
QString boostPathToQString(const boost::filesystem::path& path);
|
||||
|
||||
/* Convert seconds into a QString with days, hours, mins, secs */
|
||||
QString formatDurationStr(int secs);
|
||||
|
||||
/* Format CNodeStats.nServices bitmask into a user-readable string */
|
||||
QString formatServicesStr(quint64 mask);
|
||||
|
||||
/* Format a CNodeCombinedStats.dPingTime into a user-readable string or display N/A, if 0*/
|
||||
QString formatPingTime(double dPingTime);
|
||||
|
||||
/* Format a CNodeCombinedStats.nTimeOffset into a user-readable string. */
|
||||
QString formatTimeOffset(int64_t nTimeOffset);
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
// workaround for Qt OSX Bug:
|
||||
// https://bugreports.qt-project.org/browse/QTBUG-15631
|
||||
// QProgressBar uses around 10% CPU even when app is in background
|
||||
class ProgressBar : public QProgressBar
|
||||
{
|
||||
bool event(QEvent *e) {
|
||||
return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false;
|
||||
}
|
||||
};
|
||||
#else
|
||||
typedef QProgressBar ProgressBar;
|
||||
#endif
|
||||
|
||||
} // namespace GUIUtil
|
||||
|
||||
#endif // BITCOIN_QT_GUIUTIL_H
|
||||
@@ -0,0 +1,282 @@
|
||||
// Copyright (c) 2011-2014 The Bitcoin developers
|
||||
// Copyright (c) 2014-2015 The Dash developers
|
||||
// Copyright (c) 2015-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "intro.h"
|
||||
#include "ui_intro.h"
|
||||
|
||||
#include "guiutil.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
|
||||
/* Minimum free space (in bytes) needed for data directory */
|
||||
static const uint64_t GB_BYTES = 1000000000LL;
|
||||
static const uint64_t BLOCK_CHAIN_SIZE = 1LL * GB_BYTES;
|
||||
|
||||
/* Check free space asynchronously to prevent hanging the UI thread.
|
||||
|
||||
Up to one request to check a path is in flight to this thread; when the check()
|
||||
function runs, the current path is requested from the associated Intro object.
|
||||
The reply is sent back through a signal.
|
||||
|
||||
This ensures that no queue of checking requests is built up while the user is
|
||||
still entering the path, and that always the most recently entered path is checked as
|
||||
soon as the thread becomes available.
|
||||
*/
|
||||
class FreespaceChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FreespaceChecker(Intro* intro);
|
||||
|
||||
enum Status {
|
||||
ST_OK,
|
||||
ST_ERROR
|
||||
};
|
||||
|
||||
public slots:
|
||||
void check();
|
||||
|
||||
signals:
|
||||
void reply(int status, const QString& message, quint64 available);
|
||||
|
||||
private:
|
||||
Intro* intro;
|
||||
};
|
||||
|
||||
#include "intro.moc"
|
||||
|
||||
FreespaceChecker::FreespaceChecker(Intro* intro)
|
||||
{
|
||||
this->intro = intro;
|
||||
}
|
||||
|
||||
void FreespaceChecker::check()
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
QString dataDirStr = intro->getPathToCheck();
|
||||
fs::path dataDir = GUIUtil::qstringToBoostPath(dataDirStr);
|
||||
uint64_t freeBytesAvailable = 0;
|
||||
int replyStatus = ST_OK;
|
||||
QString replyMessage = tr("A new data directory will be created.");
|
||||
|
||||
/* Find first parent that exists, so that fs::space does not fail */
|
||||
fs::path parentDir = dataDir;
|
||||
fs::path parentDirOld = fs::path();
|
||||
while (parentDir.has_parent_path() && !fs::exists(parentDir)) {
|
||||
parentDir = parentDir.parent_path();
|
||||
|
||||
/* Check if we make any progress, break if not to prevent an infinite loop here */
|
||||
if (parentDirOld == parentDir)
|
||||
break;
|
||||
|
||||
parentDirOld = parentDir;
|
||||
}
|
||||
|
||||
try {
|
||||
freeBytesAvailable = fs::space(parentDir).available;
|
||||
if (fs::exists(dataDir)) {
|
||||
if (fs::is_directory(dataDir)) {
|
||||
QString separator = "<code>" + QDir::toNativeSeparators("/") + tr("name") + "</code>";
|
||||
replyStatus = ST_OK;
|
||||
replyMessage = tr("Directory already exists. Add %1 if you intend to create a new directory here.").arg(separator);
|
||||
} else {
|
||||
replyStatus = ST_ERROR;
|
||||
replyMessage = tr("Path already exists, and is not a directory.");
|
||||
}
|
||||
}
|
||||
} catch (fs::filesystem_error& e) {
|
||||
/* Parent directory does not exist or is not accessible */
|
||||
replyStatus = ST_ERROR;
|
||||
replyMessage = tr("Cannot create data directory here.");
|
||||
}
|
||||
emit reply(replyStatus, replyMessage, freeBytesAvailable);
|
||||
}
|
||||
|
||||
|
||||
Intro::Intro(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
|
||||
ui(new Ui::Intro),
|
||||
thread(0),
|
||||
signalled(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(BLOCK_CHAIN_SIZE / GB_BYTES));
|
||||
startThread();
|
||||
}
|
||||
|
||||
Intro::~Intro()
|
||||
{
|
||||
delete ui;
|
||||
/* Ensure thread is finished before it is deleted */
|
||||
emit stopThread();
|
||||
thread->wait();
|
||||
}
|
||||
|
||||
QString Intro::getDataDirectory()
|
||||
{
|
||||
return ui->dataDirectory->text();
|
||||
}
|
||||
|
||||
void Intro::setDataDirectory(const QString& dataDir)
|
||||
{
|
||||
ui->dataDirectory->setText(dataDir);
|
||||
if (dataDir == getDefaultDataDirectory()) {
|
||||
ui->dataDirDefault->setChecked(true);
|
||||
ui->dataDirectory->setEnabled(false);
|
||||
ui->ellipsisButton->setEnabled(false);
|
||||
} else {
|
||||
ui->dataDirCustom->setChecked(true);
|
||||
ui->dataDirectory->setEnabled(true);
|
||||
ui->ellipsisButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
QString Intro::getDefaultDataDirectory()
|
||||
{
|
||||
return GUIUtil::boostPathToQString(GetDefaultDataDir());
|
||||
}
|
||||
|
||||
bool Intro::pickDataDirectory()
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
QSettings settings;
|
||||
/* If data directory provided on command line, no need to look at settings
|
||||
or show a picking dialog */
|
||||
if (!GetArg("-datadir", "").empty())
|
||||
return true;
|
||||
/* 1) Default data directory for operating system */
|
||||
QString dataDir = getDefaultDataDirectory();
|
||||
/* 2) Allow QSettings to override default dir */
|
||||
dataDir = settings.value("strDataDir", dataDir).toString();
|
||||
|
||||
if (!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || GetBoolArg("-choosedatadir", false)) {
|
||||
/* If current default data directory does not exist, let the user choose one */
|
||||
Intro intro;
|
||||
intro.setDataDirectory(dataDir);
|
||||
intro.setWindowIcon(QIcon(":icons/bitcoin"));
|
||||
|
||||
while (true) {
|
||||
if (!intro.exec()) {
|
||||
/* Cancel clicked */
|
||||
return false;
|
||||
}
|
||||
dataDir = intro.getDataDirectory();
|
||||
try {
|
||||
TryCreateDirectory(GUIUtil::qstringToBoostPath(dataDir));
|
||||
break;
|
||||
} catch (fs::filesystem_error& e) {
|
||||
QMessageBox::critical(0, tr("Agrarian Core"),
|
||||
tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir));
|
||||
/* fall through, back to choosing screen */
|
||||
}
|
||||
}
|
||||
|
||||
settings.setValue("strDataDir", dataDir);
|
||||
}
|
||||
/* Only override -datadir if different from the default, to make it possible to
|
||||
* override -datadir in the agrarian.conf file in the default data directory
|
||||
* (to be consistent with agrariand behavior)
|
||||
*/
|
||||
if (dataDir != getDefaultDataDirectory())
|
||||
SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting
|
||||
return true;
|
||||
}
|
||||
|
||||
void Intro::setStatus(int status, const QString& message, quint64 bytesAvailable)
|
||||
{
|
||||
switch (status) {
|
||||
case FreespaceChecker::ST_OK:
|
||||
ui->errorMessage->setText(message);
|
||||
ui->errorMessage->setStyleSheet("");
|
||||
break;
|
||||
case FreespaceChecker::ST_ERROR:
|
||||
ui->errorMessage->setText(tr("Error") + ": " + message);
|
||||
ui->errorMessage->setStyleSheet("QLabel { color: #800000 }");
|
||||
break;
|
||||
}
|
||||
/* Indicate number of bytes available */
|
||||
if (status == FreespaceChecker::ST_ERROR) {
|
||||
ui->freeSpace->setText("");
|
||||
} else {
|
||||
QString freeString = tr("%1 GB of free space available").arg(bytesAvailable / GB_BYTES);
|
||||
if (bytesAvailable < BLOCK_CHAIN_SIZE) {
|
||||
freeString += " " + tr("(of %1 GB needed)").arg(BLOCK_CHAIN_SIZE / GB_BYTES);
|
||||
ui->freeSpace->setStyleSheet("QLabel { color: #800000 }");
|
||||
} else {
|
||||
ui->freeSpace->setStyleSheet("");
|
||||
}
|
||||
ui->freeSpace->setText(freeString + ".");
|
||||
}
|
||||
/* Don't allow confirm in ERROR state */
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(status != FreespaceChecker::ST_ERROR);
|
||||
}
|
||||
|
||||
void Intro::on_dataDirectory_textChanged(const QString& dataDirStr)
|
||||
{
|
||||
/* Disable OK button until check result comes in */
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
checkPath(dataDirStr);
|
||||
}
|
||||
|
||||
void Intro::on_ellipsisButton_clicked()
|
||||
{
|
||||
QString dir = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(0, "Choose data directory", ui->dataDirectory->text()));
|
||||
if (!dir.isEmpty())
|
||||
ui->dataDirectory->setText(dir);
|
||||
}
|
||||
|
||||
void Intro::on_dataDirDefault_clicked()
|
||||
{
|
||||
setDataDirectory(getDefaultDataDirectory());
|
||||
}
|
||||
|
||||
void Intro::on_dataDirCustom_clicked()
|
||||
{
|
||||
ui->dataDirectory->setEnabled(true);
|
||||
ui->ellipsisButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void Intro::startThread()
|
||||
{
|
||||
thread = new QThread(this);
|
||||
FreespaceChecker* executor = new FreespaceChecker(this);
|
||||
executor->moveToThread(thread);
|
||||
|
||||
connect(executor, SIGNAL(reply(int, QString, quint64)), this, SLOT(setStatus(int, QString, quint64)));
|
||||
connect(this, SIGNAL(requestCheck()), executor, SLOT(check()));
|
||||
/* make sure executor object is deleted in its own thread */
|
||||
connect(this, SIGNAL(stopThread()), executor, SLOT(deleteLater()));
|
||||
connect(this, SIGNAL(stopThread()), thread, SLOT(quit()));
|
||||
|
||||
thread->start();
|
||||
}
|
||||
|
||||
void Intro::checkPath(const QString& dataDir)
|
||||
{
|
||||
mutex.lock();
|
||||
pathToCheck = dataDir;
|
||||
if (!signalled) {
|
||||
signalled = true;
|
||||
emit requestCheck();
|
||||
}
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
QString Intro::getPathToCheck()
|
||||
{
|
||||
QString retval;
|
||||
mutex.lock();
|
||||
retval = pathToCheck;
|
||||
signalled = false; /* new request can be queued now */
|
||||
mutex.unlock();
|
||||
return retval;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Copyright (c) 2017-2018 The PIVX developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_INTRO_H
|
||||
#define BITCOIN_QT_INTRO_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMutex>
|
||||
#include <QThread>
|
||||
|
||||
static const bool DEFAULT_CHOOSE_DATADIR = false;
|
||||
|
||||
class FreespaceChecker;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Intro;
|
||||
}
|
||||
|
||||
/** Introduction screen (pre-GUI startup).
|
||||
Allows the user to choose a data directory,
|
||||
in which the wallet and block chain will be stored.
|
||||
*/
|
||||
class Intro : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Intro(QWidget* parent = 0);
|
||||
~Intro();
|
||||
|
||||
QString getDataDirectory();
|
||||
void setDataDirectory(const QString& dataDir);
|
||||
|
||||
/**
|
||||
* Determine data directory. Let the user choose if the current one doesn't exist.
|
||||
*
|
||||
* @returns true if a data directory was selected, false if the user cancelled the selection
|
||||
* dialog.
|
||||
*
|
||||
* @note do NOT call global GetDataDir() before calling this function, this
|
||||
* will cause the wrong path to be cached.
|
||||
*/
|
||||
static bool pickDataDirectory();
|
||||
|
||||
/**
|
||||
* Determine default data directory for operating system.
|
||||
*/
|
||||
static QString getDefaultDataDirectory();
|
||||
|
||||
signals:
|
||||
void requestCheck();
|
||||
void stopThread();
|
||||
|
||||
public slots:
|
||||
void setStatus(int status, const QString& message, quint64 bytesAvailable);
|
||||
|
||||
private slots:
|
||||
void on_dataDirectory_textChanged(const QString& arg1);
|
||||
void on_ellipsisButton_clicked();
|
||||
void on_dataDirDefault_clicked();
|
||||
void on_dataDirCustom_clicked();
|
||||
|
||||
private:
|
||||
Ui::Intro* ui;
|
||||
QThread* thread;
|
||||
QMutex mutex;
|
||||
bool signalled;
|
||||
QString pathToCheck;
|
||||
|
||||
void startThread();
|
||||
void checkPath(const QString& dataDir);
|
||||
QString getPathToCheck();
|
||||
|
||||
friend class FreespaceChecker;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_INTRO_H
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,680 @@
|
||||
<TS language="es_ES" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>Botón derecho para editar dirección o etiqueta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>Crear una nueva dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>Nueva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the currently selected address to the system clipboard</source>
|
||||
<translation>Copiar la dirección seleccionada al portapapeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>Copiar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>Quitar la dirección seleccionada de la lista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>Eliminar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Exportar los datos de la pestaña actual a un archivo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Exportar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>Cerrar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>Elija la dirección a la cual enviar moneda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>Elija la dirección desde la que recibir moneda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>Elegir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sending addresses</source>
|
||||
<translation>Direcciones de envío</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving addresses</source>
|
||||
<translation>Direcciones de recepción</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
|
||||
<translation>Estas son sus direcciones de Agrarian para enviar pagos. Compruebe siempre la cantidad así como la dirección de destino antes de enviar moneda.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
|
||||
<translation>Estas son sus direcciones de Agrarian para recibir pagos. Es recomendable que use una dirección nueva para cada transacción.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy Address</source>
|
||||
<translation>Copiar dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy &Label</source>
|
||||
<translation>Copiar etiqueta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit</source>
|
||||
<translation>&Editar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export Address List</source>
|
||||
<translation>Exportar listado de direcciones</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>Archivo de valores separados por comas (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>La exportación falló</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>There was an error trying to save the address list to %1. Please try again.</source>
|
||||
<translation>Se produjo un error al intentar guardar el listado de direcciones a %1. Por favor, inténtelo de nuevo.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Etiqueta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(sin etiqueta)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
<message>
|
||||
<source>Passphrase Dialog</source>
|
||||
<translation>Clave de seguridad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter passphrase</source>
|
||||
<translation>Introduzca clave de seguridad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New passphrase</source>
|
||||
<translation>Nueva clave de seguridad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Repeat new passphrase</source>
|
||||
<translation>Repita la clave de seguridad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
|
||||
<translation>Sirve simplemente para deshabilitar el envío de dinero cuando la cuenta del SO ha sido comprometida. No suministra seguridad real.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>For anonymization, automint, and staking only</source>
|
||||
<translation>Para solo anonimizar, automint y staking</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
|
||||
<translation>Introduzca la nueva clave de seguridad para el monedero.<br/>Por favor, use una clave de seguridad de <b>diez o más caracteres aleatorios</b>, u <b> ocho o más palabras.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt wallet</source>
|
||||
<translation>Encriptar monedero</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
|
||||
<translation>Esta operación requiere su clave de seguridad para desbloquear el monedero.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Desbloquear monedero</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
|
||||
<translation>Esta operación requiere su clave de seguridad para desencriptar el monedero.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt wallet</source>
|
||||
<translation>Desencriptar monedero</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change passphrase</source>
|
||||
<translation>Cambio de clave de seguridad</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the old and new passphrase to the wallet.</source>
|
||||
<translation>Introduzca sus claves de seguridad antigua y nueva.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm wallet encryption</source>
|
||||
<translation>Confirmar encriptación del monedero</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agrarian will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your AGRs from being stolen by malware infecting your computer.</source>
|
||||
<translation>Agrarian se cerrará ahora para completar el proceso de encriptación. Recuerde que la encriptación no le protege completamente del robo de sus AGRs frente a malware que infecte su ordenador.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you wish to encrypt your wallet?</source>
|
||||
<translation>¿Está seguro de que quiere encriptar su monedero?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR AGR</b>!</source>
|
||||
<translation>Advertencia: si encripta su monedero y pierde su clave de seguridad, ¡<b>PERDERÁ TODOS SUS AGR</b>!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encrypted</source>
|
||||
<translation>Monedero encriptado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
|
||||
<translation>IMPORTNTE: cualquier copia de seguridad que haya efectuado de su fichero de monedero debería ser reemplazada por la que se genere ahora para el archivo de monedero encriptado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero sin encriptar serán inutilizadas tan pronto como comience a ussar el nuevo archivo de monedero encriptado.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encryption failed</source>
|
||||
<translation>La encriptación del monedero ha fallado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
|
||||
<translation>La encriptación del monedero ha fallado por un error interno. Su monedero no ha sido encriptado.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The supplied passphrases do not match.</source>
|
||||
<translation>Las claves de seguridad suministradas no coinciden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock failed</source>
|
||||
<translation>El desbloqueo del monedero ha fallado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The passphrase entered for the wallet decryption was incorrect.</source>
|
||||
<translation>La clave de seguridad introducida para la desencriptación del monedero es incorrecta.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet decryption failed</source>
|
||||
<translation>La desecriptación del monedero ha fallado.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet passphrase was successfully changed.</source>
|
||||
<translation>La clave de seguridad del monedero se ha cambiado correctamente.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning: The Caps Lock key is on!</source>
|
||||
<translation>Advertencia: la tecla Bloq Mayús está activada!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
<message>
|
||||
<source>IP/Netmask</source>
|
||||
<translation>IP/Netmask</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Banned Until</source>
|
||||
<translation>Prohibido hasta</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
<message>
|
||||
<source>BIP 38 Tool</source>
|
||||
<translation>Utilidad BIP 38</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&BIP 38 Encrypt</source>
|
||||
<translation>Encriptar &BIP 38</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>Dirección:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter a Agrarian Address that you would like to encrypt using BIP 38. Enter a passphrase in the middle box. Press encrypt to compute the encrypted private key.</source>
|
||||
<translation>Ingrese una dirección Agrarian que le gustaría encriptar usando BIP 38. Ingrese una contraseña en el cuadro del medio. Presione encriptar para calcular la clave privada encriptada.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The Agrarian address to encrypt</source>
|
||||
<translation>La dirección Agrarian a encriptar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>Escoja una dirección usada previamente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>Pegar dirección del portapapeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Passphrase: </source>
|
||||
<translation>Clave de seguridad:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypted Key:</source>
|
||||
<translation>Clave encriptada:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the current signature to the system clipboard</source>
|
||||
<translation>Copiar la firma actual al portapapeles del sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt the private key for this Agrarian address</source>
|
||||
<translation>Cifrar la llave privada para esta dirección Agrarian</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset all fields</source>
|
||||
<translation>Limpiar todos los campos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The encrypted private key</source>
|
||||
<translation>La llave privada cifrada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt the entered key using the passphrase</source>
|
||||
<translation>Descifrar la llave ingresada usando la frase de contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt &Key</source>
|
||||
<translation>Encriptar Clave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>Limpiar todo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&BIP 38 Decrypt</source>
|
||||
<translation>Desencriptar BIP 38</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the BIP 38 encrypted private key. Enter the passphrase in the middle box. Click Decrypt Key to compute the private key. After the key is decrypted, clicking 'Import Address' will add this private key to the wallet.</source>
|
||||
<translation>Ingrese la clave privada cifrada BIP 38. Ingrese la frase de contraseña en el cuadro del medio. Haga clic en Descifrar clave para calcular la clave privada. Después de descifrar la clave, al hacer clic en "Importar dirección" para agregar esta clave privada al monedero.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt &Key</source>
|
||||
<translation>Descifrar clave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypted Key:</source>
|
||||
<translation>Clave descifrada:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import Address</source>
|
||||
<translation>Importar dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Click "Decrypt Key" to compute key</source>
|
||||
<translation>Haga clic en "Descifrar clave" para calcular la clave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered passphrase is invalid. </source>
|
||||
<translation>La contraseña introducida es inválida</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Allowed: 0-9,a-z,A-Z,</source>
|
||||
<translation>Permitido: 0-9,a.z,A-Z,</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address is invalid.</source>
|
||||
<translation>La dirección introducida es inválida.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please check the address and try again.</source>
|
||||
<translation>Por favor compruebe la dirección e inténtelo de nuevo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address does not refer to a key.</source>
|
||||
<translation>La dirección introducida no se refiere a ninguna clave.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock was cancelled.</source>
|
||||
<translation>El desbloqueo del monedero fue cancelado.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Private key for the entered address is not available.</source>
|
||||
<translation>La clave privada para la dirección introducida no está disponible.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Desbloquear monedero</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(sin etiqueta)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>Dirección:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(sin etiqueta)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>Escoja una dirección usada previamente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>Pegar dirección del portapapeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Etiqueta</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Etiqueta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(sin etiqueta)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>Limpiar todo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(sin etiqueta)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>Escoja una dirección usada previamente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>Pegar dirección del portapapeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
<message>
|
||||
<source>The Agrarian address to sign the message with</source>
|
||||
<translation>Dirección Agrarian con la que firmar el mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>Escoja una dirección usada previamente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>Pegar dirección del portapapeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the current signature to the system clipboard</source>
|
||||
<translation>Copiar la firma actual al portapapeles del sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sign the message to prove you own this Agrarian address</source>
|
||||
<translation>Firme el mensaje para probar que Ud. es el propietario de esta dirección Agrarian</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset all sign message fields</source>
|
||||
<translation>Limpiar todos los campos de firma de mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>Limpiar todo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address is invalid.</source>
|
||||
<translation>La dirección introducida es inválida.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please check the address and try again.</source>
|
||||
<translation>Por favor compruebe la dirección e inténtelo de nuevo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address does not refer to a key.</source>
|
||||
<translation>La dirección introducida no se refiere a ninguna clave.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock was cancelled.</source>
|
||||
<translation>El desbloqueo del monedero fue cancelado.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Private key for the entered address is not available.</source>
|
||||
<translation>La clave privada para la dirección introducida no está disponible.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>Archivo de valores separados por comas (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Etiqueta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Dirección</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>La exportación falló</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Exportar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Exportar los datos de la pestaña actual a un archivo</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
<message>
|
||||
<source>Zapping all transactions from wallet...</source>
|
||||
<translation>Saltando todas las transacciones del monedero...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ZeroMQ notification options:</source>
|
||||
<translation>Opciones de notificación ZeroMQ:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Zerocoin options:</source>
|
||||
<translation>Opciones Zerocoin:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>on startup</source>
|
||||
<translation>al inicio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>wallet.dat corrupt, salvage failed</source>
|
||||
<translation>wallet.dat corrupto, recuperación fallida</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,340 @@
|
||||
<TS language="hi_IN" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>नया पता बनाएँ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>सिक्कों को भेजने के लिए पता चुनें</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>सिक्कों को प्राप्त करने के लिए पता चुनें</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
|
||||
<translation>पहले इस्तेमाल किए गए पते को चुनें</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>लेबल</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
<message>
|
||||
<source>Warning</source>
|
||||
<translation>चेतावनी</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Information</source>
|
||||
<translation>जानकारी</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
<message>
|
||||
<source>Back</source>
|
||||
<translation>वापस</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Forward</source>
|
||||
<translation>आगे</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
<message>
|
||||
<source>Quantity:</source>
|
||||
<translation>मात्रा:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Amount:</source>
|
||||
<translation>राशि:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fee:</source>
|
||||
<translation>फ़ीस:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dust:</source>
|
||||
<translation>धूल:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Date</source>
|
||||
<translation>मिति</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>medium</source>
|
||||
<translation>मध्यम</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
<message>
|
||||
<source>Amount:</source>
|
||||
<translation>राशि:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
<message>
|
||||
<source>Fee:</source>
|
||||
<translation>फ़ीस:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dust:</source>
|
||||
<translation>धूल:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>medium</source>
|
||||
<translation>मध्यम</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
<message>
|
||||
<source>Yes</source>
|
||||
<translation>हाँ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No</source>
|
||||
<translation>नहीं</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
<message>
|
||||
<source>QR Code</source>
|
||||
<translation>QR कोड</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>लेबल</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Message</source>
|
||||
<translation>संदेश</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
<message>
|
||||
<source>Date</source>
|
||||
<translation>मिति</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>लेबल</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Message</source>
|
||||
<translation>संदेश</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
<message>
|
||||
<source>Quantity:</source>
|
||||
<translation>मात्रा:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Amount:</source>
|
||||
<translation>राशि:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>medium</source>
|
||||
<translation>मध्यम</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fee:</source>
|
||||
<translation>फ़ीस:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dust:</source>
|
||||
<translation>धूल:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>normal</source>
|
||||
<translation>साधारण</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>fast</source>
|
||||
<translation>तेज</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Balance:</source>
|
||||
<translation>शेष राशि:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
<message>
|
||||
<source>This is a normal payment.</source>
|
||||
<translation>यह एक सामान्य भुगतान है |</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
<message>
|
||||
<source>Signature</source>
|
||||
<translation>हस्ताक्षर</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
<message>
|
||||
<source>Date</source>
|
||||
<translation>मिति</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Message</source>
|
||||
<translation>संदेश</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
<message>
|
||||
<source>Date</source>
|
||||
<translation>मिति</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
<message>
|
||||
<source>Date</source>
|
||||
<translation>मिति</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>लेबल</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>पता</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
<message>
|
||||
<source>Information</source>
|
||||
<translation>जानकारी</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning</source>
|
||||
<translation>चेतावनी</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,284 @@
|
||||
<TS language="ja" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>右クリックでアドレスもしくはラベルを編集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>新しいアドレスを作成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&新規</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the currently selected address to the system clipboard</source>
|
||||
<translation>クリップボードへ現在選択しているアドレスをコピー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>&コピー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>リストから選択されたアドレスを削除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>&削除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&エクスポート</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>&閉じる</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>送信先アドレスを選んでコインを送る</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>受信用アドレスを選んでコインを受け取る</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>&選択</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sending addresses</source>
|
||||
<translation>送信先アドレス</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving addresses</source>
|
||||
<translation>受信用アドレス</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy Address</source>
|
||||
<translation>&アドレスをコビー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit</source>
|
||||
<translation>&編集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export Address List</source>
|
||||
<translation>アドレスリストをエクスポート</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>エクスポート失敗</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
<message>
|
||||
<source>New passphrase</source>
|
||||
<translation>新しいパスワード</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Repeat new passphrase</source>
|
||||
<translation>新しいパスワードの確認</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt wallet</source>
|
||||
<translation>財布を暗号化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change passphrase</source>
|
||||
<translation>パスワードを変更</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the old and new passphrase to the wallet.</source>
|
||||
<translation>現在のパスワードと新しいパスワードを財布に入力</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encrypted</source>
|
||||
<translation>財布が暗号化された</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>アドレス:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Passphrase: </source>
|
||||
<translation>パスワード:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypted Key:</source>
|
||||
<translation>暗号化されたキー</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>アドレス:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>アドレス</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>エクスポート失敗</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&エクスポート</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,200 @@
|
||||
<TS language="ro_RO" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>Faceți click dreapta pentru a edita adresa sau eticheta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>Creează o nouă adresă</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&Nou/Nouă</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the currently selected address to the system clipboard</source>
|
||||
<translation>Copiază adresa selectată în clipboard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>&Copiază</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>Șterge adresa selectată din listă</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>&Șterge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Exportă datele din fila curentă într-un fișier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&Exportă</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>&Închide </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>Alege adresa la care vrei să trimiți monedele</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>Alege adresa la care vrei să primești monedele</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>&Alege</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&Exportă</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Exportă datele din fila curentă într-un fișier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,388 @@
|
||||
<TS language="uk" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>Натисніть правою кнопкою миші, щоб редагувати адресу або мітку</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>Створити нову адресу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>Новий</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the currently selected address to the system clipboard</source>
|
||||
<translation>Скопіювати вибрану адресу в буфер обміну</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>Копіювати</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>Видалити вибрану адресу зі списку</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>Видалити</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Експортуйтувати дані поточної вкладки у файл</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Експорт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>Закрити</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>Виберіть адресу надсилання монет</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>Виберіть адресу отримання монет</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>Вибір</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sending addresses</source>
|
||||
<translation>Адреса відправки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving addresses</source>
|
||||
<translation>Адреса отримання</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
|
||||
<translation>Це ваші Agrarian-адреси для надсилання платежів. Завжди перевіряйте суму та адресу одержувача перед відправленням монет.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
|
||||
<translation>Це ваші Agrarian адреси для отримання платежів. Для кожної транзакції рекомендується використовувати нову адресу одержувача.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy Address</source>
|
||||
<translation>Копіювати адресу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy &Label</source>
|
||||
<translation>Копіювати мітку</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit</source>
|
||||
<translation>Редагувати</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export Address List</source>
|
||||
<translation>Ексортувати список адрес</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>Файл, розділений комами (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>Не вдалося експортувати</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>There was an error trying to save the address list to %1. Please try again.</source>
|
||||
<translation>Виникла помилка при спробі зберегти список адрес у %1. Будь ласка, спробуйте ще раз.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Мітка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(без міток)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
<message>
|
||||
<source>Passphrase Dialog</source>
|
||||
<translation>Кодове слово</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter passphrase</source>
|
||||
<translation>Введіть кодове слово</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New passphrase</source>
|
||||
<translation>Нове кодове слово</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Repeat new passphrase</source>
|
||||
<translation>Повторіть кодове слово</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
|
||||
<translation>Для ввімкнення тривіальної відправки коштів при скомпрометуванні операційної системи. Не забезпечує реальної безпеки.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
|
||||
<translation>Введіть нове кодове слово гамамнця. <br/>Будь ласка, використовуйте кодове слово з <b>десяти і більше хаотичних символів</b>, або <b>восьми і більше слів </b>.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt wallet</source>
|
||||
<translation>Шифрувати гаманець</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
|
||||
<translation>Для розблокування гаманця потрібно його кодове слово.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Розблокувати гаманець</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
|
||||
<translation>Для розшифрування гаманція потрібно його кодове слово.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt wallet</source>
|
||||
<translation>Розшифрувати гаманець</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change passphrase</source>
|
||||
<translation>Змінити кодове слово</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the old and new passphrase to the wallet.</source>
|
||||
<translation>Введіть попереднє і нове кодове слово гаманця.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm wallet encryption</source>
|
||||
<translation>Підтвердження шифрування гаманця</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agrarian will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your AGRs from being stolen by malware infecting your computer.</source>
|
||||
<translation>Agrarian зараз закриється, щоб завершити процес шифрування. Пам'ятайте, що шифрування гаманця не може повністю захистити ваші AGR'и від крадіжки зловмисним програмним забезпеченням, що заражає ваш комп'ютер.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you wish to encrypt your wallet?</source>
|
||||
<translation>Ви впевнені, що хочете зашифрувати Ваш гаманець?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR AGR</b>!</source>
|
||||
<translation>Попередження: Якщо після шифрування гаманця Ви <b>загубите кодове слово, то ви втратите всі Ваші AGR'и</b>!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encrypted</source>
|
||||
<translation>Гаманець зашифровано</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Розблокувати гаманець</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(без міток)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(без міток)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Мітка</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Мітка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(без міток)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(без міток)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>Файл, розділений комами (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>Мітка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>Адреса</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>Не вдалося експортувати</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Експорт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Експортуйтувати дані поточної вкладки у файл</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -0,0 +1,220 @@
|
||||
<TS language="vi" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>Ấn chuột phải để sửa địa chỉ hoặc tên</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>Tạo địa chỉ mới </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>Mới</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>Sao chép</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>Xóa các địa chỉ được chọn khỏi danh sách</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>Xóa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Xuất dữ liệu của tab hiện tại sang file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Xuất</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>Đóng</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>Chọn địa chỉ để gửi coin đi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>Chọn địa chỉ để nhận coin về</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>Chọn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sending addresses</source>
|
||||
<translation>Địa chỉ nhận</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving addresses</source>
|
||||
<translation>Địa chỉ gửi </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
|
||||
<translation>Đây là địa chỉ ví Agrarian của bạn để gửi đi. Luôn luôn kiểm tra số lượng và địa chỉ ví nhận trước khi gửi.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
|
||||
<translation>Đây là địa chỉ ví Agrarian của bạn để nhận. Bạn nên sử dụng địa chỉ ví nhận mới cho mỗi giao dịch</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Mở khóa ví</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>Mở khóa ví</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>Xuất</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>Xuất dữ liệu của tab hiện tại sang file</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,976 @@
|
||||
<TS language="zh_TW" version="2.1">
|
||||
<context>
|
||||
<name>AddressBookPage</name>
|
||||
<message>
|
||||
<source>Right-click to edit address or label</source>
|
||||
<translation>點右鍵來修改位址或標記</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new address</source>
|
||||
<translation>產生新位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&新增</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the currently selected address to the system clipboard</source>
|
||||
<translation>複製目前選取的位址到系統剪貼簿</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy</source>
|
||||
<translation>&刪除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete the currently selected address from the list</source>
|
||||
<translation>刪除列表中已選擇的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Delete</source>
|
||||
<translation>&刪除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>匯出目前面板中的資料</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&匯出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lose</source>
|
||||
<translation>&關閉</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to send coins to</source>
|
||||
<translation>選擇要匯出Agrarian幣的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose the address to receive coins with</source>
|
||||
<translation>選擇要接收Agrarian幣的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&hoose</source>
|
||||
<translation>&選取</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sending addresses</source>
|
||||
<translation>送出的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving addresses</source>
|
||||
<translation>接收的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
|
||||
<translation>這是你用來付款的 Agrarian 位址, 送出前, 請務必確認金額及接收位址是否正確.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>These are your Agrarian addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
|
||||
<translation>這是你用來接收款項的 Agrarian 位址, 建議你每次付款都使用新的位址.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Copy Address</source>
|
||||
<translation>&拷貝位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy &Label</source>
|
||||
<translation>複製標記</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit</source>
|
||||
<translation>&編輯</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export Address List</source>
|
||||
<translation>匯出位址列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>逗號區隔資料檔 (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>資料匯出有誤</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>There was an error trying to save the address list to %1. Please try again.</source>
|
||||
<translation>儲存位址列表到 %1 時, 發生錯誤, 請再試一次.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AddressTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>標記</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(沒有標記)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AskPassphraseDialog</name>
|
||||
<message>
|
||||
<source>Passphrase Dialog</source>
|
||||
<translation>密碼輸入欄</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter passphrase</source>
|
||||
<translation>輸入密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New passphrase</source>
|
||||
<translation>新的密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Repeat new passphrase</source>
|
||||
<translation>重複新密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt wallet</source>
|
||||
<translation>錢包加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
|
||||
<translation>這項操作需要先用密碼解鎖你的錢包</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>錢包解鎖</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
|
||||
<translation>這項操作需要你的密碼來解密錢包</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt wallet</source>
|
||||
<translation>錢包解密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change passphrase</source>
|
||||
<translation>修改密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter the old and new passphrase to the wallet.</source>
|
||||
<translation>請分別輸入錢包的舊密碼與新密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm wallet encryption</source>
|
||||
<translation>錢包確認加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agrarian will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your AGRs from being stolen by malware infecting your computer.</source>
|
||||
<translation>Agrarian 現在會關閉程式來處理加密流程, 請注意, 僅僅是加密你的錢包並不能完全保護你的 AGR 幣被可疑軟體或病毒偷走的風險.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you wish to encrypt your wallet?</source>
|
||||
<translation>確定要加密你的錢包?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR AGR</b>!</source>
|
||||
<translation>請注意: 如果你加密了你的錢包但是卻忘記你設定的密碼, <b>你將會失去錢包裡的錢(AGR)</b>!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encrypted</source>
|
||||
<translation>錢包已加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
|
||||
<translation>重要: 任何之前你所備份的舊錢包檔案應該使用新產生並且有加密的錢包檔案取代, 為了安全起見, 當你開始使用新錢包後, 您之前所備份的未加密舊錢包將會失效.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encryption failed</source>
|
||||
<translation>錢包加密失敗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
|
||||
<translation>錢包加密失敗因為程式上的錯誤, 你的錢包尚未被加密.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The supplied passphrases do not match.</source>
|
||||
<translation>您輸入的密碼不符.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock failed</source>
|
||||
<translation>錢包解鎖失敗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The passphrase entered for the wallet decryption was incorrect.</source>
|
||||
<translation>您輸入的密碼錯誤.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet decryption failed</source>
|
||||
<translation>錢包解密失敗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet passphrase was successfully changed.</source>
|
||||
<translation>錢包密碼修改成功</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning: The Caps Lock key is on!</source>
|
||||
<translation>注意: Caps Lock(大寫鍵) 是開啟的.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BanTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>Bip38ToolDialog</name>
|
||||
<message>
|
||||
<source>BIP 38 Tool</source>
|
||||
<translation>BIP 38 工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&BIP 38 Encrypt</source>
|
||||
<translation>&BIP 38 加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>位址:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>選擇之前用過的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>從剪貼簿貼上</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Passphrase: </source>
|
||||
<translation>密碼:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypted Key:</source>
|
||||
<translation>已加密鑰匙:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the current signature to the system clipboard</source>
|
||||
<translation>拷貝目前的簽章到系統剪貼簿</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt &Key</source>
|
||||
<translation>加密 &鑰匙</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>清除 &全部</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&BIP 38 Decrypt</source>
|
||||
<translation>&BIP 38 解密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypt &Key</source>
|
||||
<translation>解密 &鑰匙</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Decrypted Key:</source>
|
||||
<translation>已解密鑰匙:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import Address</source>
|
||||
<translation>匯入位址:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Click "Decrypt Key" to compute key</source>
|
||||
<translation>點 "解密鑰匙" 來產生</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered passphrase is invalid. </source>
|
||||
<translation>輸入的密碼不符合規定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Allowed: 0-9,a-z,A-Z,</source>
|
||||
<translation>僅允許: 0-9,a-z,A-Z</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address is invalid.</source>
|
||||
<translation>輸入的位址無效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please check the address and try again.</source>
|
||||
<translation>請檢查位址是否正確</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address does not refer to a key.</source>
|
||||
<translation>所輸入的位址並沒有配對的鑰匙</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock was cancelled.</source>
|
||||
<translation>錢包上鎖已取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Private key for the entered address is not available.</source>
|
||||
<translation>您的私鑰對輸入的位址無效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to decrypt.</source>
|
||||
<translation>解密失敗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please check the key and passphrase and try again.</source>
|
||||
<translation>請確認錢包私鑰的密碼是正確的.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Data Not Valid.</source>
|
||||
<translation>資料無效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please try again.</source>
|
||||
<translation>請再試一次</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please wait while key is imported</source>
|
||||
<translation>鑰匙正在匯入中, 請稍候</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Key Already Held By Wallet</source>
|
||||
<translation>私鑰已被錢包保管</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error Adding Key To Wallet</source>
|
||||
<translation>私鑰加入錢包發生錯誤</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Successfully Added Private Key To Wallet</source>
|
||||
<translation>私鑰加入錢包成功</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BitcoinGUI</name>
|
||||
<message>
|
||||
<source>Wallet</source>
|
||||
<translation>錢包</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Node</source>
|
||||
<translation>節點</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Overview</source>
|
||||
<translation>&總覽</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show general overview of wallet</source>
|
||||
<translation>顯示錢包資訊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Send</source>
|
||||
<translation>&發送</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Receive</source>
|
||||
<translation>&接收</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Transactions</source>
|
||||
<translation>&交易</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Browse transaction history</source>
|
||||
<translation>瀏覽交易紀錄</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>E&xit</source>
|
||||
<translation>&退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Quit application</source>
|
||||
<translation>關閉程式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>About &Qt</source>
|
||||
<translation>關於 &Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show information about Qt</source>
|
||||
<translation>顯示 Qt 資訊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Options...</source>
|
||||
<translation>&選項</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Show / Hide</source>
|
||||
<translation>&顯示 / 隱藏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show or hide the main Window</source>
|
||||
<translation>顯示或隱藏主視窗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Encrypt Wallet...</source>
|
||||
<translation>&錢包加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt the private keys that belong to your wallet</source>
|
||||
<translation>將你錢包中的私鑰加密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Backup Wallet...</source>
|
||||
<translation>&備份錢包</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Backup wallet to another location</source>
|
||||
<translation>備份錢包到另外的位置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Change Passphrase...</source>
|
||||
<translation>&更改密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change the passphrase used for wallet encryption</source>
|
||||
<translation>更改使用中的錢包密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Unlock Wallet...</source>
|
||||
<translation>&錢包解鎖</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unlock wallet</source>
|
||||
<translation>錢包解鎖</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Lock Wallet</source>
|
||||
<translation>&錢包上鎖</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sign &message...</source>
|
||||
<translation>&訊息簽章</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Verify message...</source>
|
||||
<translation>&查驗訊息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Information</source>
|
||||
<translation>&資訊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show diagnostic information</source>
|
||||
<translation>顯示診斷訊息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Debug console</source>
|
||||
<translation>&除錯命令列</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open debugging console</source>
|
||||
<translation>開啟除錯命令列</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Network Monitor</source>
|
||||
<translation>&網路監控</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show network monitor</source>
|
||||
<translation>顯示網路監控</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Peers list</source>
|
||||
<translation>&接點(Peers)列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show peers info</source>
|
||||
<translation>顯示接點(Peers)資訊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet &Repair</source>
|
||||
<translation>&錢包修復</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show wallet repair options</source>
|
||||
<translation>顯示錢包修復選項</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open configuration file</source>
|
||||
<translation>打開設定檔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Automatic &Backups</source>
|
||||
<translation>&顯示自動備份</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show automatically created wallet backups</source>
|
||||
<translation>顯示自動建立的錢包備份</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Sending addresses...</source>
|
||||
<translation>&發送地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show the list of used sending addresses and labels</source>
|
||||
<translation>顯示曾經使用的發送地址及標籤</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Receiving addresses...</source>
|
||||
<translation>&接收地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show the list of used receiving addresses and labels</source>
|
||||
<translation>顯示曾經使用過的接收地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open &URI...</source>
|
||||
<translation>&打開網址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Command-line options</source>
|
||||
<translation>&命令列工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Synchronizing additional data: %p%</source>
|
||||
<translation>其他資料同步中: %p%</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&File</source>
|
||||
<translation>&檔案</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Settings</source>
|
||||
<translation>&設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Tools</source>
|
||||
<translation>&工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Help</source>
|
||||
<translation>&幫助</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tabs toolbar</source>
|
||||
<translation>Tabs 工具列</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agrarian Core</source>
|
||||
<translation>Agrarian Core</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Send coins to a Agrarian address</source>
|
||||
<translation>送出錢幣到 Agrarian 地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Request payments (generates QR codes and agrarian: URIs)</source>
|
||||
<translation>請求付款 (會產生 QR Code跟 agrarian 位址)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Masternodes</source>
|
||||
<translation>&Masternodes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Browse masternodes</source>
|
||||
<translation>瀏覽 Masternodes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&About Agrarian Core</source>
|
||||
<translation>&關於 Agrarian Core</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show information about Agrarian Core</source>
|
||||
<translation>顯示 Agrarian Core 相關資訊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Modify configuration options for Agrarian</source>
|
||||
<translation>修改 Agrarian 設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sign messages with your Agrarian addresses to prove you own them</source>
|
||||
<translation>使用你的 Agrarian 位址對訊息簽章, 來證明你是擁有者</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Verify messages to ensure they were signed with specified Agrarian addresses</source>
|
||||
<translation>驗證訊息簽章與 Agrarian 位址吻合</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&BIP38 tool</source>
|
||||
<translation>&BIP38 工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encrypt and decrypt private keys using a passphrase</source>
|
||||
<translation>使用密碼對私鑰加密解密</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&MultiSend</source>
|
||||
<translation>&多重發送</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MultiSend Settings</source>
|
||||
<translation>多重發送設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Wallet &Configuration File</source>
|
||||
<translation>&打開錢包設定檔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open &Masternode Configuration File</source>
|
||||
<translation>&打開Masternode設定檔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Masternode configuration file</source>
|
||||
<translation>打開Masternode設定檔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open a Agrarian: URI or payment request</source>
|
||||
<translation>打開Agrarian: 位址或付款請求 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Blockchain explorer</source>
|
||||
<translation>&區塊鏈瀏覽</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Block explorer window</source>
|
||||
<translation>區塊鏈瀏覽視窗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show the Agrarian Core help message to get a list with possible Agrarian command-line options</source>
|
||||
<translation>顯示 Agrarian Core 幫助訊息以取得 Agrarian 命令列表選項</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agrarian Core client</source>
|
||||
<translation>Agrarian Core 客戶端</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BlockExplorer</name>
|
||||
<message>
|
||||
<source>TextLabel</source>
|
||||
<translation>文字標籤</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ClientModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoinControlDialog</name>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(沒有標記)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditAddressDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>FreespaceChecker</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>GovernancePage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpMessageDialog</name>
|
||||
<message>
|
||||
<source>Agrarian Core</source>
|
||||
<translation>Agrarian Core</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Intro</name>
|
||||
<message>
|
||||
<source>Agrarian Core</source>
|
||||
<translation>Agrarian Core</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MasternodeList</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiSendDialog</name>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address:</source>
|
||||
<translation>位址:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(沒有標記)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultisigDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OpenURIDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OptionsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>OverviewPage</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaymentServer</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PeerTableModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>PrivacyDialog</name>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>選擇之前用過的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>從剪貼簿貼上</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TextLabel</source>
|
||||
<translation>文字標籤</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProposalFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>Agrarian Core</source>
|
||||
<translation>Agrarian Core</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QRImageWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>RPCConsole</name>
|
||||
<message>
|
||||
<source>&Information</source>
|
||||
<translation>&資訊</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveCoinsDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiveRequestDialog</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>標記</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RecentRequestsTableModel</name>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>標記</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(沒有標記)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsDialog</name>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>清除 &全部</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(no label)</source>
|
||||
<translation>(沒有標記)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SendCoinsEntry</name>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>選擇之前用過的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>從剪貼簿貼上</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShutdownWindow</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignVerifyMessageDialog</name>
|
||||
<message>
|
||||
<source>The Agrarian address to sign the message with</source>
|
||||
<translation>對訊息簽名的 Agrarian 位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose previously used address</source>
|
||||
<translation>選擇之前用過的位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+A</source>
|
||||
<translation>Alt+A</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Paste address from clipboard</source>
|
||||
<translation>從剪貼簿貼上</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alt+P</source>
|
||||
<translation>Alt+P</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy the current signature to the system clipboard</source>
|
||||
<translation>拷貝目前的簽章到系統剪貼簿</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sign the message to prove you own this Agrarian address</source>
|
||||
<translation>使用簽章來證明你是該 Agrarian 位址的擁有者,</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The Agrarian address the message was signed with</source>
|
||||
<translation>此訊息之 Agrarian 位址已簽章於</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Verify the message to ensure it was signed with the specified Agrarian address</source>
|
||||
<translation>驗證訊息以確保該 Agrarian 位址已被簽章</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset all sign message fields</source>
|
||||
<translation>重設所有已簽章訊息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear &All</source>
|
||||
<translation>清除 &全部</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset all verify message fields</source>
|
||||
<translation>重設所有驗證訊息的欄位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address is invalid.</source>
|
||||
<translation>輸入的位址無效</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please check the address and try again.</source>
|
||||
<translation>請檢查位址是否正確</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The entered address does not refer to a key.</source>
|
||||
<translation>所輸入的位址並沒有配對的鑰匙</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wallet unlock was cancelled.</source>
|
||||
<translation>錢包上鎖已取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Private key for the entered address is not available.</source>
|
||||
<translation>您的私鑰對輸入的位址無效</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SplashScreen</name>
|
||||
<message>
|
||||
<source>Agrarian Core</source>
|
||||
<translation>Agrarian Core</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrafficGraphWidget</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDesc</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionDescDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionTableModel</name>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransactionView</name>
|
||||
<message>
|
||||
<source>Comma separated file (*.csv)</source>
|
||||
<translation>逗號區隔資料檔 (*.csv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
<translation>標記</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Address</source>
|
||||
<translation>位址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Failed</source>
|
||||
<translation>資料匯出有誤</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exporting Successful</source>
|
||||
<translation>資料匯出成功</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnitDisplayStatusBarControl</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletFrame</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletModel</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>WalletView</name>
|
||||
<message>
|
||||
<source>&Export</source>
|
||||
<translation>&匯出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export the data in the current tab to a file</source>
|
||||
<translation>匯出目前面板中的資料</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ZPivControlDialog</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>agrarian-core</name>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2011-2013 The Bitcoin developers
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_MACDOCKICONHANDLER_H
|
||||
#define BITCOIN_QT_MACDOCKICONHANDLER_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QObject>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QIcon;
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/** Macintosh-specific dock icon handler.
|
||||
*/
|
||||
class MacDockIconHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
~MacDockIconHandler();
|
||||
|
||||
QMenu* dockMenu();
|
||||
void setIcon(const QIcon& icon);
|
||||
void setMainWindow(QMainWindow* window);
|
||||
static MacDockIconHandler* instance();
|
||||
static void cleanup();
|
||||
void handleDockIconClickEvent();
|
||||
|
||||
signals:
|
||||
void dockIconClicked();
|
||||
|
||||
private:
|
||||
MacDockIconHandler();
|
||||
|
||||
QWidget* m_dummyWidget;
|
||||
QMenu* m_dockMenu;
|
||||
QMainWindow* mainWindow;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_MACDOCKICONHANDLER_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user