dash/src/qt
Jonas Schnelli fba2ab550e
Merge #14975: qt: Refactoring with QString::toNSString()
4d454dcb6 Refactoring with QString::toNSString (Hennadii Stepanov)

Pull request description:

  This PR makes `MacNotificationHandler::showNotification()` cleaner and more readable.
  The used `QString::toNSString()` function was introduced in Qt 5.2 which is minimum version now (#14725).

  The behavior of `MacNotificationHandler::showNotification()` has not been changed.

  cc: @jonasschnelli

Tree-SHA512: 940327a77746ee016415efd3b696ad8ec85dcf12bf3f62e55c9bdc1700415d81a8d03fbc79310982d37a4098786dcaef7cd9702db5498d59d8065447babc27f5
2021-07-08 11:57:14 -05:00
..
forms Merge #14375: qt: Correct misleading "overridden options" label 2021-06-28 13:40:50 -05:00
locale 80%+: ar, bg, de, es, fr, it, ja, ko, nl, pl, pt, ro, sk, th, tr, vi, zh_CN, zh_TW (#4169) 2021-05-25 00:45:15 +02:00
res qt: Do not use border-image (#4093) 2021-04-11 15:02:10 -04:00
test Merge #14714: util.h: explicitly include required QString header 2021-07-01 17:37:50 -05:00
addressbookpage.cpp bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
addressbookpage.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
addresstablemodel.cpp Merge #12928: qt: Initialize non-static class members that were previously neither initialized where defined nor in constructor 2021-05-25 14:09:35 +03:00
addresstablemodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
appearancewidget.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
appearancewidget.h qt: Fix some font weight related issues (#4131) 2021-05-06 13:15:47 -04:00
askpassphrasedialog.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
askpassphrasedialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
bantablemodel.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
bantablemodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
bitcoinaddressvalidator.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
bitcoinaddressvalidator.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
bitcoinamountfield.cpp bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
bitcoinamountfield.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
bitcoingui.cpp Merge #13961: util: Replace boost::signals2 with std::function 2021-06-28 22:09:56 -04:00
bitcoingui.h Merge #14517: qt: Fix start with the -min option 2021-06-28 13:40:53 -05:00
bitcoinunits.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
bitcoinunits.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
callback.h
clientmodel.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
clientmodel.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
coincontroldialog.cpp Merge #12909: wallet: Make fee settings to be non-static members 2021-05-23 01:19:33 +03:00
coincontroldialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
coincontroltreewidget.cpp
coincontroltreewidget.h
csvmodelwriter.cpp
csvmodelwriter.h
dash_locale.qrc
dash.cpp Merge #13961: util: Replace boost::signals2 with std::function 2021-06-28 22:09:56 -04:00
dash.qrc
dashstrings.cpp qt: Transaltions202105 (#4137) 2021-05-12 00:56:24 +02:00
editaddressdialog.cpp Merge #12830: [qt] [tests] Clarify address book error messages, add tests 2021-05-23 01:24:26 +03:00
editaddressdialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
guiconstants.h
guiutil.cpp Merge #14801: qt: Use window() instead of obsolete topLevelWidget() 2021-07-08 11:57:12 -05:00
guiutil.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
intro.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
intro.h
macdockiconhandler.h
macdockiconhandler.mm
macnotificationhandler.h
macnotificationhandler.mm Merge #14975: qt: Refactoring with QString::toNSString() 2021-07-08 11:57:14 -05:00
macos_appnap.h
macos_appnap.mm
masternodelist.cpp Extensive include refactoring (#4095) 2021-04-15 23:41:16 -04:00
masternodelist.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
modaloverlay.cpp
modaloverlay.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
networkstyle.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
networkstyle.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
notificator.cpp Merge #15007: qt: Notificator class refactoring 2021-06-28 13:40:51 -05:00
notificator.h Merge #15007: qt: Notificator class refactoring 2021-06-28 13:40:51 -05:00
openuridialog.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
openuridialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
optionsdialog.cpp qt: Use themed red for the prune settings warning 2021-04-14 00:56:15 -04:00
optionsdialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
optionsmodel.cpp qt: Fix some font weight related issues (#4131) 2021-05-06 13:15:47 -04:00
optionsmodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
overviewpage.cpp bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
overviewpage.h refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
paymentrequest.proto
paymentrequestplus.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
paymentrequestplus.h
paymentserver.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
paymentserver.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
peertablemodel.cpp
peertablemodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
qrdialog.cpp
qrdialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
qvalidatedlineedit.cpp
qvalidatedlineedit.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
qvaluecombobox.cpp
qvaluecombobox.h
README.md Merge #13366: Docs: Rename “OS X” to the newer “macOS” convention 2021-06-28 02:31:48 +03:00
receivecoinsdialog.cpp
receivecoinsdialog.h
receiverequestdialog.cpp
receiverequestdialog.h
recentrequeststablemodel.cpp
recentrequeststablemodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
rpcconsole.cpp Merge #15178: qt: Improve "help-console" message 2021-06-28 13:40:57 -05:00
rpcconsole.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
sendcoinsdialog.cpp Make the coinjoin input warning less scary (#3728) 2021-07-01 23:46:22 +03:00
sendcoinsdialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
sendcoinsentry.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
sendcoinsentry.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
signverifymessagedialog.cpp partial bitcoin#15638: Add several util units 2021-06-27 12:03:15 +05:30
signverifymessagedialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
splashscreen.cpp Merge #13961: util: Replace boost::signals2 with std::function 2021-06-28 22:09:56 -04:00
splashscreen.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
trafficgraphdata.cpp
trafficgraphdata.h
trafficgraphwidget.cpp
trafficgraphwidget.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
transactiondesc.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
transactiondesc.h
transactiondescdialog.cpp
transactiondescdialog.h
transactionfilterproxy.cpp
transactionfilterproxy.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
transactionrecord.cpp Merge #12830: [qt] [tests] Clarify address book error messages, add tests 2021-05-23 01:24:26 +03:00
transactionrecord.h Add/fix/tweak translated strings (#4052) 2021-03-24 13:13:25 +03:00
transactiontablemodel.cpp Merge #13961: util: Replace boost::signals2 with std::function 2021-06-28 22:09:56 -04:00
transactiontablemodel.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
transactionview.cpp Merge #15203: Fix issue #9683 "gui, wallet: random abort (segmentation fault) 2021-06-28 19:05:23 -05:00
transactionview.h refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
utilitydialog.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
utilitydialog.h bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
walletframe.cpp Merge #13111: Add unloadwallet RPC 2021-04-05 03:31:50 +02:00
walletframe.h refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
walletmodel.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
walletmodel.h partial merge #19032: Serialization improvements: final step 2021-05-28 11:39:25 +03:00
walletmodeltransaction.cpp
walletmodeltransaction.h
walletview.cpp Add/fix/tweak translated strings (#4052) 2021-03-24 13:13:25 +03:00
walletview.h refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
winshutdownmonitor.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
winshutdownmonitor.h

This directory contains the DashQT 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 not supported.

Compile and run

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

To run:

./src/qt/dash-qt

Files and directories

forms

Contains Designer UI files. They are created with Qt Creator, 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 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 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 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/cpp)
  • macdockiconhandler.(h/cpp): display notifications in macOS

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 macOS:

  1. Make sure you installed everything through Homebrew mentioned in the macOS build instructions
  2. Use ./configure with the --enable-debug flag
  3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
  4. Enter "dash-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 "dash-qt" under "Run", which is where you can also add command line arguments)