diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index bd1cf763f856c..87f4953b66863 100755 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -47,7 +47,6 @@ QT_FORMS_UI = \ qt/forms/bip38tooldialog.ui \ qt/forms/coincontroldialog.ui \ qt/forms/blockexplorer.ui \ - qt/forms/obfuscationconfig.ui \ qt/forms/editaddressdialog.ui \ qt/forms/governancepage.ui \ qt/forms/helpmessagedialog.ui \ @@ -83,7 +82,6 @@ QT_MOC_CPP = \ qt/moc_coincontroldialog.cpp \ qt/moc_coincontroltreewidget.cpp \ qt/moc_csvmodelwriter.cpp \ - qt/moc_obfuscationconfig.cpp \ qt/moc_editaddressdialog.cpp \ qt/moc_governancepage.cpp \ qt/moc_guiutil.cpp \ @@ -159,7 +157,6 @@ BITCOIN_QT_H = \ qt/coincontroldialog.h \ qt/coincontroltreewidget.h \ qt/csvmodelwriter.h \ - qt/obfuscationconfig.h \ qt/editaddressdialog.h \ qt/governancepage.h \ qt/guiconstants.h \ @@ -312,7 +309,6 @@ BITCOIN_QT_WALLET_CPP = \ qt/blockexplorer.cpp \ qt/coincontroldialog.cpp \ qt/coincontroltreewidget.cpp \ - qt/obfuscationconfig.cpp \ qt/editaddressdialog.cpp \ qt/governancepage.cpp \ qt/masternodelist.cpp \ diff --git a/src/qt/obfuscationconfig.cpp b/src/qt/obfuscationconfig.cpp deleted file mode 100644 index 61d237fc4f0f0..0000000000000 --- a/src/qt/obfuscationconfig.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2014-2016 The Dash Developers -// Copyright (c) 2016-2017 The PIVX developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include "obfuscationconfig.h" -#include "ui_obfuscationconfig.h" - -#include "bitcoinunits.h" -#include "guiconstants.h" -#include "init.h" -#include "optionsmodel.h" -#include "walletmodel.h" - -#include -#include -#include -#include - -ObfuscationConfig::ObfuscationConfig(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), - ui(new Ui::ObfuscationConfig), - model(0) -{ - ui->setupUi(this); - - connect(ui->buttonBasic, SIGNAL(clicked()), this, SLOT(clickBasic())); - connect(ui->buttonHigh, SIGNAL(clicked()), this, SLOT(clickHigh())); - connect(ui->buttonMax, SIGNAL(clicked()), this, SLOT(clickMax())); -} - -ObfuscationConfig::~ObfuscationConfig() -{ - delete ui; -} - -void ObfuscationConfig::setModel(WalletModel* model) -{ - this->model = model; -} - -void ObfuscationConfig::clickBasic() -{ - configure(true, 1000, 2); - - QString strAmount(BitcoinUnits::formatWithUnit( - model->getOptionsModel()->getDisplayUnit(), 1000 * COIN)); - QMessageBox::information(this, tr("Obfuscation Configuration"), - tr( - "Obfuscation was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening PIVX's configuration screen.") - .arg(strAmount)); - - close(); -} - -void ObfuscationConfig::clickHigh() -{ - configure(true, 1000, 8); - - QString strAmount(BitcoinUnits::formatWithUnit( - model->getOptionsModel()->getDisplayUnit(), 1000 * COIN)); - QMessageBox::information(this, tr("Obfuscation Configuration"), - tr( - "Obfuscation was successfully set to high (%1 and 8 rounds). You can change this at any time by opening PIVX's configuration screen.") - .arg(strAmount)); - - close(); -} - -void ObfuscationConfig::clickMax() -{ - configure(true, 1000, 16); - - QString strAmount(BitcoinUnits::formatWithUnit( - model->getOptionsModel()->getDisplayUnit(), 1000 * COIN)); - QMessageBox::information(this, tr("Obfuscation Configuration"), - tr( - "Obfuscation was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening PIVX's configuration screen.") - .arg(strAmount)); - - close(); -} - -void ObfuscationConfig::configure(bool enabled, int coins, int rounds) -{ - QSettings settings; - - settings.setValue("nObfuscationRounds", rounds); - settings.setValue("nAnonymizePivxAmount", coins); - - nZeromintPercentage = rounds; - nAnonymizePivxAmount = coins; -} diff --git a/src/qt/obfuscationconfig.h b/src/qt/obfuscationconfig.h deleted file mode 100644 index 598bb8ddfdbeb..0000000000000 --- a/src/qt/obfuscationconfig.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014-2016 The Dash Developers -// Copyright (c) 2016-2017 The PIVX developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#ifndef OBFUSCATIONCONFIG_H -#define OBFUSCATIONCONFIG_H - -#include - -namespace Ui -{ -class ObfuscationConfig; -} -class WalletModel; - -/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase. - */ -class ObfuscationConfig : public QDialog -{ - Q_OBJECT - -public: - ObfuscationConfig(QWidget* parent = 0); - ~ObfuscationConfig(); - - void setModel(WalletModel* model); - - -private: - Ui::ObfuscationConfig* ui; - WalletModel* model; - void configure(bool enabled, int coins, int rounds); - -private slots: - - void clickBasic(); - void clickHigh(); - void clickMax(); -}; - -#endif // OBFUSCATIONCONFIG_H diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 56d0cf07621a3..c93261875e30b 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -13,7 +13,6 @@ #include "guiutil.h" #include "init.h" #include "obfuscation.h" -#include "obfuscationconfig.h" #include "optionsmodel.h" #include "transactionfilterproxy.h" #include "transactionrecord.h"