0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-06 10:18:44 -05:00
bitcoin-bitcoin-core/src/qt
Jonas Schnelli 25cf18f239
Merge #12610: Multiwallet for the GUI
779c5f984 Qt: hide RPCConsole wallet selector when no wallets are present (Jonas Schnelli)
dc6f150f3 Qt: show wallet name in request dlg in case of multiwallet (Jonas Schnelli)
4826ca4b8 Qt: show wallet name in send confirmation dlg in case of multiwallet (Jonas Schnelli)
cfa4133ce GUI: RPCConsole: Log wallet changes (Luke Dashjr)
b6d04fc7c Qt: Get wallet name from WalletModel rather than passing it around (Luke Dashjr)
12d8d2681 Qt: When multiple wallets are used, include in notifications the name (Jonas Schnelli)
d1ec34a76 Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at all until needed (Luke Dashjr)
d49cc70e6 Qt: Add wallet selector to debug console (Jonas Schnelli)
d558f44c5 Bugfix: RPC: Add missing UnregisterHTTPHandler for /wallet/ (Luke Dashjr)
85d531971 Qt: Ensure UI updates only come from the currently selected walletView (Luke Dashjr)
e449f9a9e Qt: Add a combobox to toolbar to select from multiple wallets (Luke Dashjr)
3dba3c3ac Qt: Load all wallets into WalletModels (Luke Dashjr)

Pull request description:

  This is an overhaul of #11383 (plus some additions).
  It avoids unnecessary coupling of httpserver/jsonrpc and the wallet as well as it avoids pointer pure passing (and pointer deletion) of `CWallet` (plus other minor design changes).

  Additionally it adds the wallet name to the sendconfirmation and request dialog (in case multiwallet is active)

