/[svn]/gigedit/trunk/src/paramedit.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/paramedit.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1100 by persson, Sat Mar 17 09:20:19 2007 UTC revision 1117 by persson, Sat Mar 24 13:05:58 2007 UTC
# Line 89  void NumEntryGain::value_changed() Line 89  void NumEntryGain::value_changed()
89  void NumEntryGain::set_dimreg(gig::DimensionRegion* dimreg)  void NumEntryGain::set_dimreg(gig::DimensionRegion* dimreg)
90  {  {
91      this->dimreg = 0;      this->dimreg = 0;
92      set_value(dimreg->Gain / -655360.0);      bool plus6 = dimreg->Gain < 0;
93        set_value(plus6 ? 0 : dimreg->Gain / -655360.0);
94        set_sensitive(!plus6);
95      this->dimreg = dimreg;      this->dimreg = dimreg;
96  }  }
97    
98    
99    BoolEntryPlus6::BoolEntryPlus6(char* labelText, NumEntryGain& eGain) :
100        LabelWidget(labelText, checkbutton),
101        eGain(eGain)
102    {
103        checkbutton.signal_toggled().connect(
104            sigc::mem_fun(*this, &BoolEntryPlus6::value_changed));
105    }
106    
107    void BoolEntryPlus6::value_changed()
108    {
109        if (dimreg && update_gui) {
110            bool plus6 = checkbutton.get_active();
111            if (plus6) {
112                eGain.set_value(0);
113                dimreg->Gain = 6 * -655360;
114            } else {
115                if (dimreg->Gain < 0) {
116                    dimreg->Gain = 0;
117                }
118            }
119            eGain.set_sensitive(!plus6);
120        }
121    }
122    
123    void BoolEntryPlus6::set_dimreg(gig::DimensionRegion* dimreg)
124    {
125        this->dimreg = 0;
126        checkbutton.set_active(dimreg->Gain < 0);
127        this->dimreg = dimreg;
128    }
129    
130  NumEntryPermille::NumEntryPermille(char* labelText,  NumEntryPermille::NumEntryPermille(char* labelText,
131                                     uint16_t gig::DimensionRegion::* param,                                     uint16_t gig::DimensionRegion::* param,
132                                     double lower, double upper, int decimals) :                                     double lower, double upper, int decimals) :
# Line 163  bool NoteEntry::on_output() Line 196  bool NoteEntry::on_output()
196      return true;      return true;
197  }  }
198    
 BoolEntry::BoolEntry(char* labelText, bool gig::DimensionRegion::* param) :  
     LabelWidget(labelText, checkbutton),  
     param(param)  
 {  
     checkbutton.signal_toggled().connect(  
         sigc::mem_fun(*this, &BoolEntry::value_changed));  
 }  
   
 void BoolEntry::value_changed()  
 {  
     if (dimreg && update_gui) {  
         dimreg->*param = checkbutton.get_active();  
     }  
 }  
   
 void BoolEntry::set_dimreg(gig::DimensionRegion* dimreg)  
 {  
     this->dimreg = 0;  
     checkbutton.set_active(dimreg->*param);  
     this->dimreg = dimreg;  
 }  
   
199  ChoiceEntryLeverageCtrl::ChoiceEntryLeverageCtrl(  ChoiceEntryLeverageCtrl::ChoiceEntryLeverageCtrl(
200      char* labelText,      char* labelText,
201      gig::leverage_ctrl_t gig::DimensionRegion::* param) :      gig::leverage_ctrl_t gig::DimensionRegion::* param) :

Legend:
Removed from v.1100  
changed lines
  Added in v.1117

  ViewVC Help
Powered by ViewVC