263 |
this->value = value; |
this->value = value; |
264 |
|
|
265 |
connected = false; |
connected = false; |
266 |
bool plus6 = value < 0; |
spinbutton.set_value(value / coeff); |
|
spinbutton.set_value(plus6 ? 0 : value / coeff); |
|
|
set_sensitive(!plus6); |
|
267 |
connected = true; |
connected = true; |
268 |
|
|
269 |
sig_changed(); |
sig_changed(); |
271 |
} |
} |
272 |
|
|
273 |
|
|
|
BoolEntryPlus6::BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value) : |
|
|
LabelWidget(labelText, checkbutton), |
|
|
checkbutton(labelText), |
|
|
eGain(eGain), |
|
|
plus6value(plus6value) |
|
|
{ |
|
|
checkbutton.signal_toggled().connect( |
|
|
sigc::mem_fun(*this, &BoolEntryPlus6::value_changed)); |
|
|
} |
|
|
|
|
|
void BoolEntryPlus6::on_show_tooltips_changed() { |
|
|
LabelWidget::on_show_tooltips_changed(); |
|
|
|
|
|
eGain.on_show_tooltips_changed(); |
|
|
} |
|
|
|
|
|
void BoolEntryPlus6::value_changed() |
|
|
{ |
|
|
if (checkbutton.get_active()) eGain.set_value(plus6value); |
|
|
else if (eGain.get_value() < 0) eGain.set_value(0); |
|
|
} |
|
|
|
|
|
int32_t BoolEntryPlus6::get_value() const |
|
|
{ |
|
|
return eGain.get_value(); |
|
|
} |
|
|
|
|
|
void BoolEntryPlus6::set_value(int32_t value) |
|
|
{ |
|
|
checkbutton.set_active(value < 0); |
|
|
} |
|
|
|
|
274 |
NumEntryPermille::NumEntryPermille(const char* labelText, |
NumEntryPermille::NumEntryPermille(const char* labelText, |
275 |
double lower, double upper, int decimals) : |
double lower, double upper, int decimals) : |
276 |
NumEntry(labelText, lower, upper, decimals), |
NumEntry(labelText, lower, upper, decimals), |
686 |
{ |
{ |
687 |
#if USE_GTKMM_GRID |
#if USE_GTKMM_GRID |
688 |
attach(boolentry.widget, 0, rowno, 2); |
attach(boolentry.widget, 0, rowno, 2); |
|
#else |
|
|
attach(boolentry.widget, 0, 2, rowno, rowno + 1, |
|
|
Gtk::FILL, Gtk::SHRINK); |
|
|
#endif |
|
|
rowno++; |
|
|
} |
|
|
|
|
|
void Table::add(BoolEntryPlus6& boolentry) |
|
|
{ |
|
|
#if USE_GTKMM_GRID |
|
|
attach(boolentry.widget, 0, rowno, 2); |
|
689 |
#else |
#else |
690 |
attach(boolentry.widget, 0, 2, rowno, rowno + 1, |
attach(boolentry.widget, 0, 2, rowno, rowno + 1, |
691 |
Gtk::FILL, Gtk::SHRINK); |
Gtk::FILL, Gtk::SHRINK); |