dash/src/qt
pasta 30381acc76
Merge #6056: backport: trivial 2024 06 11
fb8a4db8f6 Merge bitcoin/bitcoin#26717: test: Improve `check-doc.py` pattern (MarcoFalke)
349cad2865 Merge bitcoin/bitcoin#26708: clang-tidy: Fix `modernize-use-nullptr` in headers (MarcoFalke)
6bf786d168 Merge bitcoin/bitcoin#25735: net: remove useless call to IsReachable() from CConnman::Bind() (fanquake)
012b0b7169 Merge bitcoin/bitcoin#24258: test: check localaddresses in getnetworkinfo for nodes with proxy (MarcoFalke)
c67f527b0b Merge bitcoin-core/gui#448: Add helper to load font (Hennadii Stepanov)
8e0abeb1c1 Merge bitcoin-core/gui#345: Connection Type Translator Comments (Hennadii Stepanov)
688b66e9d1 Merge bitcoin-core/gui#266: Doc: Copyright: Fix embedded font file location (MarcoFalke)

Pull request description:

  ## Issue being fixed or feature implemented
  Trivial backports

  ## What was done?

  ## How Has This Been Tested?
  Built and ran tests locally; p2p_addr_relay.py fails locally. Not sure why

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK fb8a4db8f6
  knst:
    utACK fb8a4db8f6

