95 |
|
|
96 |
void NumEntryGain::value_changed() |
void NumEntryGain::value_changed() |
97 |
{ |
{ |
98 |
|
const double f = pow(10, spinbutton.get_digits()); |
99 |
|
int new_value = round_to_int(spinbutton.get_value() * f); |
100 |
if (ptr) { |
if (ptr) { |
|
const double f = pow(10, spinbutton.get_digits()); |
|
|
int new_value = round_to_int(spinbutton.get_value() * f); |
|
|
|
|
101 |
if (new_value != round_to_int(*ptr / coeff * f)) |
if (new_value != round_to_int(*ptr / coeff * f)) |
102 |
{ |
{ |
103 |
|
sig_to_be_changed.emit(); |
104 |
*ptr = round_to_int(new_value / f * coeff); |
*ptr = round_to_int(new_value / f * coeff); |
105 |
sig_changed(); |
sig_val_changed.emit(new_value); |
106 |
|
sig_changed.emit(); |
107 |
} |
} |
108 |
|
} else { |
109 |
|
sig_to_be_changed.emit(); |
110 |
|
sig_val_changed.emit(new_value); |
111 |
|
sig_changed.emit(); |
112 |
} |
} |
113 |
} |
} |
114 |
|
|
124 |
|
|
125 |
BoolEntryPlus6::BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value) : |
BoolEntryPlus6::BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value) : |
126 |
LabelWidget(labelText, checkbutton), |
LabelWidget(labelText, checkbutton), |
127 |
|
checkbutton(labelText), |
128 |
eGain(eGain), |
eGain(eGain), |
129 |
plus6value(plus6value) |
plus6value(plus6value) |
130 |
{ |
{ |