elements/src/qt
Andrew Poelstra 1339dae913
Merge ElementsProject/elements#1167: Add native support for liquidtestnet
c6e074e25b liquidtestnet: Fix chain name in windows installer (Pablo Greco)
d0f391cfdb liquidtestnet: Add style for Elements-Qt (Pablo Greco)
48ddfbf8d7 liquidtestnet: Add fixed seeds (Pablo Greco)
3b34c8e927 liquidtestnet: Add seed nodes (Pablo Greco)
0d1964766f liquidtestnet: Accept multi OP_RETURN (Pablo Greco)
f955cb3d9c liquidtestnet: Add chainparams (Pablo Greco)
0fa20d006d CCustomParams: Move some defaults away from UpdateFromArgs (Pablo Greco)
e9df51121f Add text version of the fixed seeds for liquidv1 and liquidtestnet (Pablo Greco)

Pull request description:

  Currently using liquidtestnet requires a big config file, which is error-prone and uncomfortable for users, this MR adds support for just using `-chain=liquidtestnet`.

  There are a few things that need to be discussed/addressed

  1. Main port (currently set to 18891 because that's the one used originally, and the one that's configured in `liquidtestnet.com`)
  1. RPC and extra ports, I just chose some non-overlapping ports that are "close" to the ones in the other liquid/elements networks.
  1. Icon color, I just used something different than `liquidv1` and `elementsregtest`, suggestions accepted 😉
  1. `liquid-testnet.blockstream.com` is still using port 18892, it will be changed to 18891 soon.
  1. both seeds are just CNAME dns records at the moment, they should be changed to real seed nodes (no changes in code required, but important for review)

ACKs for top commit:
  delta1:
    ACK c6e074e
  wintercooled:
    ACK c6e074e25b
  apoelstra:
    utACK c6e074e25b

