Browse Source

Remove outdated menu items

pull/19/head
Aditya Kulkarni 5 years ago
parent
commit
70774a477d
  1. 6
      src/controller.h
  2. 79
      src/liteinterface.cpp
  3. 5
      src/liteinterface.h
  4. 189
      src/mainwindow.cpp
  5. 3
      src/mainwindow.h
  6. 23
      src/mainwindow.ui
  7. 192
      src/turnstileprogress.ui
  8. 37
      src/validateaddress.cpp
  9. 23
      src/validateaddress.h
  10. 85
      src/validateaddress.ui
  11. 170
      src/zboard.ui
  12. 5
      zecwallet-lite.pro

6
src/controller.h

@ -64,14 +64,12 @@ public:
void createNewZaddr(bool sapling, const std::function<void(json)>& cb) { zrpc->createNewZaddr(sapling, cb); } void createNewZaddr(bool sapling, const std::function<void(json)>& cb) { zrpc->createNewZaddr(sapling, cb); }
void createNewTaddr(const std::function<void(json)>& cb) { zrpc->createNewTaddr(cb); } void createNewTaddr(const std::function<void(json)>& cb) { zrpc->createNewTaddr(cb); }
void validateAddress(QString address, const std::function<void(json)>& cb) { zrpc->validateAddress(address, cb); }
void fetchZPrivKey(QString addr, const std::function<void(json)>& cb) { zrpc->fetchZPrivKey(addr, cb); } void fetchZPrivKey(QString addr, const std::function<void(json)>& cb) { zrpc->fetchZPrivKey(addr, cb); }
void fetchTPrivKey(QString addr, const std::function<void(json)>& cb) { zrpc->fetchTPrivKey(addr, cb); } void fetchTPrivKey(QString addr, const std::function<void(json)>& cb) { zrpc->fetchTPrivKey(addr, cb); }
void fetchAllPrivKeys(const std::function<void(QList<QPair<QString, QString>>)> cb) { zrpc->fetchAllPrivKeys(cb); } void fetchAllPrivKeys(const std::function<void(QList<QPair<QString, QString>>)> cb) { zrpc->fetchAllPrivKeys(cb); }
void importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) { zrpc->importZPrivKey(addr, rescan, cb); } // void importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) { zrpc->importZPrivKey(addr, rescan, cb); }
void importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) { zrpc->importTPrivKey(addr, rescan, cb); } // void importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) { zrpc->importTPrivKey(addr, rescan, cb); }
QString getDefaultSaplingAddress(); QString getDefaultSaplingAddress();
QString getDefaultTAddress(); QString getDefaultTAddress();

79
src/liteinterface.cpp

