Logo ROOT   6.10/09
Reference Guide
TFitParametersDialog.h
Go to the documentation of this file.
1 // @(#)root/fitpanel:$Id$
2 // Author: Ilka Antcheva, Lorenzo Moneta, David Gonzalez Maline 03/10/06
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFitParametersDialog
13 #define ROOT_TFitParametersDialog
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TFitParametersDialog //
18 // //
19 // This class is used for fit function parameter settings. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGWidget.h"
24 #include "TGFrame.h"
25 
29 };
30 
31 /// Enumeration specifying if parameters
32 /// have been modified by the user
36 };
37 
38 class TF1;
39 class TGNumberEntry;
40 class TGTextEntry;
41 class TGCheckButton;
42 class TGTextButton;
43 class TGTripleHSlider;
44 class TGNumberEntryField;
45 class TVirtualPad;
46 
47 
49 
50 protected:
51  TF1 *fFunc; // function passed to this dialog
52  TVirtualPad *fFpad; // pad where the function is drawn
53  Bool_t fHasChanges; // kTRUE if function was redrawn;
54  Bool_t fImmediateDraw; // kTRUE if function is updated on run-time
55  Int_t *fRetCode; // address to store return code
56  Int_t fNP; // number of function parameters
57  Double_t fRangexmin; // min function range
58  Double_t fRangexmax; // max function range
59  Double_t *fPmin; // min limits of patameters range
60  Double_t *fPmax; // max limits of patameters range
61  Double_t *fPval; // original patameters' values
62  Double_t *fPerr; // original patameters' errors
63  Double_t *fPstp; // original patameters' step
64  TGCompositeFrame *fContNam; // container of parameter names
65  TGCompositeFrame *fContVal; // container of parameter values
66  TGCompositeFrame *fContFix; // container of fix settings
67  TGCompositeFrame *fContBnd; // container of bound settings
68  TGCompositeFrame *fContSld; // container of sliders
69  TGCompositeFrame *fContMin; // container of min range values
70  TGCompositeFrame *fContMax; // container of max range values
71  TGCompositeFrame *fContStp; // container of step values
72  TGCompositeFrame *fContErr; // container of error values
73  TGTextEntry **fParNam; // parameter names
74  TGCheckButton **fParBnd; // bound setting switch
75  TGCheckButton **fParFix; // fix setting switch
76  TGNumberEntry **fParVal; // parameter values
77  TGNumberEntryField **fParMin; // min range values
78  TGNumberEntryField **fParMax; // max range values
79  TGNumberEntry **fParStp; // step values
80  TGTripleHSlider **fParSld; // triple sliders
81  TGNumberEntryField **fParErr; // error values
82  TGCheckButton *fUpdate; // immediate update switch
83  TGTextButton *fApply; // Apply button
84  TGTextButton *fReset; // Reset button
85  TGTextButton *fOK; // OK button
86  TGTextButton *fCancel; // Cancel button
87  TList fTextEntries; // list of text entries used for keyboard navigation
88 
89  void DisconnectSlots();
90 public:
92  TVirtualPad *pad, Int_t *ret_code = 0);
93  virtual ~TFitParametersDialog();
94 
95  virtual void CloseWindow();
96  virtual void DoApply();
97  virtual void DoCancel();
98  virtual void DoOK();
99  virtual void DoParFix(Bool_t on);
100  virtual void DoParBound(Bool_t on);
101  virtual void DoParMaxLimit();
102  virtual void DoParMinLimit();
103  virtual void DoParStep();
104  virtual void DoParValue();
105  virtual void DoReset();
106  virtual void DoSlider();
107  virtual void DrawFunction();
108  virtual void HandleButtons(Bool_t update);
109  virtual void HandleShiftTab();
110  virtual void HandleTab();
111  virtual Bool_t HasChanges() { return fHasChanges; }
112 
113 protected:
114  void SetParameters();
115 
116  ClassDef(TFitParametersDialog, 0) // Fit function parameters dialog
117 };
118 
119 #endif
virtual void DoParFix(Bool_t on)
Slot related to the Fix check button.
virtual void DoParMaxLimit()
Slot related to the maximum parameter limit settings.
virtual void HandleTab()
Handle Tab key event (set focus to the next number entry field)
TGCheckButton ** fParBnd
TGNumberEntry ** fParStp
virtual void DoApply()
Slot related to the Preview button.
virtual void DoCancel()
Slot related to the Cancel button.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGTripleHSlider ** fParSld
TFitParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, TVirtualPad *pad, Int_t *ret_code=0)
TGCompositeFrame * fContVal
TGNumberEntryField ** fParErr
#define ClassDef(name, id)
Definition: Rtypes.h:297
TGCompositeFrame * fContErr
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
virtual void CloseWindow()
Close parameters' dialog.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
A doubly linked list.
Definition: TList.h:43
virtual Bool_t HasChanges()
EFPDialogBound
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
TGCompositeFrame * fContNam
virtual void DoParBound(Bool_t on)
Slot related to the Bound check button.
TGNumberEntryField ** fParMax
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
virtual void DrawFunction()
Redraw function graphics.
virtual void DoOK()
Slot related to the OK button.
virtual void HandleShiftTab()
Handle Shift+Tab key event (set focus to the previous number entry field)
virtual void DoReset()
Slot related to the Reset button.
TGNumberEntry ** fParVal
TGNumberEntryField ** fParMin
virtual void DoParStep()
Slot related to parameter step setting.
virtual void DoParValue()
Slot related to the parameter value settings.
double Double_t
Definition: RtypesCore.h:55
double func(double *x, double *p)
Definition: stressTF1.cxx:213
TGCompositeFrame * fContMax
virtual void DoSlider()
Slot related to the parameters' value settings.
void SetParameters()
Set the parameter values inside the function.
TGCompositeFrame * fContBnd
1-Dim function class
Definition: TF1.h:150
TGCompositeFrame * fContSld
void DisconnectSlots()
Disconnect signals from slot methods.
TGCheckButton ** fParFix
virtual ~TFitParametersDialog()
Destructor.
EFPDialogChange
Enumeration specifying if parameters have been modified by the user.
int main(int argc, char **argv)
TGCompositeFrame * fContFix
TGCompositeFrame * fContStp
TGCompositeFrame * fContMin