[Dev] Documenting Feathercoin Specific Software settings - Part 4
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/forms/merchantlist.ui
+ <height>461</height>
Code change size
+ <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QLabel" name="label_left_3"> + <property name="cursor"> + <cursorShape>PointingHandCursor</cursorShape> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../feathercoin.qrc">:/images/merchant_bitbooks</pixmap> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_left_4"> + <property name="cursor"> + <cursorShape>PointingHandCursor</cursorShape> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../feathercoin.qrc">:/images/merchant_coinverted</pixmap> + </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> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QLabel" name="label_left_5"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_left_6"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item>
New code layout
+ <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QLabel" name="label_right_7"> + <property name="cursor"> + <cursorShape>PointingHandCursor</cursorShape> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../feathercoin.qrc">:/images/merchant_shapeshift</pixmap> + </property> + </widget> + </item> + </layout> + </item> + <item>
New code layout
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/forms/shiftdialog.ui
New file for shapeshift interface
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>ShiftDialog</class> <widget class="QDialog" name="ShiftDialog"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>560</width> <height>425</height> </rect> </property> <property name="windowTitle"> <string>ShapeShift</string> </property> <property name="modal"> <bool>true</bool>
Start of code 1192 lines
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/merchantlist.cpp
+ ui->label_left_3->installEventFilter(this); + ui->label_left_4->installEventFilter(this); + ui->label_right_7->installEventFilter(this);
Code addition
+ if (obj == ui->label_left_3) { + QDesktopServices::openUrl(QUrl("http://bitbooks.co")); + return true; + } + if (obj == ui->label_left_4) { + QDesktopServices::openUrl(QUrl("http://coinverted.com")); + return true; + }
Code addition
+ if (obj == ui->label_right_7) { + QDesktopServices::openUrl(QUrl("http://shapeshift.io")); + return true; + }
Code addition
+ #if QT_VERSION >= 0x040700 + ui->thirdPartyTxUrls->setPlaceholderText("http://explorer.feathercoin.com/tx/%s"); + #endif
Code addition ifdef Qt version
+ /* Wallet */ + connect(ui->spendZeroConfChange, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning())); + connect(ui->thirdPartyTxUrls, SIGNAL(textChanged(const QString &)), this, SLOT(showRestartWarning())); + mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
Added code shapeshift
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/res/images/*
src/qt/res/icons/shapeshift.png src/qt/res/images/bitbooks.png src/qt/res/images/bitbooks.png src/qt/res/images/coinverted.png src/qt/res/images/shapeshift.png src/qt/res/images/splash.png
New images and icons added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/shiftdialog.cpp
New file for shapeshift
+ // 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. + + #if defined(HAVE_CONFIG_H) + #include "bitcoin-config.h" + #endif + + #include "shiftdialog.h" + #include "ui_shiftdialog.h" + + #include "bitcoinunits.h" + #include "guiutil.h" + #include "monitoreddatamapper.h" + #include "optionsmodel.h" + + #include "main.h" // for CTransaction::nMinTxFee and MAX_SCRIPTCHECK_THREADS + #include "netbase.h" + #include "txdb.h" // for -dbcache defaults
Start of code for new file 454 lines of code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add the Shapeshift API interface : - commit
https://github.com/FeatherCoin/Feathercoin/commit/e20615c45c07f8a4a433d3baf907934c5a8f3039
src/qt/shiftdialog.h
New file for shapeshift
+ // 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 SHIFTDIALOG_H + #define SHIFTDIALOG_H + + #include <QDialog> + #include <QtNetwork> + + class MonitoredDataMapper; + class OptionsModel; + class QValidatedLineEdit; + + namespace Ui { + class ShiftDialog; + } + + /** Preferences dialog. */ + class ShiftDialog : public QDialog
New file for shapeshift start of code …
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/bitcoingui.cpp
Update for shapeshift
+ lockWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Lock wallet"), this); + lockWalletAction->setToolTip(tr("Lock wallet")); + lockWalletAction->setCheckable(true); + + unlockWalletAction = new QAction(QIcon(":/icons/lock_open"), tr("Unlo&ck wallet"), this); + unlockWalletAction->setToolTip(tr("Unlock wallet")); + unlockWalletAction->setCheckable(true);
Additional code
+ connect(lockWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(lockWallet())); + connect(unlockWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(unlockWallet())); +
Additional code
+ file->addAction(lockWalletAction); + file->addAction(unlockWalletAction); + file->addSeparator();
Additional code
+ lockWalletAction->setEnabled(false); + unlockWalletAction->setEnabled(false);
Additional code
+ lockWalletAction->setEnabled(true); + lockWalletAction->setChecked(false); + unlockWalletAction->setEnabled(false); + unlockWalletAction->setChecked(true);
Additional code
+ lockWalletAction->setChecked(true); + lockWalletAction->setEnabled(false); + unlockWalletAction->setChecked(false); + unlockWalletAction->setEnabled(true);
Additional code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/bitcoingui.h
Update for shapeshift
- WalletFrame *walletFrame;
Code replaced
+ WalletModel *walletModel; + WalletFrame *walletFrame;
Additional code
+ QAction *lockWalletAction; + QAction *unlockWalletAction;
Additional code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/walletframe.cpp
Update for shapeshift
+ void WalletFrame::lockWallet() + { + WalletView *walletView = currentWalletView(); + if (walletView) + walletView->lockWallet(); + } +
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/walletframe.h
Update for shapeshift
+ /** Lock the wallet */ + void lockWallet();
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/walletframe.h
+ /** Lock the wallet */ + void lockWallet();
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/walletview.cpp
+ void WalletView::lockWallet() + { + if(!walletModel) + return; + // Lock wallet when requested by wallet model + if (walletModel->getEncryptionStatus() == WalletModel::Unlocked) + { + SecureString dummy; + walletModel->setWalletLocked(true, dummy); + } + } +
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add lock/unlock menu : - commit
https://github.com/FeatherCoin/Feathercoin/commit/6f0ff3bb8b59d5955d1fcb9614ed9259061ca882
src/qt/walletview.h
+ /** Lock the wallet */ + void lockWallet();