GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitGuiArrow.h
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 #ifndef TGO4FITGUIARROW_H
15 #define TGO4FITGUIARROW_H
16 
17 #include "TArrow.h"
18 
19 class TGo4FitModel;
20 class TGo4FitComponent;
21 class QFitItem;
22 class TGo4FitPanel;
23 
24 class TGo4FitGuiArrow : public TArrow {
25 
26 public:
27 
29 
31  TGo4FitGuiArrow(Float_t arrowsize, Option_t *option);
32  TGo4FitGuiArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize, Option_t *option);
33  virtual ~TGo4FitGuiArrow();
34 
35  void SetForPosition(TGo4FitModel *model, TGo4FitGuiArrow* forwidth, Double_t iLineAmpl);
36  void SetForWidth(TGo4FitModel *model, TGo4FitGuiArrow* forposition);
37  void SetForRange(TGo4FitComponent *Comp, Int_t num, Double_t rangey, Double_t shiftx);
38  void SetItem(QFitItem* item, TGo4FitPanel* panel);
39 
40  QFitItem* GetItem() const { return fxItem; }
41 
42  Bool_t Locate();
43 
44  Int_t GetType() const { return fxType; }
45  TGo4FitModel *GetModel() const { return fxModel; }
46  TGo4FitComponent *GetComp() const { return fxComp; }
47 
48  Bool_t IsAssignTo(TObject *obj);
49 
50  void ClearOther() { fxOther = nullptr; }
51  void Delete(Option_t *option = "") override; // *MENU*
52 
53  void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
54 
55 #ifdef __GO4WEB__
56  Bool_t Notify() override;
57 #endif
58 
59 private:
60  Int_t fxType{0};
61  TGo4FitModel *fxModel{nullptr};
63  Double_t fdLineAmpl{0};
65  Int_t fiRangeNum{0};
66  Double_t fdRangeY{0};
67  Double_t fdShiftX{0};
68  QFitItem* fxItem{nullptr};
69  TGo4FitPanel* fxPanel{nullptr};
70 
71  void TestNewPosition();
72 };
73 
74 #endif
void Delete(Option_t *option="") override
TGo4FitGuiArrow * fxOther
void SetForRange(TGo4FitComponent *Comp, Int_t num, Double_t rangey, Double_t shiftx)
QFitItem * fxItem
void SetForPosition(TGo4FitModel *model, TGo4FitGuiArrow *forwidth, Double_t iLineAmpl)
TGo4FitComponent * fxComp
void SetForWidth(TGo4FitModel *model, TGo4FitGuiArrow *forposition)
TGo4FitComponent * GetComp() const
TGo4FitModel * fxModel
QFitItem * GetItem() const
void SetItem(QFitItem *item, TGo4FitPanel *panel)
Bool_t IsAssignTo(TObject *obj)
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
virtual ~TGo4FitGuiArrow()
TGo4FitPanel * fxPanel
Int_t GetType() const
TGo4FitModel * GetModel() const