GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitModelFunctionWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitModelFunctionWidget.cpp 3109 2021-03-29 18:02:10Z 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 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 
15 
16 #include "TGo4FitModelFunction.h"
17 #include "TGo4FitGuiTypes.h"
18 
19 
20 QFitModelFunctionWidget::QFitModelFunctionWidget(QWidget *parent, const char* name)
21  : QFitModelWidget(parent, name)
22 {
23  setupUi(this);
24 
25  QObject::connect(LibNameEdt, SIGNAL(textChanged(QString)), this, SLOT(LibNameEdt_textChanged(QString)));
26  QObject::connect(FuncNameEdt, SIGNAL(textChanged(QString)), this, SLOT(FuncNameEdt_textChanged(QString)));
27  QObject::connect(NumParSpin, SIGNAL(valueChanged(int)), this, SLOT(NumParSpin_valueChanged(int)));
28 }
29 
31 {
32  return dynamic_cast<TGo4FitModelFunction*> (GetObject());
33 }
34 
36 {
38  if (GetFunction()) {
39  LibNameEdt->setText(GetFunction()->GetLibraryName());
40  FuncNameEdt->setText(GetFunction()->GetFunctionName());
41  NumParSpin->setValue(GetFunction()->GetNumberOfFuncPar());
42  }
43 }
44 
46 {
47  if(!fbFillWidget && GetFunction())
48  GetFunction()->SetLibraryName(name.toLatin1().constData());
49 }
50 
52 {
53  if(!fbFillWidget && GetFunction())
54  GetFunction()->SetFunctionName(name.toLatin1().constData());
55 }
56 
58 {
59  if(!fbFillWidget && GetFunction())
60  if(GetFunction()->SetNumberOfFuncPar(num))
62 }
void SetFunctionName(const char *name)
virtual void LibNameEdt_textChanged(const QString &)
virtual TGo4FitModelFunction * GetFunction()
virtual void NumParSpin_valueChanged(int)
bool fbFillWidget
Definition: QFitWidget.h:63
void SetLibraryName(const char *name)
virtual TObject * GetObject()
Definition: QFitWidget.cpp:51
virtual void FuncNameEdt_textChanged(const QString &)
QFitModelFunctionWidget(QWidget *parent=0, const char *name=0)
virtual void FillSpecificData()
virtual void UpdateItemsOfType(int typ, bool allitems)
Definition: QFitWidget.cpp:101