GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitModelGauss2Widget.cpp
Go to the documentation of this file.
1 // $Id: QFitModelGauss2Widget.cpp 490 2009-11-04 12:30:14Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "QFitModelGauss2Widget.h"
15 
16 #include "TGo4FitModelGauss2.h"
17 
18 
19 QFitModelGauss2Widget::QFitModelGauss2Widget(QWidget *parent, const char* name)
20  : QFitModelWidget(parent, name)
21 {
22  setupUi(this);
23 }
24 
26 {
27  return dynamic_cast<TGo4FitModelGauss2*> (GetObject());
28 }
29 
31 {
33  if (GetGauss2()) {
34  Axis1Spin->setValue(GetGauss2()->GetNumAxis1());
35  Axis2Spin->setValue(GetGauss2()->GetNumAxis2());
36  }
37 }
38 
40 {
41  if (!fbFillWidget && GetGauss2()) {
42  GetGauss2()->SetNumAxis1(num1);
43  int num2 = GetGauss2()->GetNumAxis2();
44  if (num2==num1) {
45  num2++;
46  GetGauss2()->SetNumAxis2(num2);
47  fbFillWidget = kTRUE;
48  Axis2Spin->setValue(num2);
49  fbFillWidget = kFALSE;
50  }
51  }
52 }
53 
55 {
56  if (!fbFillWidget && GetGauss2()) {
57  GetGauss2()->SetNumAxis2(num2);
58  int num1 = GetGauss2()->GetNumAxis1();
59  if (num2==num1) {
60  if (num1==0) num1 = 1; else num1--;
61  GetGauss2()->SetNumAxis1(num1);
62  fbFillWidget = kTRUE;
63  Axis1Spin->setValue(num1);
64  fbFillWidget = kFALSE;
65  }
66  }
67 }
virtual void Axis2Spin_valueChanged(int)
virtual void Axis1Spin_valueChanged(int)
Int_t SetNumAxis1(Int_t n)
virtual TGo4FitModelGauss2 * GetGauss2()
bool fbFillWidget
Definition: QFitWidget.h:64
QFitModelGauss2Widget(QWidget *parent=0, const char *name=0)
Int_t SetNumAxis2(Int_t n)
virtual TObject * GetObject()
Definition: QFitWidget.cpp:53
virtual void FillSpecificData()