MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / stepEnabled

Function stepEnabled

src/qt/bitcoinamountfield.cpp:167–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 StepEnabled stepEnabled() const
168 {
169 if (isReadOnly()) // Disable steps when AmountSpinBox is read-only
170 return StepNone;
171 if (text().isEmpty()) // Allow step-up with empty field
172 return StepUpEnabled;
173
174 StepEnabled rv = 0;
175 bool valid = false;
176 CAmount val = value(&valid);
177 if(valid)
178 {
179 if(val > 0)
180 rv |= StepDownEnabled;
181 if(val < BitcoinUnits::maxMoney())
182 rv |= StepUpEnabled;
183 }
184 return rv;
185 }
186
187Q_SIGNALS:
188 void valueChanged();

Callers

nothing calls this directly

Calls 1

valueFunction · 0.85

Tested by

no test coverage detected