Remove DarksendConfig (#2132)

This commit is contained in:
UdjinM6 2018-07-12 12:03:26 +03:00 committed by GitHub
parent 43091a3efd
commit 3c89983db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 331 deletions

View File

@ -3,7 +3,6 @@ FORMS += \
../src/qt/forms/addressbookpage.ui \
../src/qt/forms/askpassphrasedialog.ui \
../src/qt/forms/coincontroldialog.ui \
../src/qt/forms/darksendconfig.ui \
../src/qt/forms/debugwindow.ui \
../src/qt/forms/editaddressdialog.ui \
../src/qt/forms/helpmessagedialog.ui \

View File

@ -31,7 +31,6 @@ QT_FORMS_UI = \
qt/forms/addressbookpage.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/coincontroldialog.ui \
qt/forms/darksendconfig.ui \
qt/forms/editaddressdialog.ui \
qt/forms/helpmessagedialog.ui \
qt/forms/intro.ui \
@ -62,7 +61,6 @@ QT_MOC_CPP = \
qt/moc_coincontroldialog.cpp \
qt/moc_coincontroltreewidget.cpp \
qt/moc_csvmodelwriter.cpp \
qt/moc_darksendconfig.cpp \
qt/moc_editaddressdialog.cpp \
qt/moc_guiutil.cpp \
qt/moc_intro.cpp \
@ -132,7 +130,6 @@ BITCOIN_QT_H = \
qt/coincontroldialog.h \
qt/coincontroltreewidget.h \
qt/csvmodelwriter.h \
qt/darksendconfig.h \
qt/editaddressdialog.h \
qt/guiconstants.h \
qt/guiutil.h \
@ -487,7 +484,6 @@ BITCOIN_QT_WALLET_CPP = \
qt/askpassphrasedialog.cpp \
qt/coincontroldialog.cpp \
qt/coincontroltreewidget.cpp \
qt/darksendconfig.cpp \
qt/editaddressdialog.cpp \
qt/masternodelist.cpp \
qt/openuridialog.cpp \

View File

@ -1,91 +0,0 @@
#include "darksendconfig.h"
#include "ui_darksendconfig.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "optionsmodel.h"
#include "privatesend-client.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
#include <QSettings>
DarksendConfig::DarksendConfig(QWidget *parent) :
QDialog(parent),
ui(new Ui::DarksendConfig),
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()));
}
DarksendConfig::~DarksendConfig()
{
delete ui;
}
void DarksendConfig::setModel(WalletModel *model)
{
this->model = model;
}
void DarksendConfig::clickBasic()
{
configure(true, 1000, 2);
QString strAmount(BitcoinUnits::formatWithUnit(
model->getOptionsModel()->getDisplayUnit(), 1000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
tr(
"PrivateSend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash's configuration screen."
).arg(strAmount)
);
close();
}
void DarksendConfig::clickHigh()
{
configure(true, 1000, 8);
QString strAmount(BitcoinUnits::formatWithUnit(
model->getOptionsModel()->getDisplayUnit(), 1000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
tr(
"PrivateSend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash's configuration screen."
).arg(strAmount)
);
close();
}
void DarksendConfig::clickMax()
{
configure(true, 1000, 16);
QString strAmount(BitcoinUnits::formatWithUnit(
model->getOptionsModel()->getDisplayUnit(), 1000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
tr(
"PrivateSend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash's configuration screen."
).arg(strAmount)
);
close();
}
void DarksendConfig::configure(bool enabled, int coins, int rounds) {
QSettings settings;
settings.setValue("nPrivateSendRounds", rounds);
settings.setValue("nPrivateSendAmount", coins);
privateSendClient.nPrivateSendRounds = rounds;
privateSendClient.nPrivateSendAmount = coins;
}

View File

@ -1,37 +0,0 @@
#ifndef DARKSENDCONFIG_H
#define DARKSENDCONFIG_H
#include <QDialog>
namespace Ui {
class DarksendConfig;
}
class WalletModel;
/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase.
*/
class DarksendConfig : public QDialog
{
Q_OBJECT
public:
DarksendConfig(QWidget *parent = 0);
~DarksendConfig();
void setModel(WalletModel *model);
private:
Ui::DarksendConfig *ui;
WalletModel *model;
void configure(bool enabled, int coins, int rounds);
private Q_SLOTS:
void clickBasic();
void clickHigh();
void clickMax();
};
#endif // DARKSENDCONFIG_H

View File

@ -1,188 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DarksendConfig</class>
<widget class="QDialog" name="DarksendConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>630</width>
<height>307</height>
</rect>
</property>
<property name="windowTitle">
<string>Configure PrivateSend</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 1000 DASH</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 1000 DASH</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 DASH to anonymize 1000 DASH</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 DASH to anonymize 1000 DASH</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 DASH per 1000 DASH 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>

View File

@ -19,7 +19,6 @@
#include "walletmodel.h"
#include "instantx.h"
#include "darksendconfig.h"
#include "masternode-sync.h"
#include "privatesend-client.h"
@ -646,15 +645,6 @@ void OverviewPage::togglePrivateSend(){
privateSendClient.UnlockCoins();
} else {
ui->togglePrivateSend->setText(tr("Stop Mixing"));
/* show darksend configuration if client has defaults set */
if(privateSendClient.nPrivateSendAmount == 0){
DarksendConfig dlg(this);
dlg.setModel(walletModel);
dlg.exec();
}
}
}