@ -44,31 +44,18 @@ void LiteInterface::fetchUnspent(const std::function<void(json)>& cb) {
// conn->doRPCWithDefaultErrorHandling(payload, cb); // conn->doRPCWithDefaultErrorHandling(payload, cb);
} }
void LiteInterface::createNewZaddr(bool sapling, const std::function<void(json)>& cb) { void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
if (conn == nullptr) if (conn == nullptr)
return; return;
// json payload = { conn->doRPCWithDefaultErrorHandling("new", "z", cb);
// {"jsonrpc", "1.0"},
// {"id", "someid"},
// {"method", "z_getnewaddress"},
// {"params", { sapling ? "sapling" : "sprout" }},
// };
// conn->doRPCWithDefaultErrorHandling(payload, cb);
} }
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) { void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
if (conn == nullptr) if (conn == nullptr)
return; return;
// json payload = { conn->doRPCWithDefaultErrorHandling("new", "t", cb);
// {"jsonrpc", "1.0"},
// {"id", "someid"},
// {"method", "getnewaddress"},
// };
// conn->doRPCWithDefaultErrorHandling(payload, cb);
} }
void LiteInterface::fetchZPrivKey(QString addr, const std::function<void(json)>& cb) { void LiteInterface::fetchZPrivKey(QString addr, const std::function<void(json)>& cb) {
@ -99,50 +86,34 @@ void LiteInterface::fetchTPrivKey(QString addr, const std::function<void(json)>&
// conn->doRPCWithDefaultErrorHandling(payload, cb); // conn->doRPCWithDefaultErrorHandling(payload, cb);
} }
void LiteInterface::importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) { // void LiteInterface::importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) {
if (conn == nullptr) // if (conn == nullptr)
return; // return;
// json payload = {
// {"jsonrpc", "1.0"},
// {"id", "someid"},
// {"method", "z_importkey"},
// {"params", { addr.toStdString(), (rescan? "yes" : "no") }},
// };
// conn->doRPCWithDefaultErrorHandling(payload, cb);
}
void LiteInterface::importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
// json payload = { // // json payload = {
// {"jsonrpc", "1.0"}, // // {"jsonrpc", "1.0"},
// {"id", "someid"}, // // {"id", "someid"},
// {"method", "importprivkey"}, // // {"method", "z_importkey"},
// {"params", { addr.toStdString(), (rescan? "yes" : "no") }}, // // {"params", { addr.toStdString(), (rescan? "yes" : "no") }},
// }; // // };
// conn->doRPCWithDefaultErrorHandling(payload, cb); // // conn->doRPCWithDefaultErrorHandling(payload, cb);
} // }
void LiteInterface::validateAddress(QString address, const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
// QString method = Settings::isZAddress(address) ? "z_validateaddress" : "validateaddress"; // void LiteInterface::importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) {
// if (conn == nullptr)
// return;
// json payload = { // // json payload = {
// {"jsonrpc", "1.0"}, // // {"jsonrpc", "1.0"},
// {"id", "someid"}, // // {"id", "someid"},
// {"method", method.toStdString() }, // // {"method", "importprivkey"},
// {"params", { address.toStdString() } }, // // {"params", { addr.toStdString(), (rescan? "yes" : "no") }},
// }; // // };
// conn->doRPCWithDefaultErrorHandling(payload, cb); // // conn->doRPCWithDefaultErrorHandling(payload, cb);
} // }
void LiteInterface::fetchBalance(const std::function<void(json)>& cb) { void LiteInterface::fetchBalance(const std::function<void(json)>& cb) {
if (conn == nullptr) if (conn == nullptr)

5
src/liteinterface.h

@ -62,9 +62,8 @@ public:
void fetchZPrivKey(QString addr, const std::function<void(json)>& cb); void fetchZPrivKey(QString addr, const std::function<void(json)>& cb);
void fetchTPrivKey(QString addr, const std::function<void(json)>& cb); void fetchTPrivKey(QString addr, const std::function<void(json)>& cb);
void importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb); //void importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb);
void importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb); //void importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb);
void validateAddress(QString address, const std::function<void(json)>& cb);
void fetchAllPrivKeys(const std::function<void(QList<QPair<QString, QString>>)>); void fetchAllPrivKeys(const std::function<void(QList<QPair<QString, QString>>)>);

189
src/mainwindow.cpp

