Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4OptStatsSettings.ui.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 want to add, delete, or rename functions or slots, use
00020 ** Qt Designer to update this file, preserving your code.
00021 **
00022 ** You should not define a constructor or destructor in this file.
00023 ** Instead, write your code in functions called init() and destroy().
00024 ** These will automatically be called by the form's constructor and
00025 ** destructor.
00026 *****************************************************************************/
00027 //#include "Riostream.h"
00028 
00029 void TGo4OptStatsSettings::init()
00030 {
00031     bool showstat=go4sett->getStatBoxVisible();
00032     DrawStatboxButton->setChecked(showstat);
00033     OptStatGroupBox->setEnabled(showstat);
00034 
00035     int optstats=go4sett->getOptStat();
00036     //cout <<"Found options stat: "<<optstats << endl;
00037     bool k= (optstats/100000000)%10 ;
00038     bool s=(optstats/10000000)%10;
00039     bool i=(optstats/1000000)%10;
00040     bool o=(optstats/100000)%10;
00041     bool u=(optstats/10000)%10;
00042     bool r=(optstats/1000)%10;
00043     bool m=(optstats/100)%10;
00044     bool e=(optstats/10)%10;
00045     bool n=(optstats/1)%10;
00046 
00047     DrawNameButton->setChecked(n);
00048     DrawEntriesButton->setChecked(e);
00049     DrawIntegralButton->setChecked(i);
00050     DrawRMSButton->setChecked(r);
00051     DrawMeanButton->setChecked(m);
00052     DrawCurtosisButton->setChecked(k);
00053     DrawUnderflowButton->setChecked(u);
00054     DrawOverflowButton->setChecked(o);
00055     DrawSkewnessButton->setChecked(s);
00056 
00057     DrawErrorsButton->setChecked(go4sett->getStatBoxErrors());
00058 
00059 
00060 
00061 
00062 
00063 }
00064 
00065 
00066 void TGo4OptStatsSettings::setFlags()
00067 {
00068     bool drawbox=DrawStatboxButton->isChecked();
00069     bool drawerrors=DrawErrorsButton->isChecked();
00070     int leader=1000000000; // leading value to correctly decode "name only" option
00071     bool k=DrawCurtosisButton->isChecked();
00072     int kurt=100000000* (int) k;
00073     if(drawerrors) kurt*=2;
00074     bool s=DrawSkewnessButton->isChecked();
00075     int skew=10000000* (int) s;
00076     if(drawerrors) skew*=2;
00077     bool i=DrawIntegralButton->isChecked();
00078     int integ=1000000* (int) i;
00079     bool o=DrawOverflowButton->isChecked();
00080     int over=100000* (int) o;
00081     bool u=DrawUnderflowButton->isChecked();
00082     int under=10000* (int) u;
00083     bool r=DrawRMSButton->isChecked();
00084     int rms=1000* (int) r;
00085     if(drawerrors) rms*=2;
00086     bool m=DrawMeanButton->isChecked();
00087     int mean=100* (int) m;
00088     if(drawerrors) mean*=2;
00089     bool e=DrawEntriesButton->isChecked();
00090     int ent=10* (int) e;
00091     bool n=DrawNameButton->isChecked();
00092     int nm= (int) n;
00093     int optstats=leader+kurt+skew+integ+over+under+rms+mean+ent+nm;
00094     //cout <<"Set options stat to "<<optstats << endl;
00095     go4sett->setStatBoxVisible(drawbox);
00096     go4sett->setStatBoxErrors(drawerrors);
00097     go4sett->setOptStat(optstats);
00098 
00099 
00100 
00101 
00102 
00103 
00104 }
00105 
00106 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:22 2008 for Go4-v3.04-1 by  doxygen 1.4.2