Tree-SHA512: 48c17b8b90ba5a33ae987935ffb368737167f6ca5ae772f6dd8c0c5e7efb39355d81e2677cd02d3e22984f2592fdd67caaf838003902b3c827f6ade01f18a040
2022-11-23 15:31:39 +00:00
..
android Add src/qt/android/.gitignore 2021-05-26 23:29:19 +03:00
forms Merge 68a89d7a46 into merged_master (Bitcoin PR bitcoin-core/gui#4) 2021-07-23 16:10:31 +00:00
locale Merge 091d35c70e into merged_master (Bitcoin PR bitcoin-core/gui#377) 2021-07-30 05:03:59 +00:00
res Fix company for Windows exes 2022-09-09 17:04:51 +00:00
test Merge 9a154599fe into merged_master (Elements PR ElementsProject/elements#900) 2021-09-04 19:34:14 +00:00
addressbookpage.cpp Merge 3f68f02db9 into merged_master (Bitcoin PR bitcoin-core/gui#362) 2021-07-25 19:42:57 +00:00
addressbookpage.h qt, refactor: Make AddressBookPage::deleteAction a local variable 2021-04-14 18:47:30 +03:00
addresstablemodel.cpp Merge 8c21562180 into merged_master (Bitcoin PR bitcoin-core/gui#166) 2021-06-26 12:34:38 +00:00
addresstablemodel.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
askpassphrasedialog.cpp Merge bitcoin-core/gui#85: Remove unused "What's This" button in dialogs on Windows OS 2021-01-28 10:16:55 +01:00
askpassphrasedialog.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
bantablemodel.cpp qt, refactor: Use enum type as switch argument in BanTableModel 2021-02-22 09:34:27 +02:00
bantablemodel.h
bitcoin.cpp Merge a8c8dbc98f into merged_master (Bitcoin PR bitcoin-core/gui#361) 2021-07-24 21:09:18 +00:00
bitcoin.h Merge bitcoin-core/gui#125: Enable changing the autoprune block space size in intro dialog 2021-04-29 23:47:11 +03:00
bitcoin.qrc build: drop the rendered icon stuff 2021-03-26 17:33:05 +00:00
bitcoin_locale.qrc
bitcoinaddressvalidator.cpp
bitcoinaddressvalidator.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
bitcoinamountfield.cpp Elements-qt: Fix arrows to increase/decrease Amount 2022-08-18 13:16:37 -03:00
bitcoinamountfield.h Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
bitcoingui.cpp Merge 34f554dbd3 into merged_master (Bitcoin PR bitcoin-core/gui#366) 2021-07-30 01:15:27 +00:00
bitcoingui.h Merge 11225905b7 into merged_master (Bitcoin PR bitcoin-core/gui#309) 2021-07-19 17:56:32 +00:00
bitcoinstrings.cpp Translations update 2021-07-01 17:16:14 +03:00
bitcoinunits.cpp Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
bitcoinunits.h
clientmodel.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
clientmodel.h qt: Use PeerTableSortProxy for sorting peer table 2021-03-07 16:57:17 +02:00
coincontroldialog.cpp Merge 34f554dbd3 into merged_master (Bitcoin PR bitcoin-core/gui#366) 2021-07-30 01:15:27 +00:00
coincontroldialog.h qt: Make CoinControlDialog aware of runtime palette change 2021-05-01 15:07:11 +03:00
coincontroltreewidget.cpp
coincontroltreewidget.h
createwalletdialog.cpp gui: misc external signer fixes and translation hints 2021-06-16 10:48:58 +02:00
createwalletdialog.h gui: misc external signer fixes and translation hints 2021-06-16 10:48:58 +02:00
csvmodelwriter.cpp
csvmodelwriter.h
editaddressdialog.cpp Merge 68692d33c6 into merged_master (Bitcoin PR bitcoin-core/gui#85) 2021-06-19 03:13:11 +00:00
editaddressdialog.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
guiconstants.h liquidtestnet: Add style for Elements-Qt 2022-09-09 07:06:18 -03:00
guiutil.cpp Merge 34f554dbd3 into merged_master (Bitcoin PR bitcoin-core/gui#366) 2021-07-30 01:15:27 +00:00
guiutil.h Merge 123b401e0a into merged_master (Bitcoin PR bitcoin-core/gui#275) 2021-07-18 22:35:11 +00:00
intro.cpp Merge b789914f17 into merged_master (Bitcoin PR bitcoin-core/gui#332) 2021-07-18 07:32:00 +00:00
intro.h scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
macdockiconhandler.h
macdockiconhandler.mm
macnotificationhandler.h
macnotificationhandler.mm Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
macos_appnap.h
macos_appnap.mm
main.cpp
Makefile Merge 23b15601df into merged_master (Bitcoin PR #17227) 2021-06-28 13:45:32 +00:00
modaloverlay.cpp scripted-diff: Replace three dots with ellipsis in the UI strings 2021-05-02 22:17:16 +03:00
modaloverlay.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
networkstyle.cpp liquidtestnet: Add style for Elements-Qt 2022-09-09 07:06:18 -03:00
networkstyle.h
notificator.cpp doc: Use https URLs where possible 2021-01-04 12:23:16 +08:00
notificator.h
openuridialog.cpp
openuridialog.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
optionsdialog.cpp Merge 7c561bea52 into merged_master (Bitcoin PR bitcoin/bitcoin#21935) 2021-07-25 23:50:09 +00:00
optionsdialog.h p2p, refactor: pass and use uint16_t CService::port as uint16_t 2021-03-16 19:52:31 +01:00
optionsmodel.cpp Merge 68a89d7a46 into merged_master (Bitcoin PR bitcoin-core/gui#4) 2021-07-23 16:10:31 +00:00
optionsmodel.h gui: add external signer path to options dialog 2021-05-27 14:01:53 +02:00
overviewpage.cpp Merge 484d4ee226 into merged_master (Bitcoin PR bitcoin-core/gui#365) 2021-07-30 18:52:11 +00:00
overviewpage.h qt: Drop redundant OverviewPage::handleOutOfSyncWarningClicks slot 2021-06-06 01:04:15 +03:00
paymentserver.cpp Merge 599000903e into merged_master (Bitcoin PR bitcoin/bitcoin#21850) 2021-07-12 15:20:15 +00:00
paymentserver.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
peertablemodel.cpp qt: Emit dataChanged signal to dynamically re-sort Peers table 2021-06-28 17:38:01 +03:00
peertablemodel.h qt: Emit dataChanged signal to dynamically re-sort Peers table 2021-06-28 17:38:01 +03:00
peertablesortproxy.cpp qt: Add peertablesortproxy module 2021-03-07 16:57:11 +02:00
peertablesortproxy.h qt: Add peertablesortproxy module 2021-03-07 16:57:11 +02:00
platformstyle.cpp qt: Make PlatformStyle aware of runtime palette change 2021-05-01 15:07:02 +03:00
platformstyle.h qt: Make PlatformStyle aware of runtime palette change 2021-05-01 15:07:02 +03:00
psbtoperationsdialog.cpp Merge 9a154599fe into merged_master (Elements PR ElementsProject/elements#900) 2021-09-04 19:34:14 +00:00
psbtoperationsdialog.h
qrimagewidget.cpp Merge 3f68f02db9 into merged_master (Bitcoin PR bitcoin-core/gui#362) 2021-07-25 19:42:57 +00:00
qrimagewidget.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
qvalidatedlineedit.cpp
qvalidatedlineedit.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
qvaluecombobox.cpp qt: Use template function qOverload in signal-slot connections 2021-04-30 00:00:44 +03:00
qvaluecombobox.h
README.md Improve gui/src/qt README.md 2021-01-28 14:03:21 -05:00
receivecoinsdialog.cpp Merge 3f68f02db9 into merged_master (Bitcoin PR bitcoin-core/gui#362) 2021-07-25 19:42:57 +00:00
receivecoinsdialog.h Merge f385ad7651 into merged_master (Bitcoin PR bitcoin-core/gui#263) 2021-07-01 00:05:46 +00:00
receiverequestdialog.cpp Merge 7c561bea52 into merged_master (Bitcoin PR bitcoin/bitcoin#21935) 2021-07-25 23:50:09 +00:00
receiverequestdialog.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
recentrequeststablemodel.cpp Merge 907d636e5e into merged_master (Bitcoin PR bitcoin/bitcoin#21353) 2021-07-21 20:30:59 +00:00
recentrequeststablemodel.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
rpcconsole.cpp Merge bitcoin/bitcoin#21430: build: Add -Werror=implicit-fallthrough compile flag 2021-07-18 11:06:10 +08:00
rpcconsole.h qt: Save/restore column sizes of the tables in the Peers tab 2021-06-05 13:36:53 +03:00
sendcoinsdialog.cpp Elements-qt: Correctly display the amount in the sender's wallet after using Send button 2022-08-31 19:12:50 -03:00
sendcoinsdialog.h Elements-qt: Correctly display the amount in the sender's wallet after using Send button 2022-08-31 19:12:50 -03:00
sendcoinsentry.cpp Merge 34f554dbd3 into merged_master (Bitcoin PR bitcoin-core/gui#366) 2021-07-30 01:15:27 +00:00
sendcoinsentry.h Merge 123b401e0a into merged_master (Bitcoin PR bitcoin-core/gui#275) 2021-07-18 22:35:11 +00:00
sendcoinsrecipient.h Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
signverifymessagedialog.cpp GUI: Always call parent changeEvent handler 2021-06-22 19:24:44 +00:00
signverifymessagedialog.h qt: Make SignVerifyMessageDialog aware of runtime palette change 2021-05-01 15:07:09 +03:00
splashscreen.cpp Merge e130ff38c9 into merged_master (Bitcoin PR bitcoin-core/gui#183) 2021-06-18 22:36:56 +00:00
splashscreen.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
trafficgraphwidget.cpp Fix wrong(1024) divisor for 1000-based prefixes 2021-03-19 19:35:42 +01:00
trafficgraphwidget.h
transactiondesc.cpp Merge 456c8d6cd8 into merged_master (Bitcoin PR bitcoin-core/gui#313) 2021-07-18 04:15:48 +00:00
transactiondesc.h
transactiondescdialog.cpp Merge bitcoin-core/gui#85: Remove unused "What's This" button in dialogs on Windows OS 2021-01-28 10:16:55 +01:00
transactiondescdialog.h
transactionfilterproxy.cpp
transactionfilterproxy.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
transactionoverviewwidget.h qt: Add TransactionOverviewWidget class 2021-01-05 22:10:10 +02:00
transactionrecord.cpp Merge bd6af53e1f into merged_master (Bitcoin PR #20480) 2021-06-17 15:15:29 +00:00
transactionrecord.h Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
transactiontablemodel.cpp Merge 456c8d6cd8 into merged_master (Bitcoin PR bitcoin-core/gui#313) 2021-07-18 04:15:48 +00:00
transactiontablemodel.h Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
transactionview.cpp Merge 34f554dbd3 into merged_master (Bitcoin PR bitcoin-core/gui#366) 2021-07-30 01:15:27 +00:00
transactionview.h qt: Make TransactionView aware of runtime palette change 2021-05-01 15:07:12 +03:00
utilitydialog.cpp Merge f8176b768a into merged_master (Bitcoin PR bitcoin/bitcoin#21836) 2021-07-08 08:34:10 +00:00
utilitydialog.h
walletcontroller.cpp Merge 7c561bea52 into merged_master (Bitcoin PR bitcoin/bitcoin#21935) 2021-07-25 23:50:09 +00:00
walletcontroller.h
walletframe.cpp qt: Connect WalletView signal to BitcoinGUI slot directly 2021-06-06 01:04:15 +03:00
walletframe.h qt: Connect WalletView signal to BitcoinGUI slot directly 2021-06-06 01:04:15 +03:00
walletmodel.cpp Elements-qt: Correctly display the amount in the sender's wallet after using Send button 2022-08-31 19:12:50 -03:00
walletmodel.h Elements-qt: Correctly display the amount in the sender's wallet after using Send button 2022-08-31 19:12:50 -03:00
walletmodeltransaction.cpp Merge 68a89d7a46 into merged_master (Bitcoin PR bitcoin-core/gui#4) 2021-07-23 16:10:31 +00:00
walletmodeltransaction.h Merge 68a89d7a46 into merged_master (Bitcoin PR bitcoin-core/gui#4) 2021-07-23 16:10:31 +00:00
walletview.cpp Merge 6f3fbc062f into merged_master (Bitcoin PR bitcoin-core/gui#333) 2021-07-25 03:33:47 +00:00
walletview.h Merge 6f3fbc062f into merged_master (Bitcoin PR bitcoin-core/gui#333) 2021-07-25 03:33:47 +00:00
winshutdownmonitor.cpp
winshutdownmonitor.h

This directory contains the source code for the Bitcoin Core graphical user interface (GUI). It uses the Qt cross-platform framework.

The current precise version for Qt 5 is specified in qt.mk.

Compile and run

See build instructions: Unix, macOS, Windows, FreeBSD, NetBSD, OpenBSD

When following your systems build instructions, make sure to install the Qt dependencies.

To run:

./src/qt/bitcoin-qt

Files and Directories

forms/

  • A directory that contains Designer UI files. These files specify the characteristics of form elements in XML. Qt UI files can be edited with Qt Creator or using any text editor.

locale/

  • Contains translations. They are periodically updated and an effort is made to support as many languages as possible. The process of contributing translations is described in doc/translation_process.md.

res/

  • Contains graphical resources used to enhance the UI experience.

test/

  • Functional tests used to ensure proper functionality of the GUI. Significant changes to the GUI code normally require new or updated 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)

  • (Deprecated) Used to process BIP21 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/mm): macOS dock icon handler
  • macnotificationhandler.(h/mm): display notifications in macOS

Contribute

See CONTRIBUTING.md for general guidelines.

Note: Do not change local/bitcoin_en.ts. It is updated automatically.

Using Qt Creator as an IDE

Qt Creator is a powerful tool which packages a UI designer tool (Qt Designer) and a C++ IDE into one application. This is especially useful if you want to change the UI layout.

Download Qt Creator

On Unix and macOS, Qt Creator can be installed through your package manager. Alternatively, you can download a binary from the Qt Website.

Note: If installing from a binary grabbed from the Qt Website: During the installation process, uncheck everything except for Qt Creator.

macOS
brew install qt-creator
Ubuntu & Debian
sudo apt-get install qtcreator

Setup Qt Creator

  1. Make sure you've installed all dependencies specified in your systems build instructions
  2. Follow the compile instructions for your system, run ./configure with the --enable-debug flag
  3. Start Qt Creator. At the start page, do: New -> Import Project -> Import Existing Project
  4. Enter bitcoin-qt as the Project Name and enter the absolute path to src/qt as Location
  5. Check over the file selection, you may need to select the forms directory (necessary if you intend to edit *.ui files)
  6. Confirm the Summary page
  7. In the Projects tab, select Manage Kits...

macOS

  • Under Kits: select the default "Desktop" kit
  • Under Compilers: select "Clang (x86 64bit in /usr/bin)"
  • Under Debuggers: select "LLDB" as debugger (you might need to set the path to your LLDB installation)

Ubuntu & Debian

Note: Some of these options may already be set

  • Under Kits: select the default "Desktop" kit
  • Under Compilers: select "GCC (x86 64bit in /usr/bin)"
  • Under Debuggers: select "GDB" as debugger
  1. While in the Projects tab, ensure that you have the bitcoin-qt executable specified under Run
  • If the executable is not specified: click "Choose...", navigate to src/qt, and select bitcoin-qt
  1. You're all set! Start developing, building, and debugging the Bitcoin Core GUI