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

/Go4FitGUI/QFitPeakFinderWidget.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 functions or slots use
00020 ** Qt Designer which will update this file, preserving your code. Create an
00021 ** init() function in place of a constructor, and a destroy() function in
00022 ** place of a destructor.
00023 *****************************************************************************/
00024 
00025 TGo4FitPeakFinder * QFitPeakFinderWidget::GetPF() {
00026   return dynamic_cast<TGo4FitPeakFinder*> (GetObject());
00027 }
00028 
00029 void QFitPeakFinderWidget::FillSpecificData() {
00030    QFitNamedWidget::FillSpecificData();
00031    TGo4FitPeakFinder* finder = GetPF();
00032    if (finder) {
00033       DataNameEdt->setText(finder->GetDataName());
00034       ClearModelsChk->setChecked(finder->GetClearModels());
00035 
00036       UsePolynChk->setChecked(finder->GetUsePolynom());
00037       PolynSpin->setValue(finder->GetPolynomOrder());
00038       PolynSpin->setEnabled(finder->GetUsePolynom());
00039 
00040       FindersTab->setCurrentPage(finder->GetPeakFinderType());
00041 
00042       ThresholdEdt->setText(QString::number(finder->Get0MaxAmplFactor()));
00043       MinWidthEdt->setText(QString::number(finder->Get0MinWidth()));
00044       MaxWidthEdt->setText(QString::number(finder->Get0MaxWidth()));
00045 
00046       WidthEdit->setText(QString::number(finder->Get1LineWidth()));
00047 
00048       NoiseFactorEdit->setText(QString::number(finder->Get2NoiseFactor()));
00049       NoiseMinEdit->setText(QString::number(finder->Get2NoiseMinimum()));
00050       SumUpSpin->setValue(finder->Get2ChannelSum());
00051    }
00052 }
00053 
00054 
00055 void QFitPeakFinderWidget::DataNameEdt_textChanged( const QString & name)
00056 {
00057   if (!fbFillWidget && GetPF())
00058     GetPF()->SetDataName(name);
00059 }
00060 
00061 
00062 void QFitPeakFinderWidget::ClearModelsChk_toggled( bool zn)
00063 {
00064   if (!fbFillWidget && GetPF())
00065     GetPF()->SetClearModels(zn);
00066 }
00067 
00068 
00069 void QFitPeakFinderWidget::UsePolynChk_toggled( bool zn)
00070 {
00071   if (!fbFillWidget && GetPF()) {
00072     GetPF()->SetUsePolynom(zn);
00073     PolynSpin->setEnabled(zn);
00074   }
00075 }
00076 
00077 
00078 void QFitPeakFinderWidget::PolynSpin_valueChanged( int zn)
00079 {
00080   if (!fbFillWidget && GetPF())
00081     GetPF()->SetPolynomOrder(zn);
00082 }
00083 
00084 
00085 void QFitPeakFinderWidget::FindersTab_currentChanged( QWidget * w )
00086 {
00087   if (!fbFillWidget && GetPF())
00088     GetPF()->SetPeakFinderType(FindersTab->indexOf(w));
00089 }
00090 
00091 
00092 void QFitPeakFinderWidget::ThresholdEdt_textChanged( const QString & value)
00093 {
00094   if (!fbFillWidget && GetPF()) {
00095     bool ok = FALSE;
00096     double zn = value.toDouble(&ok);
00097     if (ok && (zn>0) && (zn<=1.)) GetPF()->Set0MaxAmplFactor(zn);
00098   }
00099 }
00100 
00101 
00102 void QFitPeakFinderWidget::MinWidthEdt_textChanged( const QString & value)
00103 {
00104   if (!fbFillWidget && GetPF()) {
00105     bool ok = FALSE;
00106     double zn = value.toDouble(&ok);
00107     if (ok && (zn>=0)) GetPF()->Set0MinWidth(zn);
00108   }
00109 }
00110 
00111 
00112 void QFitPeakFinderWidget::MaxWidthEdt_textChanged( const QString & value)
00113 {
00114   if (!fbFillWidget && GetPF()) {
00115     bool ok = FALSE;
00116     double zn = value.toDouble(&ok);
00117     if (ok && (zn>0)) GetPF()->Set0MaxWidth(zn);
00118   }
00119 }
00120 
00121 
00122 void QFitPeakFinderWidget::WidthEdit_textChanged( const QString & value )
00123 {
00124   if (!fbFillWidget && GetPF()) {
00125     bool ok = FALSE;
00126     double zn = value.toDouble(&ok);
00127     if (ok && (zn>0)) GetPF()->Set1LineWidth(zn);
00128   }
00129 }
00130 
00131 
00132 void QFitPeakFinderWidget::NoiseFactorEdit_textChanged( const QString & value )
00133 {
00134   if (!fbFillWidget && GetPF()) {
00135     bool ok = FALSE;
00136     double zn = value.toDouble(&ok);
00137     if (ok && (zn>0)) GetPF()->Set2NoiseFactor(zn);
00138   }
00139 }
00140 
00141 
00142 void QFitPeakFinderWidget::NoiseMinEdit_textChanged( const QString & value)
00143 {
00144   if (!fbFillWidget && GetPF()) {
00145     bool ok = FALSE;
00146     double zn = value.toDouble(&ok);
00147     if (ok && (zn>=0)) GetPF()->Set2NoiseMinimum(zn);
00148   }
00149 }
00150 
00151 
00152 void QFitPeakFinderWidget::SumUpSpin_valueChanged( int zn)
00153 {
00154   if (!fbFillWidget && GetPF())
00155     GetPF()->Set2ChannelSum(zn);
00156 }
00157 
00158 //----------------------------END OF GO4 SOURCE FILE ---------------------

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