File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -205,3 +205,16 @@ std::vector<COutPoint> WalletQmlModel::listSelectedCoins() const
205
205
{
206
206
return m_coin_control.ListSelected ();
207
207
}
208
+
209
+ unsigned int WalletQmlModel::feeTargetBlocks () const
210
+ {
211
+ return m_coin_control.m_confirm_target .value_or (wallet::DEFAULT_TX_CONFIRM_TARGET);
212
+ }
213
+
214
+ void WalletQmlModel::setFeeTargetBlocks (unsigned int target_blocks)
215
+ {
216
+ if (m_coin_control.m_confirm_target != target_blocks) {
217
+ m_coin_control.m_confirm_target = target_blocks;
218
+ Q_EMIT feeTargetBlocksChanged ();
219
+ }
220
+ }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class WalletQmlModel : public QObject
28
28
Q_PROPERTY (CoinsListModel* coinsListModel READ coinsListModel CONSTANT)
29
29
Q_PROPERTY (SendRecipient* sendRecipient READ sendRecipient CONSTANT)
30
30
Q_PROPERTY (WalletQmlModelTransaction* currentTransaction READ currentTransaction NOTIFY currentTransactionChanged)
31
+ Q_PROPERTY (unsigned int targetBlocks READ feeTargetBlocks WRITE setFeeTargetBlocks NOTIFY feeTargetBlocksChanged)
31
32
32
33
public:
33
34
WalletQmlModel (std::unique_ptr<interfaces::Wallet> wallet, QObject* parent = nullptr );
@@ -63,11 +64,14 @@ class WalletQmlModel : public QObject
63
64
void unselectCoin (const COutPoint& output);
64
65
bool isSelectedCoin (const COutPoint& output);
65
66
std::vector<COutPoint> listSelectedCoins () const ;
67
+ unsigned int feeTargetBlocks () const ;
68
+ void setFeeTargetBlocks (unsigned int target_blocks);
66
69
67
70
Q_SIGNALS:
68
71
void nameChanged ();
69
72
void balanceChanged ();
70
73
void currentTransactionChanged ();
74
+ void feeTargetBlocksChanged ();
71
75
72
76
private:
73
77
std::unique_ptr<interfaces::Wallet> m_wallet;
You can’t perform that action at this time.
0 commit comments