Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4FitGUI/QFitParCfgWidget.ui.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 /****************************************************************************
00017 ** ui.h extension file, included from the uic-generated form implementation.
00018 **
00019 ** If you wish to add, delete or rename slots use Qt Designer which will
00020 ** update this file, preserving your code. Create an init() slot in place of
00021 ** a constructor, and a destroy() slot in place of a destructor.
00022 *****************************************************************************/
00023 
00024 
00025 TGo4FitParameter * QFitParCfgWidget::GetPar() {
00026    return dynamic_cast<TGo4FitParameter*> (GetObject());
00027 }
00028 
00029 void QFitParCfgWidget::FillSpecificData() {
00030   if (GetPar()) {
00031      ParNameEdit->setText(GetPar()->GetName());
00032      ParFixedChk->setChecked(GetPar()->GetFixed());
00033      Double_t min,max;
00034      if (GetPar()->GetRange(min,max)) {
00035         RangeMinEdit->setText(QString::number(min));
00036         RangeMaxEdit->setText(QString::number(max));
00037      } else {
00038         RangeMinEdit->setText("");
00039         RangeMaxEdit->setText("");
00040      }
00041      Double_t eps;
00042      if (GetPar()->GetEpsilon(eps)) EpsilonEdit->setText(QString::number(eps));
00043                                else EpsilonEdit->setText("");
00044   }
00045 }
00046 
00047 void QFitParCfgWidget::AnalyzeRangeValues() {
00048   if  ((RangeMinEdit->text().length()==0) && (RangeMaxEdit->text().length()==0))
00049     { GetPar()->SetRangeUse(kFALSE); return; }
00050   double min,max;
00051   bool okmin = FALSE, okmax = FALSE;
00052 
00053   min = RangeMinEdit->text().toDouble(&okmin);
00054   max = RangeMaxEdit->text().toDouble(&okmax);
00055 
00056   if (RangeMinEdit->text().length()==0) { min = max; okmin = okmax; }
00057   if (RangeMaxEdit->text().length()==0) { max = min; okmax = okmin; }
00058 
00059   if (okmin && okmax)
00060     GetPar()->SetRange(min,max);
00061 }
00062 
00063 
00064 void QFitParCfgWidget::ParNameEdit_textChanged( const QString & name)
00065 {
00066   if(!fbFillWidget && GetPar() && (name.length()>0)) {
00067       TGo4FitParsList* pars = dynamic_cast<TGo4FitParsList*> (GetItem()->Parent()->Object());
00068       if (pars==0) return;
00069       if (pars->FindPar(name)) return;
00070       GetPar()->SetName(name);
00071       GetItem()->setText(0,name);
00072   }
00073 }
00074 
00075 
00076 void QFitParCfgWidget::ParFixedChk_toggled( bool chk)
00077 {
00078   if(!fbFillWidget && GetPar())
00079     GetPar()->SetFixed(chk);
00080 }
00081 
00082 
00083 void QFitParCfgWidget::RangeMinEdit_textChanged( const QString &)
00084 {
00085   if(!fbFillWidget && GetPar())
00086     AnalyzeRangeValues();
00087 }
00088 
00089 
00090 void QFitParCfgWidget::RangeMaxEdit_textChanged( const QString &)
00091 {
00092   if(!fbFillWidget && GetPar())
00093     AnalyzeRangeValues();
00094 }
00095 
00096 void QFitParCfgWidget::EpsilonEdit_textChanged( const QString & value)
00097 {
00098     if(!fbFillWidget && GetPar())
00099       if (value.length()==0) GetPar()->SetEpsilonUse(kFALSE); else {
00100           bool res = FALSE;
00101           double zn = value.toDouble(&res);
00102           if(res) GetPar()->SetEpsilon(zn);
00103       }
00104 }
00105 
00106 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:58 2005 for Go4-v2.10-5 by doxygen1.2.15