Tree-SHA512: 3d06e18badbc5d1821e488bf1dae463bb0be544cf11b2b618e025812bfdd13c5f39604bb93b4c705313930e7dc4e66f4848b9469ba14871bade58e7a027246a1
2018-03-26 18:51:38 +07:00
..
forms Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
locale qt: Periodic translations update 2018-01-30 13:43:26 +01:00
res [qt] Make network disabled icon 50% opaque 2016-11-13 22:06:35 +01:00
test Merge #12723: Qt5: Warning users about invalid-BIP21 URI bitcoin:// 2018-03-21 16:57:27 +01:00
addressbookpage.cpp Qt: remove "new" button during receive-mode in addressbook 2018-03-19 12:13:08 +07:00
addressbookpage.h [qt] Add support to search the address book 2018-01-03 16:15:15 +00:00
addresstablemodel.cpp wallet: Change output type globals to members 2018-03-17 16:10:01 -04:00
addresstablemodel.h wallet: Change output type globals to members 2018-03-17 16:10:01 -04:00
askpassphrasedialog.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
askpassphrasedialog.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
bantablemodel.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
bantablemodel.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
bitcoin.cpp Qt: Get wallet name from WalletModel rather than passing it around 2018-03-26 18:40:26 +07:00
bitcoin.qrc Overhaul network activity toggle 2016-10-24 10:23:58 +00:00
bitcoin_locale.qrc qt: periodic translations update 2017-01-10 12:52:02 +01:00
bitcoinaddressvalidator.cpp Split key_io (address/key encodings) off from base58 2018-02-19 18:55:21 -08:00
bitcoinaddressvalidator.h Added "Core" to copyright headers 2014-12-19 19:55:32 +01:00
bitcoinamountfield.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
bitcoinamountfield.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
bitcoingui.cpp Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
bitcoingui.h Qt: Get wallet name from WalletModel rather than passing it around 2018-03-26 18:40:26 +07:00
bitcoinstrings.cpp initwallet: Do not translate highly technical addresstype help 2018-01-24 11:30:44 -05:00
bitcoinunits.cpp Merge #12035: [qt] change µBTC to bits 2018-01-03 22:16:13 -10:00
bitcoinunits.h Merge #12035: [qt] change µBTC to bits 2018-01-03 22:16:13 -10:00
callback.h Declare single-argument (non-converting) constructors "explicit" 2017-08-16 16:33:25 +02:00
clientmodel.cpp Fix missing cs_main lock for GuessVerificationProgress() 2018-01-30 17:49:22 -10:00
clientmodel.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
coincontroldialog.cpp Fix typos 2018-03-21 08:34:44 +02:00
coincontroldialog.h [gui] Defer coin control instancing 2018-02-01 19:40:20 +00:00
coincontroltreewidget.cpp Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2018-02-07 16:15:28 -05:00
coincontroltreewidget.h Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
csvmodelwriter.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
csvmodelwriter.h Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
editaddressdialog.cpp Merge #12721: Qt: remove "new" button during receive-mode in addressbook 2018-03-20 09:15:22 +01:00
editaddressdialog.h Qt: remove "new" button during receive-mode in addressbook 2018-03-19 12:13:08 +07:00
guiconstants.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
guiutil.cpp Qt: Warn users about invalid-BIP21 URI bitcoin:// 2018-03-21 15:40:08 +03:00
guiutil.h Fix typos 2018-03-21 08:34:44 +02:00
intro.cpp qt: Bump BLOCK_CHAIN_SIZE to 200GB 2018-01-24 17:17:55 +01:00
intro.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
macdockiconhandler.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
macdockiconhandler.mm Document the preference of nullptr over NULL or (void*)0 2017-08-18 09:51:00 +02:00
macnotificationhandler.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
macnotificationhandler.mm [macOS] remove Growl support, remove unused code 2017-09-07 10:11:44 -07:00
Makefile build: add stub makefiles for easier subdir builds 2014-06-05 16:05:43 -04:00
modaloverlay.cpp Fix typos 2018-03-21 08:34:44 +02:00
modaloverlay.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
networkstyle.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
networkstyle.h Added "Core" to copyright headers 2014-12-19 19:55:32 +01:00
notificator.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
notificator.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
openuridialog.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
openuridialog.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
optionsdialog.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
optionsdialog.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
optionsmodel.cpp boost: drop boost threads for upnp 2018-02-08 14:35:28 -05:00
optionsmodel.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
overviewpage.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
overviewpage.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
paymentrequest.proto Specify Protobuf version 2 in paymentrequest.proto 2016-09-16 11:45:08 +08:00
paymentrequestplus.cpp Split key_io (address/key encodings) off from base58 2018-02-19 18:55:21 -08:00
paymentrequestplus.h Split key_io (address/key encodings) off from base58 2018-02-19 18:55:21 -08:00
paymentserver.cpp Merge #11536: Rename account to label where appropriate 2018-03-22 21:27:53 +01:00
paymentserver.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
peertablemodel.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
peertablemodel.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
platformstyle.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
platformstyle.h qt: Introduce PlatformStyle 2015-07-31 09:35:18 +02:00
qvalidatedlineedit.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
qvalidatedlineedit.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
qvaluecombobox.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
qvaluecombobox.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
README.md [docs] initial QT documentation, move Qt Creator instructions 2017-12-19 16:48:07 +01:00
receivecoinsdialog.cpp Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
receivecoinsdialog.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
receiverequestdialog.cpp Qt: show wallet name in request dlg in case of multiwallet 2018-03-26 18:40:27 +07:00
receiverequestdialog.h Qt: show wallet name in request dlg in case of multiwallet 2018-03-26 18:40:27 +07:00
recentrequeststablemodel.cpp Merge #12035: [qt] change µBTC to bits 2018-01-03 22:16:13 -10:00
recentrequeststablemodel.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
rpcconsole.cpp Qt: hide RPCConsole wallet selector when no wallets are present 2018-03-26 18:40:27 +07:00
rpcconsole.h GUI: RPCConsole: Log wallet changes 2018-03-26 18:40:27 +07:00
sendcoinsdialog.cpp Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
sendcoinsdialog.h [qt] navigate to transaction history page after send 2018-03-01 10:40:36 +01:00
sendcoinsentry.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
sendcoinsentry.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
signverifymessagedialog.cpp Split key_io (address/key encodings) off from base58 2018-02-19 18:55:21 -08:00
signverifymessagedialog.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
splashscreen.cpp Fix typos 2018-03-21 08:34:44 +02:00
splashscreen.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
trafficgraphwidget.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
trafficgraphwidget.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
transactiondesc.cpp Merge #12620: Remove TransactionTableModel::TxIDRole 2018-03-07 16:49:59 +01:00
transactiondesc.h Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
transactiondescdialog.cpp qt: Remove TransactionTableModel::TxIDRole 2018-03-07 13:08:20 +00:00
transactiondescdialog.h Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
transactionfilterproxy.cpp qt: Avoid querying unnecessary model data when filtering transactions 2018-03-11 22:21:51 +00:00
transactionfilterproxy.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
transactionrecord.cpp Merge #11041: Add LookupBlockIndex 2018-03-13 19:12:35 +01:00
transactionrecord.h qt: Remove TransactionTableModel::TxIDRole 2018-03-07 13:08:20 +00:00
transactiontablemodel.cpp qt: Remove TransactionTableModel::TxIDRole 2018-03-07 13:08:20 +00:00
transactiontablemodel.h qt: Remove TransactionTableModel::TxIDRole 2018-03-07 13:08:20 +00:00
transactionview.cpp qt: Remove TransactionTableModel::TxIDRole 2018-03-07 13:08:20 +00:00
transactionview.h [qt] navigate to transaction history page after send 2018-03-01 10:40:36 +01:00
utilitydialog.cpp Properly alphabetize output of CLI --help option. 2018-02-01 23:19:41 -08:00
utilitydialog.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
walletframe.cpp Qt: Get wallet name from WalletModel rather than passing it around 2018-03-26 18:40:26 +07:00
walletframe.h Qt: Get wallet name from WalletModel rather than passing it around 2018-03-26 18:40:26 +07:00
walletmodel.cpp Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
walletmodel.h Merge #12610: Multiwallet for the GUI 2018-03-26 18:51:38 +07:00
walletmodeltransaction.cpp [wallet] Construct CWalletTx objects in CommitTransaction 2018-03-07 21:12:47 -05:00
walletmodeltransaction.h [wallet] Construct CWalletTx objects in CommitTransaction 2018-03-07 21:12:47 -05:00
walletview.cpp Qt: When multiple wallets are used, include in notifications the name 2018-03-26 18:40:26 +07:00
walletview.h Qt: When multiple wallets are used, include in notifications the name 2018-03-26 18:40:26 +07:00
winshutdownmonitor.cpp Fix Windows build errors introduced in #10498 2018-02-12 15:48:37 +01:00
winshutdownmonitor.h Added "Core" to copyright headers 2014-12-19 19:55:32 +01:00