Tree-SHA512: abb9469f25c6d45acea01da6d2b9cb6df94822f61d06f80e3008b32d2522016370a1e0b0c9ff95b92df22c4f227fc40f7765d76f1987eac7603155fe2d894593
2024-06-15 12:02:51 -05:00
..
android
forms merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details 2024-06-10 17:32:54 +00:00
locale 99%+: it 2024-03-04 08:54:52 -06:00
res partial bitcoin-core/gui#79: Embed monospaced font 2024-06-09 17:33:59 +00:00
test Merge bitcoin/bitcoin#22358: Remove unused wallet pointer from wallet signals 2024-05-15 03:03:17 +07:00
addressbookpage.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
addressbookpage.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
addresstablemodel.cpp merge bitcoin-core/gui#166: Use enum type as switch argument in *TableModel 2024-06-09 17:33:59 +00:00
addresstablemodel.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
appearancewidget.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
appearancewidget.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
askpassphrasedialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
askpassphrasedialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
bantablemodel.cpp merge bitcoin-core/gui#166: Use enum type as switch argument in *TableModel 2024-06-09 17:33:59 +00:00
bantablemodel.h merge bitcoin#22915: Remove confusing CAddrDB 2024-06-04 13:31:31 +00:00
bitcoin.cpp Merge bitcoin-core/gui#448: Add helper to load font 2024-06-11 08:39:42 -05:00
bitcoin.h Merge bitcoin-core/gui#260: Handle exceptions instead of crash 2024-04-11 02:26:03 +07:00
bitcoinaddressvalidator.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
bitcoinaddressvalidator.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
bitcoinamountfield.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
bitcoinamountfield.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
bitcoingui.cpp merge bitcoin-core/gui#219: Prevent the main window popup menu 2024-06-09 17:33:59 +00:00
bitcoingui.h Merge bitcoin-core/gui#115: Replace "Hide tray icon" option with positive "Show tray icon" one 2024-04-10 03:19:40 +07:00
bitcoinunits.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
bitcoinunits.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
clientmodel.cpp merge bitcoin#22834: respect -onlynet= when making outbound connections 2024-05-29 18:07:45 +00:00
clientmodel.h merge bitcoin#25109: Strengthen AssertLockNotHeld assertions 2024-05-09 08:52:48 +00:00
coincontroldialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
coincontroldialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
coincontroltreewidget.cpp
coincontroltreewidget.h
createwalletdialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
createwalletdialog.h Merge #16528: Native Descriptor Wallets using DescriptorScriptPubKeyMan 2024-03-07 01:23:15 +07:00
csvmodelwriter.cpp
csvmodelwriter.h
dash_locale.qrc
dash.qrc partial bitcoin-core/gui#79: Embed monospaced font 2024-06-09 17:33:59 +00:00
dashstrings.cpp chore: update dashstrings.cpp and dash_en.ts/dash_en.xlf 2024-03-04 08:54:49 -06:00
editaddressdialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
editaddressdialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
governancelist.cpp qt: add interface for CGovernanceObject querying 2024-02-27 09:56:08 -06:00
governancelist.h qt: add interface for CGovernanceObject querying 2024-02-27 09:56:08 -06:00
guiconstants.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
guiutil.cpp Merge bitcoin-core/gui#448: Add helper to load font 2024-06-11 08:39:42 -05:00
guiutil.h Merge bitcoin-core/gui#448: Add helper to load font 2024-06-11 08:39:42 -05:00
intro.cpp merge bitcoin-core/gui#296: Do not use QObject::tr plural syntax for numbers with a unit symbol 2024-06-09 17:33:59 +00:00
intro.h
macdockiconhandler.h
macdockiconhandler.mm
macnotificationhandler.h
macnotificationhandler.mm
macos_appnap.h
macos_appnap.mm
main.cpp
masternodelist.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
masternodelist.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
modaloverlay.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
modaloverlay.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
networkstyle.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
networkstyle.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
notificator.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
notificator.h
openuridialog.cpp
openuridialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
optionsdialog.cpp merge bitcoin#22834: respect -onlynet= when making outbound connections 2024-05-29 18:07:45 +00:00
optionsdialog.h Merge bitcoin-core/gui#115: Replace "Hide tray icon" option with positive "Show tray icon" one 2024-04-10 03:19:40 +07:00
optionsmodel.cpp scripted-diff: Merge bitcoin-core/gui#523: scripted-diff: Rename functions to drop mention of boost 2024-05-18 17:54:15 -05:00
optionsmodel.h Merge bitcoin-core/gui#115: Replace "Hide tray icon" option with positive "Show tray icon" one 2024-04-10 03:19:40 +07:00
overviewpage.cpp refactor: remove fMasternodeMode and fDisableGovernance from Qt code 2024-04-25 10:04:45 +00:00
overviewpage.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
paymentserver.cpp merge bitcoin-core/gui#280: Remove user input from URI error message 2024-06-09 17:34:00 +00:00
paymentserver.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
peertablemodel.cpp merge bitcoin-core/gui#325: Align numbers in the "Peer Id" column to the right 2024-06-09 17:34:00 +00:00
peertablemodel.h merge bitcoin-core/gui#179: Add Type column to peers window, update peer details name/tooltip 2024-06-09 17:33:59 +00:00
psbtoperationsdialog.cpp Merge bitcoin/bitcoin#22214: refactor: Rearrange fillPSBT arguments 2024-05-19 11:11:30 -05:00
psbtoperationsdialog.h
qrdialog.cpp
qrdialog.h
qrimagewidget.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
qrimagewidget.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
qvalidatedlineedit.cpp
qvalidatedlineedit.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
qvaluecombobox.cpp
qvaluecombobox.h
README.md Merge bitcoin-core/gui#139: doc: Improve gui/src/qt README.md 2024-04-10 03:19:39 +07:00
receivecoinsdialog.cpp merge bitcoin-core/gui#214: Disable requests context menu actions when appropriate 2024-06-09 17:33:59 +00:00
receivecoinsdialog.h merge bitcoin-core/gui#214: Disable requests context menu actions when appropriate 2024-06-09 17:33:59 +00:00
receiverequestdialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
receiverequestdialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
recentrequeststablemodel.cpp Merge bitcoin/bitcoin#21353: interfaces: Stop exposing wallet destdata to gui 2024-04-23 09:15:20 -05:00
recentrequeststablemodel.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
rpcconsole.cpp Merge #6056: backport: trivial 2024 06 11 2024-06-15 12:02:51 -05:00
rpcconsole.h Merge bitcoin-core/gui#271: Don't clear console prompt when font resizing 2024-05-15 03:03:16 +07:00
sendcoinsdialog.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
sendcoinsdialog.h Merge bitcoin-core/gui#284: refactor: Simplify SendCoinsDialog::updateCoinControlState 2024-04-23 22:41:08 +07:00
sendcoinsentry.cpp
sendcoinsentry.h
sendcoinsrecipient.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
signverifymessagedialog.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
signverifymessagedialog.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
splashscreen.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
splashscreen.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
trafficgraphdata.cpp non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
trafficgraphdata.h non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
trafficgraphwidget.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
trafficgraphwidget.h qt: drop leftover boost::function usage in Qt, drop header from list 2024-04-23 15:34:48 +00:00
transactiondesc.cpp
transactiondesc.h
transactiondescdialog.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transactiondescdialog.h
transactionfilterproxy.cpp
transactionfilterproxy.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transactionrecord.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transactionrecord.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transactiontablemodel.cpp merge bitcoin-core/gui#166: Use enum type as switch argument in *TableModel 2024-06-09 17:33:59 +00:00
transactiontablemodel.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transactionview.cpp Merge bitcoin-core/gui#682: Don't directly delete abandoned txes from GUI 2024-06-10 11:26:11 -05:00
transactionview.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
utilitydialog.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
utilitydialog.h
walletcontroller.cpp scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string 2024-05-19 11:16:42 -05:00
walletcontroller.h
walletframe.cpp merge bitcoin#22915: Remove confusing CAddrDB 2024-06-04 13:31:31 +00:00
walletframe.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
walletmodel.cpp Merge bitcoin/bitcoin#21353: interfaces: Stop exposing wallet destdata to gui 2024-04-23 09:15:20 -05:00
walletmodel.h Merge bitcoin/bitcoin#21353: interfaces: Stop exposing wallet destdata to gui 2024-04-23 09:15:20 -05:00
walletmodeltransaction.cpp
walletmodeltransaction.h
walletview.cpp
walletview.h
winshutdownmonitor.cpp
winshutdownmonitor.h

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

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

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/dash-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 Dash 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 dashgui 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 dash:... link from a browser).

Used to process BIP21 payment URI requests. Also handles URI based application switching (e.g. when following a dash:... 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/dash_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 dash-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 dash-qt executable specified under Run
  • If the executable is not specified: click "Choose...", navigate to src/qt, and select dash-qt
  1. You're all set! Start developing, building, and debugging the Dash Core GUI