6
6
#define BITCOIN_QML_OPTIONS_MODEL_H
7
7
8
8
#include < util/settings.h>
9
+ #include < util/system.h>
10
+ #include < validation.h>
9
11
10
12
#include < QObject>
11
13
@@ -19,6 +21,8 @@ class OptionsQmlModel : public QObject
19
21
Q_OBJECT
20
22
Q_PROPERTY (int dbcacheSizeMiB READ dbcacheSizeMiB WRITE setDbcacheSizeMiB NOTIFY dbcacheSizeMiBChanged)
21
23
Q_PROPERTY (bool listen READ listen WRITE setListen NOTIFY listenChanged)
24
+ Q_PROPERTY (int maxScriptThreads READ maxScriptThreads CONSTANT)
25
+ Q_PROPERTY (int minScriptThreads READ minScriptThreads CONSTANT)
22
26
Q_PROPERTY (bool natpmp READ natpmp WRITE setNatpmp NOTIFY natpmpChanged)
23
27
Q_PROPERTY (bool prune READ prune WRITE setPrune NOTIFY pruneChanged)
24
28
Q_PROPERTY (int pruneSizeGB READ pruneSizeGB WRITE setPruneSizeGB NOTIFY pruneSizeGBChanged)
@@ -33,6 +37,8 @@ class OptionsQmlModel : public QObject
33
37
void setDbcacheSizeMiB (int new_dbcache_size_mib);
34
38
bool listen () const { return m_listen; }
35
39
void setListen (bool new_listen);
40
+ int maxScriptThreads () const { return m_max_script_threads; }
41
+ int minScriptThreads () const { return m_min_script_threads; }
36
42
bool natpmp () const { return m_natpmp; }
37
43
void setNatpmp (bool new_natpmp);
38
44
bool prune () const { return m_prune; }
@@ -62,6 +68,8 @@ class OptionsQmlModel : public QObject
62
68
// Properties that are exposed to QML.
63
69
int m_dbcache_size_mib;
64
70
bool m_listen;
71
+ const int m_max_script_threads{MAX_SCRIPTCHECK_THREADS};
72
+ const int m_min_script_threads{-GetNumCores ()};
65
73
bool m_natpmp;
66
74
bool m_prune;
67
75
int m_prune_size_gb;
0 commit comments