@ -1,7 +1,6 @@
#include "mainwindow.h" #include "mainwindow.h"
#include "addressbook.h" #include "addressbook.h"
#include "viewalladdresses.h" #include "viewalladdresses.h"
#include "validateaddress.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "ui_mobileappconnector.h" #include "ui_mobileappconnector.h"
#include "ui_addressbook.h" #include "ui_addressbook.h"
@ -11,7 +10,6 @@
#include "ui_settings.h" #include "ui_settings.h"
#include "ui_turnstileprogress.h" #include "ui_turnstileprogress.h"
#include "ui_viewalladdresses.h" #include "ui_viewalladdresses.h"
#include "ui_validateaddress.h"
#include "controller.h" #include "controller.h"
#include "balancestablemodel.h" #include "balancestablemodel.h"
#include "settings.h" #include "settings.h"
@ -83,9 +81,6 @@ MainWindow::MainWindow(QWidget *parent) :
payZcashURI(); payZcashURI();
}); });
// Import Private Key
QObject::connect(ui->actionImport_Private_Key, &QAction::triggered, this, &MainWindow::importPrivKey);
// Export All Private Keys // Export All Private Keys
QObject::connect(ui->actionExport_All_Private_Keys, &QAction::triggered, this, &MainWindow::exportAllKeys); QObject::connect(ui->actionExport_All_Private_Keys, &QAction::triggered, this, &MainWindow::exportAllKeys);
@ -95,13 +90,6 @@ MainWindow::MainWindow(QWidget *parent) :
// Export transactions // Export transactions
QObject::connect(ui->actionExport_transactions, &QAction::triggered, this, &MainWindow::exportTransactions); QObject::connect(ui->actionExport_transactions, &QAction::triggered, this, &MainWindow::exportTransactions);
// Z-board seems to have been abandoned
// z-Board.net
// QObject::connect(ui->actionz_board_net, &QAction::triggered, this, &MainWindow::postToZBoard);
// Validate Address
QObject::connect(ui->actionValidate_Address, &QAction::triggered, this, &MainWindow::validateAddress);
// Connect mobile app // Connect mobile app
QObject::connect(ui->actionConnect_Mobile_App, &QAction::triggered, this, [=] () { QObject::connect(ui->actionConnect_Mobile_App, &QAction::triggered, this, [=] () {
if (rpc->getConnection() == nullptr) if (rpc->getConnection() == nullptr)
@ -447,73 +435,30 @@ void MainWindow::donate() {
ui->tabWidget->setCurrentIndex(1); ui->tabWidget->setCurrentIndex(1);
} }
/** // void MainWindow::doImport(QList<QString>* keys) {
* Validate an address // if (rpc->getConnection() == nullptr) {
*/ // // No connection, just return
void MainWindow::validateAddress() { // return;
// Make sure everything is up and running // }
if (!getRPC() || !getRPC()->getConnection())
return;
// First thing is ask the user for an address
bool ok;
auto address = QInputDialog::getText(this, tr("Enter Address to validate"),
tr("Transparent or Shielded Address:") + QString(" ").repeated(140), // Pad the label so the dialog box is wide enough
QLineEdit::Normal, "", &ok);
if (!ok)
return;
getRPC()->validateAddress(address, [=] (json props) {
QDialog d(this);
Ui_ValidateAddress va;
va.setupUi(&d);
Settings::saveRestore(&d);
Settings::saveRestoreTableHeader(va.tblProps, &d, "validateaddressprops");
va.tblProps->horizontalHeader()->setStretchLastSection(true);
va.lblAddress->setText(address);
QList<QPair<QString, QString>> propsList;
for (auto it = props.begin(); it != props.end(); it++) {
propsList.append(
QPair<QString, QString>(
QString::fromStdString(it.key()), QString::fromStdString(it.value().dump()))
);
}
ValidateAddressesModel model(va.tblProps, propsList);
va.tblProps->setModel(&model);
d.exec();
});
}
void MainWindow::doImport(QList<QString>* keys) {
if (rpc->getConnection() == nullptr) {
// No connection, just return
return;
}
if (keys->isEmpty()) { // if (keys->isEmpty()) {
delete keys; // delete keys;
ui->statusBar->showMessage(tr("Private key import rescan finished")); // ui->statusBar->showMessage(tr("Private key import rescan finished"));
return; // return;
} // }
// Pop the first key // // Pop the first key
QString key = keys->first(); // QString key = keys->first();
keys->pop_front(); // keys->pop_front();
bool rescan = keys->isEmpty(); // bool rescan = keys->isEmpty();
if (key.startsWith("SK") || // if (key.startsWith("SK") ||
key.startsWith("secret")) { // Z key // key.startsWith("secret")) { // Z key
rpc->importZPrivKey(key, rescan, [=] (auto) { this->doImport(keys); }); // rpc->importZPrivKey(key, rescan, [=] (auto) { this->doImport(keys); });
} else { // } else {
rpc->importTPrivKey(key, rescan, [=] (auto) { this->doImport(keys); }); // rpc->importTPrivKey(key, rescan, [=] (auto) { this->doImport(keys); });
} // }
} // }
// Callback invoked when the RPC has finished loading all the balances, and the UI // Callback invoked when the RPC has finished loading all the balances, and the UI
@ -606,50 +551,50 @@ void MainWindow::payZcashURI(QString uri, QString myAddr) {
} }
void MainWindow::importPrivKey() { // void MainWindow::importPrivKey() {
QDialog d(this); // QDialog d(this);
Ui_PrivKey pui; // Ui_PrivKey pui;
pui.setupUi(&d); // pui.setupUi(&d);
Settings::saveRestore(&d); // Settings::saveRestore(&d);
pui.buttonBox->button(QDialogButtonBox::Save)->setVisible(false); // pui.buttonBox->button(QDialogButtonBox::Save)->setVisible(false);
pui.helpLbl->setText(QString() % // pui.helpLbl->setText(QString() %
tr("Please paste your private keys (z-Addr or t-Addr) here, one per line") % ".\n" % // tr("Please paste your private keys (z-Addr or t-Addr) here, one per line") % ".\n" %
tr("The keys will be imported into your connected zcashd node")); // tr("The keys will be imported into your connected zcashd node"));
if (d.exec() == QDialog::Accepted && !pui.privKeyTxt->toPlainText().trimmed().isEmpty()) { // if (d.exec() == QDialog::Accepted && !pui.privKeyTxt->toPlainText().trimmed().isEmpty()) {
auto rawkeys = pui.privKeyTxt->toPlainText().trimmed().split("\n"); // auto rawkeys = pui.privKeyTxt->toPlainText().trimmed().split("\n");
QList<QString> keysTmp; // QList<QString> keysTmp;
// Filter out all the empty keys. // // Filter out all the empty keys.
std::copy_if(rawkeys.begin(), rawkeys.end(), std::back_inserter(keysTmp), [=] (auto key) { // std::copy_if(rawkeys.begin(), rawkeys.end(), std::back_inserter(keysTmp), [=] (auto key) {
return !key.startsWith("#") && !key.trimmed().isEmpty(); // return !key.startsWith("#") && !key.trimmed().isEmpty();
}); // });
auto keys = new QList<QString>(); // auto keys = new QList<QString>();
std::transform(keysTmp.begin(), keysTmp.end(), std::back_inserter(*keys), [=](auto key) { // std::transform(keysTmp.begin(), keysTmp.end(), std::back_inserter(*keys), [=](auto key) {
return key.trimmed().split(" ")[0]; // return key.trimmed().split(" ")[0];
}); // });
// Special case. // // Special case.
// Sometimes, when importing from a paperwallet or such, the key is split by newlines, and might have // // Sometimes, when importing from a paperwallet or such, the key is split by newlines, and might have
// been pasted like that. So check to see if the whole thing is one big private key // // been pasted like that. So check to see if the whole thing is one big private key
if (Settings::getInstance()->isValidSaplingPrivateKey(keys->join(""))) { // if (Settings::getInstance()->isValidSaplingPrivateKey(keys->join(""))) {
auto multiline = keys; // auto multiline = keys;
keys = new QList<QString>(); // keys = new QList<QString>();
keys->append(multiline->join("")); // keys->append(multiline->join(""));
delete multiline; // delete multiline;
} // }
// Start the import. The function takes ownership of keys // // Start the import. The function takes ownership of keys
QTimer::singleShot(1, [=]() {doImport(keys);}); // QTimer::singleShot(1, [=]() {doImport(keys);});
// Show the dialog that keys will be imported. // // Show the dialog that keys will be imported.
QMessageBox::information(this, // QMessageBox::information(this,
"Imported", tr("The keys were imported. It may take several minutes to rescan the blockchain. Until then, functionality may be limited"), // "Imported", tr("The keys were imported. It may take several minutes to rescan the blockchain. Until then, functionality may be limited"),
QMessageBox::Ok); // QMessageBox::Ok);
} // }
} // }
/** /**
* Export transaction history into a CSV file * Export transaction history into a CSV file
@ -967,7 +912,7 @@ void MainWindow::setupTransactionsTab() {
void MainWindow::addNewZaddr(bool sapling) { void MainWindow::addNewZaddr(bool sapling) {
rpc->createNewZaddr(sapling, [=] (json reply) { rpc->createNewZaddr(sapling, [=] (json reply) {
QString addr = QString::fromStdString(reply.get<json::string_t>()); QString addr = QString::fromStdString(reply.get<json::array_t>()[0]);
// Make sure the RPC class reloads the z-addrs for future use // Make sure the RPC class reloads the z-addrs for future use
rpc->refreshAddresses(); rpc->refreshAddresses();
@ -1018,7 +963,7 @@ std::function<void(bool)> MainWindow::addZAddrsToComboList(bool sapling) {
void MainWindow::setupReceiveTab() { void MainWindow::setupReceiveTab() {
auto addNewTAddr = [=] () { auto addNewTAddr = [=] () {
rpc->createNewTaddr([=] (json reply) { rpc->createNewTaddr([=] (json reply) {
QString addr = QString::fromStdString(reply.get<json::string_t>()); QString addr = QString::fromStdString(reply.get<json::array_t>()[0]);
// Make sure the RPC class reloads the t-addrs for future use // Make sure the RPC class reloads the t-addrs for future use
rpc->refreshAddresses(); rpc->refreshAddresses();

3
src/mainwindow.h

@ -57,8 +57,6 @@ public:
void balancesReady(); void balancesReady();
void payZcashURI(QString uri = "", QString myAddr = ""); void payZcashURI(QString uri = "", QString myAddr = "");
void validateAddress();
void updateLabels(); void updateLabels();
void updateTAddrCombo(bool checked); void updateTAddrCombo(bool checked);
void updateFromCombo(); void updateFromCombo();
@ -119,7 +117,6 @@ private:
void donate(); void donate();
void addressBook(); void addressBook();
//void postToZBoard();
void importPrivKey(); void importPrivKey();
void exportAllKeys(); void exportAllKeys();
void exportKeys(QString addr = ""); void exportKeys(QString addr = "");

23
src/mainwindow.ui

@ -1062,7 +1062,6 @@
<addaction name="actionRequest_zcash"/> <addaction name="actionRequest_zcash"/>
<addaction name="actionPay_URI"/> <addaction name="actionPay_URI"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionImport_Private_Key"/>
<addaction name="actionExport_All_Private_Keys"/> <addaction name="actionExport_All_Private_Keys"/>
<addaction name="actionBackup_wallet_dat"/> <addaction name="actionBackup_wallet_dat"/>
<addaction name="separator"/> <addaction name="separator"/>
@ -1084,10 +1083,6 @@
<string>&amp;Apps</string> <string>&amp;Apps</string>
</property> </property>
<addaction name="actionConnect_Mobile_App"/> <addaction name="actionConnect_Mobile_App"/>
<addaction name="actionValidate_Address"/>
<addaction name="separator"/>
<addaction name="actionz_board_net"/>
<addaction name="actionTurnstile_Migration"/>
</widget> </widget>
<widget class="QMenu" name="menu_Edit"> <widget class="QMenu" name="menu_Edit">
<property name="title"> <property name="title">
@ -1131,19 +1126,6 @@
<string>Check github.com for &amp;updates</string> <string>Check github.com for &amp;updates</string>
</property> </property>
</action> </action>
<action name="actionTurnstile_Migration">
<property name="text">
<string>Sapling &amp;turnstile</string>
</property>
<property name="shortcut">
<string>Ctrl+A, Ctrl+T</string>
</property>
</action>
<action name="actionImport_Private_Key">
<property name="text">
<string>&amp;Import private key</string>
</property>
</action>
<action name="actionExport_All_Private_Keys"> <action name="actionExport_All_Private_Keys">
<property name="text"> <property name="text">
<string>&amp;Export all private keys</string> <string>&amp;Export all private keys</string>
@ -1195,11 +1177,6 @@
<string>File a bug...</string> <string>File a bug...</string>
</property> </property>
</action> </action>
<action name="actionValidate_Address">
<property name="text">
<string>Validate Address</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>

192
src/turnstileprogress.ui

@ -1,192 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TurnstileProgress</class>
<widget class="QDialog" name="TurnstileProgress">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Turnstile Migration Progress</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>From</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>To</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="fromAddr">
<property name="text">
<string notr="true">From Address</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="progressTxt">
<property name="text">
<string notr="true">4 / 12</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="12" column="1" colspan="2">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Please ensure you have your wallet.dat backed up!</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="QLabel" name="nextTx">
<property name="text">
<string>Next Transaction in 4 hours</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>33</number>
</property>
</widget>
</item>
<item row="13" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Migration Progress</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Discard</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="msgIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<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 row="5" column="0" colspan="3">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="toAddr">
<property name="text">
<string notr="true">To Address</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>TurnstileProgress</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>TurnstileProgress</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>

37
src/validateaddress.cpp

@ -1,37 +0,0 @@
#include "validateaddress.h"
ValidateAddressesModel::ValidateAddressesModel(QTableView *parent, QList<QPair<QString, QString>> props)
: QAbstractTableModel(parent) {
headers << tr("Property") << tr("Value");
this->props = props;
}
int ValidateAddressesModel::rowCount(const QModelIndex&) const {
return props.size();
}
int ValidateAddressesModel::columnCount(const QModelIndex&) const {
return headers.size();
}
QVariant ValidateAddressesModel::data(const QModelIndex &index, int role) const {
QPair<QString, QString> p = props.at(index.row());
if (role == Qt::DisplayRole) {
switch(index.column()) {
case 0: return p.first;
case 1: return p.second;
}
}
return QVariant();
}
QVariant ValidateAddressesModel::headerData(int section, Qt::Orientation orientation, int role) const {
if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
return headers.at(section);
}
return QVariant();
}

23
src/validateaddress.h

@ -1,23 +0,0 @@
#ifndef VALIDATEADDRESS_H
#define VALIDATEADDRESS_H
#include "precompiled.h"
class ValidateAddressesModel : public QAbstractTableModel {
public:
ValidateAddressesModel(QTableView* parent, QList<QPair<QString, QString>> props);
~ValidateAddressesModel() = default;
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;
private:
QList<QPair<QString, QString>> props;
QStringList headers;
};
#endif // VALIDATEADDRESS_H

85
src/validateaddress.ui

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ValidateAddress</class>
<widget class="QDialog" name="ValidateAddress">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Validate Address</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLabel" name="lblAddress">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Address:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QTableView" name="tblProps">
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
</widget>
</item>
<item row="2" column="0" colspan="2">
<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>ValidateAddress</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>ValidateAddress</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>

170
src/zboard.ui

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>zboard</class>
<widget class="QDialog" name="zboard">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>588</width>
<height>431</height>
</rect>
</property>
<property name="windowTitle">
<string>Post to z-board.net</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="14" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Total Fee</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QLabel" name="feeAmount">
<property name="text">
<string notr="true">feeamount</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLabel" name="memoSize">
<property name="text">
<string notr="true">0 / 512</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="16" column="0" colspan="2">
<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>
<item row="12" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Memo</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2">
<widget class="QLineEdit" name="postAs">
<property name="placeholderText">
<string>(optional)</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Send From</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Post As:</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;ZBoard: Fully anonymous and untraceable chat messages based on the ZCash blockchain. &lt;a href=&quot;http://www.z-board.net/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.z-board.net/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="13" column="0" colspan="2">
<widget class="QPlainTextEdit" name="memoTxt"/>
</item>
<item row="6" column="0" colspan="2">
<widget class="QComboBox" name="fromAddr"/>
</item>
<item row="15" column="0">
<widget class="QLabel" name="testnetWarning">
<property name="styleSheet">
<string notr="true">color:red;</string>
</property>
<property name="text">
<string>Warning</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="topicsList"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Posting to Board</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>fromAddr</tabstop>
<tabstop>postAs</tabstop>
<tabstop>memoTxt</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>zboard</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>zboard</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>

5
zecwallet-lite.pro

@ -51,7 +51,6 @@ SOURCES += \
src/addressbook.cpp \ src/addressbook.cpp \
src/logger.cpp \ src/logger.cpp \
src/addresscombo.cpp \ src/addresscombo.cpp \
src/validateaddress.cpp \
src/websockets.cpp \ src/websockets.cpp \
src/mobileappconnector.cpp \ src/mobileappconnector.cpp \
src/recurring.cpp \ src/recurring.cpp \
@ -78,7 +77,6 @@ HEADERS += \
src/addressbook.h \ src/addressbook.h \
src/logger.h \ src/logger.h \
src/addresscombo.h \ src/addresscombo.h \
src/validateaddress.h \
src/websockets.h \ src/websockets.h \
src/mobileappconnector.h \ src/mobileappconnector.h \
src/recurring.h \ src/recurring.h \
@ -97,13 +95,10 @@ FORMS += \
src/settings.ui \ src/settings.ui \
src/about.ui \ src/about.ui \
src/confirm.ui \ src/confirm.ui \
src/turnstileprogress.ui \
src/privkey.ui \ src/privkey.ui \
src/memodialog.ui \ src/memodialog.ui \
src/validateaddress.ui \
src/viewalladdresses.ui \ src/viewalladdresses.ui \
src/connection.ui \ src/connection.ui \
src/zboard.ui \
src/addressbook.ui \ src/addressbook.ui \
src/mobileappconnector.ui \ src/mobileappconnector.ui \
src/createzcashconfdialog.ui \ src/createzcashconfdialog.ui \

Loading…
Cancel
Save