GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
QFitModelWidget.cpp
Go to the documentation of this file.
1 // $Id$
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 fuer 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 "QFitModelWidget.h"
15 
16 #include <QCheckBox>
17 #include <QLabel>
18 #include <QSpinBox>
19 
20 #include "TGo4FitPanel.h"
21 
22 QFitModelWidget::QFitModelWidget( QWidget *parent, const char *name )
23  : QFitNamedWidget( parent, name )
24 {
25  if (!name) setObjectName( "QFitModelWidget" );
26  setWindowTitle("QFitModelWidget");
27 
28  AmplChk = new QCheckBox("amplitude", this);
29  AmplChk->setGeometry( QRect( 10, 110, 80, 25 ) );
30 
31  textLabel1 = new QLabel( "group", this );
32  textLabel1->setGeometry( QRect( 200, 110, 40, 20 ) );
33 
34  BuffersChk = new QCheckBox("use buffers", this);
35  BuffersChk->setGeometry( QRect( 100, 110, 90, 25 ) );
36 
37  GroupSpin = new QSpinBox( this );
38  GroupSpin->setGeometry( QRect( 240, 110, 55, 22 ) );
39  GroupSpin->setMinimum( -1 );
40  resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
41  //clearWState( WState_Polished );
42 
43  // signals and slots connections
44  QObject::connect(AmplChk, &QCheckBox::toggled, this, &QFitModelWidget::AmplChk_toggled);
45  QObject::connect(BuffersChk, &QCheckBox::toggled, this, &QFitModelWidget::BuffersChk_toggled);
46  QObject::connect(GroupSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &QFitModelWidget::GroupSpin_valueChanged);
47 }
48 
50 {
51 }
52 
54 {
55  if (!fbFillWidget && fxPanel)
56  fxPanel->ChangeModelPar(this, 0, chk ? 1 : 0);
57 }
58 
60 {
61  if (!fbFillWidget && fxPanel)
62  fxPanel->ChangeModelPar(this, 1, chk ? 1 : 0);
63 }
64 
65 
67 {
68  if (!fbFillWidget && fxPanel)
69  fxPanel->ChangeModelPar(this, 2, indx);
70 }
QCheckBox * BuffersChk
QFitModelWidget(QWidget *parent=nullptr, const char *name=nullptr)
QCheckBox * AmplChk
bool fbFillWidget
Definition: QFitWidget.h:63
virtual void ChangeModelPar(QFitModelWidget *w, int npar, int value)
virtual void GroupSpin_valueChanged(int)
QSpinBox * GroupSpin
virtual void BuffersChk_toggled(bool chk)
TGo4FitPanel * fxPanel
Definition: QFitWidget.h:61
virtual void AmplChk_toggled(bool chk)