This directory contains the BitcoinQT graphical user interface (GUI). It uses the cross platform framework QT.

The current precise version for QT 5 is specified in qt.mk. QT 4 is also supported (see #8263).

Compile and run

See build instructions (OSX, Windows, Unix, etc).

To run:

./src/qt/bitcoin-qt

Files and directories

forms

Contains Designer UI files. They are created with [Qt Creator](#use-qt-Creator-as IDE), but can be edited using any text editor.

locale

Contains translations. They are periodically updated. The process is described here.

res

Resources such as the icon.

test

Tests.

bitcoingui.(h/cpp)

Represents the main window of the Bitcoin UI.

*model.(h/cpp)

The model. When it has a corresponding controller, it generally inherits from QAbstractTableModel. Models that are used by controllers as helpers inherit from other QT classes like QValidator.

ClientModel is used by the main application bitcoingui and several models like peertablemodel.

*page.(h/cpp)

A controller. :NAMEpage.cpp generally includes :NAMEmodel.h and forms/:NAME.page.ui with a similar :NAME.

*dialog.(h/cpp)

Various dialogs, e.g. to open a URL. Inherit from QDialog.

paymentserver.(h/cpp)

Used to process BIP21 and BIP70 (see https://github.com/bitcoin/bitcoin/pull/11622) payment URI / requests. Also handles URI based application switching (e.g. when following a bitcoin:... link from a browser).

walletview.(h/cpp)

Represents the view to a single wallet.

Other .h/cpp files

  • UI elements like BitcoinAmountField, which inherit from QWidget.
  • bitcoinstrings.cpp: automatically generated
  • bitcoinunits.(h/cpp): BTC / mBTC / etc handling
  • callback.h
  • guiconstants.h: UI colors, app name, etc
  • guiutil.h: several helper functions
  • macdockiconhandler.(h/cpp)
  • macdockiconhandler.(h/cpp): display notifications in OSX

Contribute

See CONTRIBUTING.md for general guidelines. Specifically for QT:

Using Qt Creator as IDE

You can use Qt Creator as an IDE. This is especially useful if you want to change the UI layout.

Download and install the community edition of Qt Creator. Uncheck everything except Qt Creator during the installation process.

Instructions for OSX:

  1. Make sure you installed everything through Homebrew mentioned in the OSX build instructions
  2. Use ./configure with the --enable-debug flag
  3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
  4. Enter "bitcoin-qt" as project name, enter src/qt as location
  5. Leave the file selection as it is
  6. Confirm the "summary page"
  7. In the "Projects" tab select "Manage Kits..."
  8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
  9. Select LLDB as debugger (you might need to set the path to your installation)
  10. Start debugging with Qt Creator (you might need to the executable to "bitcoin-qt" under "Run", which is where you can also add command line arguments)