mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
General cleanups
This commit is contained in:
parent
c60015a260
commit
0052fe7bbc
@ -1,14 +1,18 @@
|
|||||||
#include "aboutdialog.h"
|
#include "aboutdialog.h"
|
||||||
#include "ui_aboutdialog.h"
|
#include "ui_aboutdialog.h"
|
||||||
|
#include "clientmodel.h"
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget *parent) :
|
AboutDialog::AboutDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::AboutDialog)
|
ui(new Ui::AboutDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->versionLabel->setText(QString::fromStdString(FormatFullVersion()));
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void AboutDialog::setModel(ClientModel *model)
|
||||||
|
{
|
||||||
|
ui->versionLabel->setText(model->formatFullVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutDialog::~AboutDialog()
|
AboutDialog::~AboutDialog()
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AboutDialog;
|
class AboutDialog;
|
||||||
}
|
}
|
||||||
|
class ClientModel;
|
||||||
|
|
||||||
class AboutDialog : public QDialog
|
class AboutDialog : public QDialog
|
||||||
{
|
{
|
||||||
@ -15,6 +16,7 @@ public:
|
|||||||
explicit AboutDialog(QWidget *parent = 0);
|
explicit AboutDialog(QWidget *parent = 0);
|
||||||
~AboutDialog();
|
~AboutDialog();
|
||||||
|
|
||||||
|
void setModel(ClientModel *model);
|
||||||
private:
|
private:
|
||||||
Ui::AboutDialog *ui;
|
Ui::AboutDialog *ui;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "bitcoinaddressvalidator.h"
|
#include "bitcoinaddressvalidator.h"
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
/* Base58 characters are:
|
/* Base58 characters are:
|
||||||
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||||||
|
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
#include "addresstablemodel.h"
|
#include "addresstablemodel.h"
|
||||||
#include "transactionview.h"
|
#include "transactionview.h"
|
||||||
|
|
||||||
#include "headers.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
@ -290,6 +288,7 @@ void BitcoinGUI::optionsClicked()
|
|||||||
void BitcoinGUI::aboutClicked()
|
void BitcoinGUI::aboutClicked()
|
||||||
{
|
{
|
||||||
AboutDialog dlg;
|
AboutDialog dlg;
|
||||||
|
dlg.setModel(clientModel);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +310,7 @@ void BitcoinGUI::copyClipboardClicked()
|
|||||||
|
|
||||||
void BitcoinGUI::setBalance(qint64 balance)
|
void BitcoinGUI::setBalance(qint64 balance)
|
||||||
{
|
{
|
||||||
labelBalance->setText(QString::fromStdString(FormatMoney(balance)) + QString(" BTC"));
|
labelBalance->setText(GUIUtil::formatMoney(balance) + QString(" BTC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::setAddress(const QString &addr)
|
void BitcoinGUI::setAddress(const QString &addr)
|
||||||
@ -410,7 +409,7 @@ void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee)
|
|||||||
QString strMessage =
|
QString strMessage =
|
||||||
tr("This transaction is over the size limit. You can still send it for a fee of %1, "
|
tr("This transaction is over the size limit. You can still send it for a fee of %1, "
|
||||||
"which goes to the nodes that process your transaction and helps to support the network. "
|
"which goes to the nodes that process your transaction and helps to support the network. "
|
||||||
"Do you want to pay the fee?").arg(QString::fromStdString(FormatMoney(nFeeRequired)));
|
"Do you want to pay the fee?").arg(GUIUtil::formatMoney(nFeeRequired));
|
||||||
QMessageBox::StandardButton retval = QMessageBox::question(
|
QMessageBox::StandardButton retval = QMessageBox::question(
|
||||||
this, tr("Sending..."), strMessage,
|
this, tr("Sending..."), strMessage,
|
||||||
QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes);
|
QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes);
|
||||||
@ -442,7 +441,7 @@ void BitcoinGUI::incomingTransaction(const QModelIndex & parent, int start, int
|
|||||||
|
|
||||||
trayIcon->showMessage(tr("Incoming transaction"),
|
trayIcon->showMessage(tr("Incoming transaction"),
|
||||||
tr("Date: ") + date + "\n" +
|
tr("Date: ") + date + "\n" +
|
||||||
tr("Amount: ") + QString::fromStdString(FormatMoney(amount, true)) + "\n" +
|
tr("Amount: ") + GUIUtil::formatMoney(amount, true) + "\n" +
|
||||||
tr("Type: ") + type + "\n" +
|
tr("Type: ") + type + "\n" +
|
||||||
tr("Address: ") + address + "\n",
|
tr("Address: ") + address + "\n",
|
||||||
QSystemTrayIcon::Information);
|
QSystemTrayIcon::Information);
|
||||||
|
@ -59,3 +59,7 @@ OptionsModel *ClientModel::getOptionsModel()
|
|||||||
return optionsModel;
|
return optionsModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ClientModel::formatFullVersion() const
|
||||||
|
{
|
||||||
|
return QString::fromStdString(FormatFullVersion());
|
||||||
|
}
|
||||||
|
@ -29,6 +29,8 @@ public:
|
|||||||
// Return conservative estimate of total number of blocks, or 0 if unknown
|
// Return conservative estimate of total number of blocks, or 0 if unknown
|
||||||
int getTotalBlocksEstimate() const;
|
int getTotalBlocksEstimate() const;
|
||||||
|
|
||||||
|
QString formatFullVersion() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CWallet *wallet;
|
CWallet *wallet;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user