Permalink
Browse files

Print Paper Wallet

  • Loading branch information...
cqtenq9@gmail.com
cqtenq9@gmail.com committed Jul 8, 2016
1 parent 482589d commit 7d26f9700396fa9255cad124eb1e029b40653b01
@@ -129,11 +129,14 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
if test "x$bitcoin_cv_need_acc_widget" = "xyes"; then
if test x$qt_plugin_path != x; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
QT_LIBS="$QT_LIBS -L$qt_plugin_path/printsupport"
fi
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
fi
if test x$TARGET_OS = xwindows; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)],[-lwindowsprintersupport])
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
elif test x$TARGET_OS = xlinux; then
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
@@ -163,8 +166,9 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
Q_IMPORT_PLUGIN(AccessibleFactory)],
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
Q_IMPORT_PLUGIN(AccessibleFactory)
Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)],
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets -lwindowsprintersupport])
fi
fi
CPPFLAGS=$TEMP_CPPFLAGS
@@ -318,7 +322,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
QT_LIB_PREFIX=Qt
bitcoin_qt_got_major_vers=4
fi
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5PrintSupport"
qt4_modules="QtCore QtGui QtNetwork"
BITCOIN_QT_CHECK([
if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
@@ -362,7 +366,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
TEMP_LIBS="$LIBS"
BITCOIN_QT_CHECK([
if test x$qt_include_path != x; then
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus"
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus -I$qt_include_path/QtPrintSupport"
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
fi
])
@@ -405,6 +409,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
if test x$bitcoin_qt_got_major_vers = x5; then
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PrintSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPrintSupport not found)))
fi
QT_LIBS="$LIBS"
LIBS="$TEMP_LIBS"
@@ -0,0 +1,24 @@
FORMS += \
../src/qt/forms/aboutdialog.ui \
../src/qt/forms/addressbookpage.ui \
../src/qt/forms/askpassphrasedialog.ui \
../src/qt/forms/coincontroldialog.ui \
../src/qt/forms/editaddressdialog.ui \
../src/qt/forms/helpmessagedialog.ui \
../src/qt/forms/intro.ui \
../src/qt/forms/openuridialog.ui \
../src/qt/forms/optionsdialog.ui \
../src/qt/forms/overviewpage.ui \
../src/qt/forms/receivecoinsdialog.ui \
../src/qt/forms/receiverequestdialog.ui \
../src/qt/forms/rpcconsole.ui \
../src/qt/forms/sendcoinsdialog.ui \
../src/qt/forms/sendcoinsentry.ui \
../src/qt/forms/signverifymessagedialog.ui \
../src/qt/forms/transactiondescdialog.ui \
RESOURCES += \
../src/qt/bitcoin.qrc
QT += \
printsupport
@@ -85,6 +85,7 @@ QT_FORMS_UI = \
qt/forms/openuridialog.ui \
qt/forms/optionsdialog.ui \
qt/forms/commentdialog.ui \
qt/forms/paperwalletdialog.ui \
qt/forms/overviewpage.ui \
qt/forms/receivecoinsdialog.ui \
qt/forms/receiverequestdialog.ui \
@@ -137,6 +138,7 @@ QT_MOC_CPP = \
qt/moc_utilitydialog.cpp \
qt/moc_walletframe.cpp \
qt/moc_walletmodel.cpp \
qt/moc_verticallabel.cpp \
qt/moc_walletview.cpp
BITCOIN_MM = \
@@ -204,6 +206,7 @@ BITCOIN_QT_H = \
qt/transactionrecord.h \
qt/transactiontablemodel.h \
qt/transactionview.h \
qt/verticallabel.h \
qt/utilitydialog.h \
qt/walletframe.h \
qt/walletmodel.h \
@@ -259,6 +262,7 @@ RES_ICONS = \
qt/res/icons/tx_output.png \
qt/res/icons/tx_mined.png \
qt/res/icons/warning.png \
qt/res/icons/print.png \
qt/res/icons/verify.png
BITCOIN_QT_CPP = \
@@ -281,6 +285,7 @@ BITCOIN_QT_CPP = \
qt/scicon.cpp \
qt/splashscreen.cpp \
qt/trafficgraphwidget.cpp \
qt/verticallabel.cpp \
qt/utilitydialog.cpp
if TARGET_WINDOWS
@@ -317,7 +322,8 @@ BITCOIN_QT_CPP += \
qt/walletview.cpp
endif
RES_IMAGES =
RES_IMAGES = \
qt/res/images/paper_wallet.png
RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
@@ -66,6 +66,8 @@ Q_IMPORT_PLUGIN(AccessibleFactory)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
#elif defined(QT_QPA_PLATFORM_WINDOWS)
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin);
#elif defined(QT_QPA_PLATFORM_COCOA)
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
#endif
@@ -47,6 +47,7 @@
<file alias="about_qt">res/icons/about_qt.png</file>
<file alias="verify">res/icons/verify.png</file>
<file alias="warning">res/icons/warning.png</file>
<file alias="print">res/icons/print.png</file>
</qresource>
<qresource prefix="/movies">
<file alias="spinner-000">res/movies/spinner-000.png</file>
@@ -86,4 +87,7 @@
<file alias="spinner-034">res/movies/spinner-034.png</file>
<file alias="spinner-035">res/movies/spinner-035.png</file>
</qresource>
<qresource prefix="/images">
<file alias="paper_wallet">res/images/paper_wallet.png</file>
</qresource>
</RCC>
@@ -344,6 +344,8 @@ void BitcoinGUI::createActions()
inertBlockChainAction = new QAction(QIcon(":/icons/comment"), tr("&Comments"), this);
inertBlockChainAction->setStatusTip(tr("Insert your comments into blockchain"));
paperWalletAction = new QAction(QIcon(":/icons/print"), tr("&Print paper wallets"), this);
paperWalletAction->setStatusTip(tr("Print paper wallets"));
openRPCConsoleAction = new QAction(TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this);
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
@@ -384,6 +386,7 @@ void BitcoinGUI::createActions()
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
connect(inertBlockChainAction, SIGNAL(triggered()), walletFrame, SLOT(inertBlockChain()));
connect(paperWalletAction, SIGNAL(triggered()), walletFrame, SLOT(printPaperWallets()));
}
#endif // ENABLE_WALLET
}
@@ -404,6 +407,7 @@ void BitcoinGUI::createMenuBar()
{
file->addAction(openAction);
file->addAction(backupWalletAction);
file->addAction(paperWalletAction);
file->addSeparator();
file->addAction(encryptWalletAction);
file->addAction(changePassphraseAction);
@@ -535,6 +539,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
usedReceivingAddressesAction->setEnabled(enabled);
openAction->setEnabled(enabled);
inertBlockChainAction->setEnabled(enabled);
paperWalletAction->setEnabled(enabled);
}
void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
@@ -131,6 +131,7 @@ class BitcoinGUI : public QMainWindow
QAction *lockWalletAction;
QAction *unlockWalletAction;
QAction *inertBlockChainAction;
QAction *paperWalletAction;
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
Oops, something went wrong.

0 comments on commit 7d26f97

Please sign in to comment.