aboutsummaryrefslogtreecommitdiff
path: root/src/qt/overviewpage.cpp
AgeCommit message (Collapse)Author
2023-07-21GUI: Move "embedded font or not" decision into new ↵Luke Dashjr
OptionsModel::getFontForMoney method
2023-02-09Merge bitcoin-core/gui#701: Persist Mask Values optionHennadii Stepanov
4de02def844102c08b65bf1311a333e7aca482b9 qt: Persist Mask Values option (Andrew Chow) Pull request description: The mask values option is memory only. If a user has enabled this option, it's reasonable to expect that they would want to have it enabled on the next start. ACKs for top commit: RandyMcMillan: tACK https://github.com/bitcoin-core/gui/commit/4de02def844102c08b65bf1311a333e7aca482b9 jarolrod: tACK 4de02def844102c08b65bf1311a333e7aca482b9 pablomartin4btc: > tACK [4de02de](https://github.com/bitcoin-core/gui/commit/4de02def844102c08b65bf1311a333e7aca482b9) john-moffett: tACK 4de02def844102c08b65bf1311a333e7aca482b9 Tree-SHA512: 247deb78df4911516625bf8b25d752feb480ce30eb31335cf9baeb07b7c6c225fcc37d5c45de62d6e6895ec10c7eefabb15527e3c9723a3b8ddda1e12ebbf46b
2023-01-26Correctly limit overview transaction listJohn Moffett
The way that the main overview page limits the number of transactions displayed (currently 5) is not an appropriate use of Qt. If it's run with a DEBUG build of Qt, it'll result in a segfault in certain relatively common situations. Instead of artificially limiting the rowCount() in the subclassed proxy filter, we hide/unhide the rows in the displaying QListView upon any changes in the sorted proxy filter.
2023-01-23qt: Persist Mask Values optionAndrew Chow
The mask values option is memory only. If a user has enabled this option, it's reasonable to expect that they would want to have it enabled on the next start.
2023-01-17Merge bitcoin-core/gui#686: clang-tidy: Force checks for headers in `src/qt`Hennadii Stepanov
7b7cd112444b996a8ae6a6edfed00bcee67546c8 clang-tidy, qt: Force checks for headers in `src/qt` (Hennadii Stepanov) 69eacf2c5ee1c84e92153b525fd4302aec0f5f2a clang-tidy, qt: Fix `modernize-use-default-member-init` in headers (Hennadii Stepanov) Pull request description: This PR split from bitcoin/bitcoin#26705 and contains only changes in `src/qt`. Effectively, it fixes the clang-tidy's `modernize-use-default-member-init` errors, and forces clang-tidy checks for all headers in the `src/qt` directory. ACKs for top commit: jarolrod: ACK 7b7cd112444b996a8ae6a6edfed00bcee67546c8 Tree-SHA512: 79525bb0f31ae7cad88c781e55091a21467c0485ddc1ed03ad62e051480fda3b3710619ea11af480437edba3c6e038f7c40edc6b373e3a37408c006d11b34686
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-12-16clang-tidy, qt: Fix `modernize-use-default-member-init` in headersHennadii Stepanov
See https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html
2022-08-15Merge bitcoin-core/gui#598: Avoid recalculating the wallet balance - use ↵Hennadii Stepanov
model cache 4584d300a40bfd84517072f7a6eee114fb7cab08 GUI: remove now unneeded 'm_balances' field from overviewpage (furszy) 050e8b139145d6991e740b0e5f2b3364663dd348 GUI: 'getAvailableBalance', use cached balance if the user did not select UTXO manually (furszy) 96e3264a82c51b456703f500bd98e8cb98115697 GUI: use cached balance in overviewpage and sendcoinsdialog (furszy) 321335bf0292034d79afa6c44f7f072942b6cc3c GUI: add getter for WalletModel::m_cached_balances field (furszy) e62958dc81d215a1c56318d0914dfd9a33d45973 GUI: sendCoinsDialog, remove duplicate wallet().getBalances() call (furszy) Pull request description: As per the title says, we are recalculating the entire wallet balance on different situations calling to `wallet().getBalances()`, when should instead make use of the wallet model cached balance. This has the benefits of (1) not spending resources calculating a balance that we already have cached, and (2) avoid blocking the main thread for a long time, in case of big wallets, walking through the entire wallet's tx map more than what it's really needed. Changes: 1) Fix: `SendCoinsDialog` was calling `wallet().getBalances()` twice during `setModel`. 2) Use the cached balance if the user did not select any UTXO manually inside the wallet model `getAvailableBalance` call. ----------------------- As an extra note, this work born in [#25005](https://github.com/bitcoin/bitcoin/pull/25005) but grew out of scope of it. ACKs for top commit: jarolrod: ACK 4584d300a40bfd84517072f7a6eee114fb7cab08 hebasto: re-ACK 4584d300a40bfd84517072f7a6eee114fb7cab08, only suggested changes and commit message formatting since my [recent](https://github.com/bitcoin-core/gui/pull/598#pullrequestreview-1071268192) review. Tree-SHA512: 6633ce7f9a82a3e46e75aa7295df46c80a4cd4a9f3305427af203c9bc8670573fa8a1927f14a279260c488cc975a08d238faba2e9751588086fea1dcf8ea2b28
2022-08-12GUI: remove now unneeded 'm_balances' field from overviewpagefurszy
2022-08-12GUI: use cached balance in overviewpage and sendcoinsdialogfurszy
Plus, calculate the cached balance right when the wallet model, so the wallet widgets don't need to redo the same balance calculation multiple times when they are waiting for the model balance polling timer. ---------------------------------------------------------------------- test wise: `WalletTests` now need to trigger the walletModel balance changed manually. So the model updates its internal state and can be used by the widgets. This is because the test does not start the balance polling timer, in the same way as does not initialize several parts of the GUI workflow. All the objects (wallet, models, views, etc) that are used on this test are manually created instead of using the `WalletController` class flow. Rationale is that this unit test is focused on verifying the GUI widgets/views behavior only: update the presented information, etc. when they receive different signals and/or function calls from outside (in other words, focus is on the signal slots/receiver side). It's not about whether the wallet balance polling timer is functioning as expected or not (which we definitely create a new test case for it in a follow-up work).
2022-05-17refactor: use C++11 default initializersfanquake
2022-02-22qt, refactor: Make BitcoinUnits::Unit a scoped enumHennadii Stepanov
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-07-05Merge bitcoin-core/gui#365: Draw "eye" sign at the beginning of watch-only ↵Hennadii Stepanov
addresses cd46c11577a05f3dc9eac94f27a6985f6ba0509e qt: Draw "eye" sign at the beginning of watch-only addresses (Hennadii Stepanov) 9ea1da6fc91e17bdaa722001b97aadf576f07f65 qt: Do not extend recent transaction width to address/label string (Hennadii Stepanov) Pull request description: This PR guaranties that the "eye" sign won't be hidden for very long addresses/labels. No longer need to extend `TransactionOverviewWidget` widget width to make "eye" signs shown: ![Screenshot from 2021-06-15 00-21-05](https://user-images.githubusercontent.com/32963518/121961807-9123b600-cd70-11eb-8cdd-8b2b0d1bf44f.png) Fixes https://github.com/bitcoin-core/gui/issues/373 ACKs for top commit: jarolrod: ACK cd46c11577a05f3dc9eac94f27a6985f6ba0509e Tree-SHA512: 0602b5bb65d53c5b18e86260750006bba03adbae181917b5a2b7f89b17290bd1f57b4f80adaba32f42cc6fb468598a888b12c0b6b09005d2f2c07bd4d1ad334a
2021-06-28qt: Draw "eye" sign at the beginning of watch-only addressesHennadii Stepanov
2021-06-28qt: Do not extend recent transaction width to address/label stringHennadii Stepanov
2021-06-22GUI: Always call parent changeEvent handlerLuke Dashjr
2021-06-22GUI: Enable palette change adaptation on all platformsLuke Dashjr
2021-06-06qt: Drop redundant OverviewPage::handleOutOfSyncWarningClicks slotHennadii Stepanov
This change makes a connection directly to the signal that was emitted in the removed slot. This commit does not change behavior.
2021-05-01qt: Make OverviewPage aware of runtime palette changeHennadii Stepanov
This change fixes the GUI when changing appearance on macOS.
2021-02-21gui: Add monospaced font settingsHennadii Stepanov
2021-02-21qt: Choose monospaced font in C++ code rather in `*.ui` fileHennadii Stepanov
Setting the "Monospace" font family in a `*.ui` file does not work on macOS, at least on Big Sur with Qt 5.15 (neither via the "font" property nor via the "styleSheet" property). Qt chooses the ".AppleSystemUIFont" instead of ".AppleSystemUIFontMonospaced". This change makes macOS choose the correct monospaced font.
2021-01-26Merge bitcoin-core/gui#189: qt: drop workaround for QTBUG-42503 which was ↵Jonas Schnelli
fixed in Qt 5.5.0 a2a3f4cd8d53e33b0e1b1aeff073b096ade034e9 qt: drop workaround for QTBUG-42503 which was fixed in Qt 5.5.0 (Pavol Rusnak) Pull request description: Fixes https://github.com/bitcoin-core/gui/issues/101 ACKs for top commit: jonasschnelli: Tested ACK a2a3f4cd8d53e33b0e1b1aeff073b096ade034e9 - Tree-SHA512: 9ccbc20ff7991ec70cac7d4e4413f9d80a1de453e217d03927a5f167e87eae7f369f0ad437c40c8107e5384c5c5c758659ed0db923837a38f8d705f01f9cb798
2021-01-19qt: drop workaround for QTBUG-42503 which was fixed in Qt 5.5.0Pavol Rusnak
Fixes https://github.com/bitcoin-core/gui/issues/101
2021-01-05qt: Fix TxViewDelegate layoutHennadii Stepanov
This change (1) prevents overlapping date and amount strings, and (2) guaranties that "eye" sign at the end of the watch-only address/label is always visible.
2021-01-05qt: Add TransactionOverviewWidget classHennadii Stepanov
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-08-26qt, refactor: Fix 'QDateTime is deprecated' warningsHennadii Stepanov
2020-06-18scripted-diff: Make SeparatorStyle a scoped enumHennadii Stepanov
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename SeparatorStyle enumerators rename_value() { sed -i "s/ $1/ $2/g" src/qt/bitcoinunits.h; rename_global $1 "SeparatorStyle::$2"; } rename_global 'enum SeparatorStyle' 'enum class SeparatorStyle' rename_value 'separatorNever' 'NEVER' rename_value 'separatorStandard' 'STANDARD' rename_value 'separatorAlways' 'ALWAYS' -END VERIFY SCRIPT-
2020-05-29Merge #16432: qt: Add privacy to the Overview pageJonas Schnelli
8d75115844baefe5cad4d82ec8dce001dd16eb9c qt: Add privacy feature to Overview page (Hennadii Stepanov) 73d8ef72742ab9193e9e95158b26176bfaab3f66 qt: Add BitcoinUnits::formatWithPrivacy() function (Hennadii Stepanov) Pull request description: This PR allows to hide/reveal values on the Overviewpage by checking/unchecking Menu->Settings-> Mask Values Closes #16407 Privacy mode is OFF (the default behavior): ![Screenshot from 2020-01-02 15-08-28](https://user-images.githubusercontent.com/32963518/71669074-28ab6980-2d74-11ea-8e54-4973aa307192.png) Privacy mode is ON: ![Screenshot from 2020-01-02 15-10-23 cropped](https://user-images.githubusercontent.com/32963518/71669082-2d701d80-2d74-11ea-9df5-d4acc4982dbe.png) ACKs for top commit: jonatack: Tested ACK 8d75115 jonasschnelli: Tested ACK 8d75115844baefe5cad4d82ec8dce001dd16eb9c Tree-SHA512: 42f396d5bf0d343b306fb7e925f86f66b3fc3a257af370a812f4be181b5269298f9b23bd8a3ce25ab61de92908c4018d8c2dc8591d11bc58d79c4eb7206fc6ec
2020-05-27qt: Add privacy feature to Overview pageHennadii Stepanov
2020-05-08refactor: Use override for non-final overridersHennadii Stepanov
2020-04-23Add IsLegacy to CWallet so that the GUI knows whether to show watchonlyAndrew Chow
2020-03-19refactor: Get rid of Wallet::IsWalletFlagSet methodRussell Yanofsky
Replace by privateKeysDisabled method to avoid need for GUI to reference internal wallet flags. Also remove adjacent WalletModel canGetAddresses wrapper that serves no purpose and make Wallet::canGetAddresses non-const so it can be implemented by IPC classes in #10102.
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-08-28Merge #14879: qt: Add warning messages to the debug windowMarcoFalke
593ba696fb32da558091ac02ad87c4893db4ce97 Add warning messages to the debug window (Hennadii Stepanov) Pull request description: Fix: #11016 This PR adds warning messages to the debug window in `-disablewallet` mode. ![screenshot from 2018-12-06 01-01-27](https://user-images.githubusercontent.com/32963518/49550070-413c1c80-f8f3-11e8-9865-efb49ea8da45.png) ACKs for top commit: jonasschnelli: utACK 593ba696fb32da558091ac02ad87c4893db4ce97 promag: ACK 593ba696fb32da558091ac02ad87c4893db4ce97, agree with @Sjors https://github.com/bitcoin/bitcoin/pull/14879#pullrequestreview-196433092 above. ryanofsky: utACK 593ba696fb32da558091ac02ad87c4893db4ce97 Tree-SHA512: a8ca78529bb16813ba7bfaf5ccd4349189979f08e78ea857746a6fb00fd9d7ed98d8f06f384830acba21dac57070060af23f6be8249398feb32a6efff1333de8
2019-01-25Add warning messages to the debug windowHennadii Stepanov
2019-01-13Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift
Qt-only changes.
2018-08-28Hide spendable label if priveate key is disabledChun Kuan Lee
2018-08-21qt: Use new Qt5 connect syntaxJoão Barbosa
2018-07-27Update copyright headers to 2018DrahtBot
2018-04-07scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky
Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <ken2812221@gmail.com> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-
2018-04-04Use WalletBalances struct in QtRussell Yanofsky
Suggested by John Newbery <john@johnnewbery.com> https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
2018-04-04Remove most direct bitcoin calls from qt/walletmodel.cppRussell Yanofsky
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-16qt: refactor: Changes to make include paths absoluteWladimir J. van der Laan
This makes all include paths in the GUI absolute. Many changes are involved as every single source file in src/qt/ assumes to be able to use relative includes.
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-11-23qt: Plug many memory leaksWladimir J. van der Laan
None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead.