Analysis  version 7.0 - august 2014
GEVPageAxisPropertiesEditor.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GEVPageAxisPropertiesEditor.hh
3  *
4  * Déclaration de la classe GEVPageAxisPropertiesEditor, qui est
5  * une interface graphique pour éditer les propriétés des axes de
6  * tracé d'une page graphique.
7  */
8 //======================================================================
9 
10 #ifndef GEV_PAGE_AXIS_PROPERTIES_EDITOR_HH
11 #define GEV_PAGE_AXIS_PROPERTIES_EDITOR_HH
12 
13 #include "GEVPage.hh"
14 #include <TGFrame.h>
15 #include <TGLabel.h>
16 #include <TGButton.h>
17 #include <TGNumberEntry.h>
18 
19 //======================================================================
20 /*! \class GEVPageAxisPropertiesEditor
21  *
22  * Interface graphique permettant d'éditer les propriétés des axes de
23  * tracé d'une page graphique (tous les pads sont affectés).
24  */
25 class GEVPageAxisPropertiesEditor : public TGTransientFrame
26 {
27 //----------------------------------------------------------------------
28  /*! \object_doc */
30 //----------------------------------------------------------------------
31 
32  protected:
33  GEVPage * page_ptr; ///< Pointeur sur la page à modifier
34 
35  static Double_t x_min; ///< Coordonnée mini sur l'axe X de l'histogramme
36  static Double_t x_max; ///< Coordonnée maxi sur l'axe X de l'histogramme
37  static Double_t y_min; ///< Coordonnée mini sur l'axe Y de l'histogramme
38  static Double_t y_max; ///< Coordonnée maxi sur l'axe Y de l'histogramme
39  static Double_t z_min; ///< Coordonnée mini sur l'axe Z de l'histogramme
40  static Double_t z_max; ///< Coordonnée maxi sur l'axe Z de l'histogramme
41 
42  static Bool_t x_autoscale; ///< Echelle automatique sur X
43  static Bool_t y_autoscale; ///< Echelle automatique sur Y
44  static Bool_t z_autoscale; ///< Echelle automatique sur Y
45 
46  // options
47  static Bool_t logx; ///< Axe X logarithmique
48  static Bool_t logy; ///< Axe Y logarithmique
49  static Bool_t logz; ///< Axe Z logarithmique
50 
51  static Bool_t stat; ///< Affichage des statistiques
52  static Bool_t stat_entries; ///< Nombre d'entrées dans les statistiques
53  static Bool_t stat_mean; ///< Valeur moyenne dans les statistiques
54  static Bool_t stat_rms; ///< Ecart-type dans les statistiques
55  static Bool_t stat_cont; ///< Statistiques des contours
56 
57  // widgets de l'interface
58 
59  TGTextButton * w_button_set1d; ///< Bouton pour application aux spectres 1D
60  TGTextButton * w_button_set2d; ///< Bouton pour application aux spectres 2D
61  TGTextButton * w_button_done; ///< Bouton pour terminer l'interface
62 
63  TGNumberEntry * w_x_min_entry; ///< Saisie de Xmin
64  TGNumberEntry * w_x_max_entry; ///< Saisie de Xmax
65  TGTextButton * w_x_reset; ///< Bouton de RAZ axe X
66  TGCheckButton * w_x_auto; ///< Bouton de sélection automatique des bornes
67  TGCheckButton * w_x_log; ///< Bouton de mode logarithmique
68 
69  TGNumberEntry * w_y_min_entry; ///< Saisie de Ymin
70  TGNumberEntry * w_y_max_entry; ///< Saisie de Ymax
71  TGTextButton * w_y_reset; ///< Bouton de RAZ axe Y
72  TGCheckButton * w_y_auto; ///< Bouton de sélection automatique des bornes
73  TGCheckButton * w_y_log; ///< Bouton de mode logarithmique
74 
75  TGNumberEntry * w_z_min_entry; ///< Saisie de Zmin
76  TGNumberEntry * w_z_max_entry; ///< Saisie de Zmax
77  TGTextButton * w_z_reset; ///< Bouton de RAZ axe Z
78  TGCheckButton * w_z_auto; ///< Bouton de sélection automatique des bornes
79  TGCheckButton * w_z_log; ///< Bouton de mode logarithmique
80 
81  TGCheckButton * w_stat_show; ///< Affichage du pavé de statistique
82  TGCheckButton * w_stat_entries; ///< Affichage de l'intégrale
83  TGCheckButton * w_stat_mean; ///< Affichage de la moyenne
84  TGCheckButton * w_stat_rms; ///< Affichage de l'écart-type
85  TGCheckButton * w_stat_cont; ///< Affichage du contenu des contours
86 
87  public:
88 
89 //----------------------------------------------------------------------
90 // Constructeur, destructeur, affectation
92  virtual ~GEVPageAxisPropertiesEditor ( );
93 
94  protected:
96 
97 //----------------------------------------------------------------------
98  public:
99 
100  virtual void Construct ( );
101  virtual void Start ( );
102  virtual Bool_t CheckRanges ( const bool z = true );
103 
104 //----------------------------------------------------------------------
105 // Fonctions associées
106  virtual void Quit ( );
107 
108  // modification des champs statiques
109  static void SetStatShow ( const Bool_t b = kTRUE );
110  static void SetStatAll ( const Bool_t b = kTRUE );
111  static void SetStatEntries ( const Bool_t b = kTRUE );
112  static void SetStatMean ( const Bool_t b = kTRUE );
113  static void SetStatRMS ( const Bool_t b = kTRUE );
114  static void SetStatCont ( const Bool_t b = kTRUE );
115 
116 //----------------------------------------------------------------------
117 // Slots
118  virtual void XminTextChanged ( const char * str );
119  virtual void XmaxTextChanged ( const char * str );
120  virtual void XResetClicked ( );
121  virtual void XAutoClicked ( );
122  virtual void XLogClicked ( );
123 
124  virtual void YminTextChanged ( const char * str );
125  virtual void YmaxTextChanged ( const char * str );
126  virtual void YResetClicked ( );
127  virtual void YAutoClicked ( );
128  virtual void YLogClicked ( );
129 
130  virtual void ZminTextChanged ( const char * str );
131  virtual void ZmaxTextChanged ( const char * str );
132  virtual void ZResetClicked ( );
133  virtual void ZAutoClicked ( );
134  virtual void ZLogClicked ( );
135 
136  virtual void StatDisplayChanged ( );
137 
138  // boutons principaux
139  virtual void Set ( const Int_t dim );
140  virtual void Set1D ( );
141  virtual void Set2D ( );
142  virtual void Done ( );
143 
144 //----------------------------------------------------------------------
145  public:
146  /*! Définition à usage de ROOT... */
148 };
149 
150 /*! Indique la valeur par défaut pour l'affichage du pavé de statistiques.
151  * \param b valeur de l'option (vrai/faux)
152  */
153 inline void GEVPageAxisPropertiesEditor::SetStatShow ( const Bool_t b )
154  { stat = b; }
155 
156 /*! Indique la valeur par défaut pour l'affichage de l'ensemble des
157  * informations de statistiques des pads.
158  * \param b valeur de l'option (vrai/faux)
159  */
160 inline void GEVPageAxisPropertiesEditor::SetStatAll ( const Bool_t b )
161  { stat_entries = b; stat_mean = b; stat_rms = b; stat_cont = b; }
162 
163 /*! Indique la valeur par défaut pour l'affichage de l'intégrale pour
164  * les statistiques des pads.
165  * \param b valeur de l'option (vrai/faux)
166  */
167 inline void GEVPageAxisPropertiesEditor::SetStatEntries ( const Bool_t b )
168  { stat_entries = b; }
169 
170 /*! Indique la valeur par défaut pour l'affichage de la moyenne pour
171  * les statistiques des pads.
172  * \param b valeur de l'option (vrai/faux)
173  */
174 inline void GEVPageAxisPropertiesEditor::SetStatMean ( const Bool_t b )
175  { stat_mean = b; }
176 
177 /*! Indique la valeur par défaut pour l'affichage de l'écart-type pour
178  * les statistiques des pads.
179  * \param b valeur de l'option (vrai/faux)
180  */
181 inline void GEVPageAxisPropertiesEditor::SetStatRMS ( const Bool_t b )
182  { stat_rms = b; }
183 
184 /*! Indique la valeur par défaut pour l'affichage des contours pour
185  * les statistiques des pads.
186  * \param b valeur de l'option (vrai/faux)
187  */
188 inline void GEVPageAxisPropertiesEditor::SetStatCont ( const Bool_t b )
189  { stat_cont = b; }
190 
191 
192 //======================================================================
193 #endif
TGCheckButton * w_stat_rms
Affichage de l&#39;écart-type.
Definition: GEVPageAxisPropertiesEditor.hh:84
virtual void XAutoClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:676
virtual void Set1D()
Definition: GEVPageAxisPropertiesEditor.cpp:816
TGCheckButton * w_x_log
Bouton de mode logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:67
TGTextButton * w_button_set2d
Bouton pour application aux spectres 2D.
Definition: GEVPageAxisPropertiesEditor.hh:60
static Bool_t z_autoscale
Echelle automatique sur Y.
Definition: GEVPageAxisPropertiesEditor.hh:44
TGCheckButton * w_z_log
Bouton de mode logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:79
Definition: GEVPage.hh:42
static Bool_t stat_cont
Statistiques des contours.
Definition: GEVPageAxisPropertiesEditor.hh:55
TGNumberEntry * w_x_max_entry
Saisie de Xmax.
Definition: GEVPageAxisPropertiesEditor.hh:64
ClassDef(GEVPageAxisPropertiesEditor, 0)
TGNumberEntry * w_x_min_entry
Saisie de Xmin.
Definition: GEVPageAxisPropertiesEditor.hh:63
GEVPage * page_ptr
Pointeur sur la page à modifier.
Definition: GEVPageAxisPropertiesEditor.hh:33
static Double_t y_max
Coordonnée maxi sur l&#39;axe Y de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:38
TGNumberEntry * w_z_min_entry
Saisie de Zmin.
Definition: GEVPageAxisPropertiesEditor.hh:75
static Bool_t logy
Axe Y logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:48
virtual void YLogClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:700
virtual void YResetClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:658
virtual void Done()
Definition: GEVPageAxisPropertiesEditor.cpp:837
Definition: GEVPageAxisPropertiesEditor.hh:25
TGCheckButton * w_stat_mean
Affichage de la moyenne.
Definition: GEVPageAxisPropertiesEditor.hh:83
static void SetStatMean(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:174
static Bool_t x_autoscale
Echelle automatique sur X.
Definition: GEVPageAxisPropertiesEditor.hh:42
TGCheckButton * w_y_auto
Bouton de sélection automatique des bornes.
Definition: GEVPageAxisPropertiesEditor.hh:72
TGCheckButton * w_y_log
Bouton de mode logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:73
static Double_t z_max
Coordonnée maxi sur l&#39;axe Z de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:40
static Bool_t stat_entries
Nombre d&#39;entrées dans les statistiques.
Definition: GEVPageAxisPropertiesEditor.hh:52
static Double_t x_max
Coordonnée maxi sur l&#39;axe X de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:36
virtual void Construct()
Definition: GEVPageAxisPropertiesEditor.cpp:87
GObject(GEVPageAxisPropertiesEditor)
TGCheckButton * w_x_auto
Bouton de sélection automatique des bornes.
Definition: GEVPageAxisPropertiesEditor.hh:66
virtual void YAutoClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:682
TGCheckButton * w_z_auto
Bouton de sélection automatique des bornes.
Definition: GEVPageAxisPropertiesEditor.hh:78
virtual void Set2D()
Definition: GEVPageAxisPropertiesEditor.cpp:827
static Double_t x_min
Coordonnée mini sur l&#39;axe X de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:35
virtual void XmaxTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:612
virtual void XminTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:605
static void SetStatEntries(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:167
virtual void ZmaxTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:640
virtual ~GEVPageAxisPropertiesEditor()
Definition: GEVPageAxisPropertiesEditor.cpp:77
TGCheckButton * w_stat_show
Affichage du pavé de statistique.
Definition: GEVPageAxisPropertiesEditor.hh:81
static Bool_t stat_rms
Ecart-type dans les statistiques.
Definition: GEVPageAxisPropertiesEditor.hh:54
virtual Bool_t CheckRanges(const bool z=true)
Definition: GEVPageAxisPropertiesEditor.cpp:532
static Double_t y_min
Coordonnée mini sur l&#39;axe Y de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:37
virtual void ZminTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:633
static void SetStatAll(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:160
TGNumberEntry * w_y_max_entry
Saisie de Ymax.
Definition: GEVPageAxisPropertiesEditor.hh:70
TGTextButton * w_button_set1d
Bouton pour application aux spectres 1D.
Definition: GEVPageAxisPropertiesEditor.hh:59
GEVPageAxisPropertiesEditor(GEVPage *page)
Definition: GEVPageAxisPropertiesEditor.cpp:53
virtual void ZAutoClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:688
static Double_t z_min
Coordonnée mini sur l&#39;axe Z de l&#39;histogramme.
Definition: GEVPageAxisPropertiesEditor.hh:39
static void SetStatRMS(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:181
virtual void XLogClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:694
virtual void ZLogClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:706
virtual void Start()
Definition: GEVPageAxisPropertiesEditor.cpp:511
static Bool_t stat_mean
Valeur moyenne dans les statistiques.
Definition: GEVPageAxisPropertiesEditor.hh:53
TGNumberEntry * w_y_min_entry
Saisie de Ymin.
Definition: GEVPageAxisPropertiesEditor.hh:69
virtual void Set(const Int_t dim)
Definition: GEVPageAxisPropertiesEditor.cpp:721
virtual void XResetClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:649
virtual void YmaxTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:626
TGNumberEntry * w_z_max_entry
Saisie de Zmax.
Definition: GEVPageAxisPropertiesEditor.hh:76
TGTextButton * w_z_reset
Bouton de RAZ axe Z.
Definition: GEVPageAxisPropertiesEditor.hh:77
static Bool_t y_autoscale
Echelle automatique sur Y.
Definition: GEVPageAxisPropertiesEditor.hh:43
TGTextButton * w_x_reset
Bouton de RAZ axe X.
Definition: GEVPageAxisPropertiesEditor.hh:65
static Bool_t stat
Affichage des statistiques.
Definition: GEVPageAxisPropertiesEditor.hh:51
static void SetStatCont(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:188
virtual void YminTextChanged(const char *str)
Definition: GEVPageAxisPropertiesEditor.cpp:619
TGTextButton * w_button_done
Bouton pour terminer l&#39;interface.
Definition: GEVPageAxisPropertiesEditor.hh:61
static void SetStatShow(const Bool_t b=kTRUE)
Definition: GEVPageAxisPropertiesEditor.hh:153
static Bool_t logz
Axe Z logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:49
TGTextButton * w_y_reset
Bouton de RAZ axe Y.
Definition: GEVPageAxisPropertiesEditor.hh:71
TGCheckButton * w_stat_cont
Affichage du contenu des contours.
Definition: GEVPageAxisPropertiesEditor.hh:85
virtual void ZResetClicked()
Definition: GEVPageAxisPropertiesEditor.cpp:667
virtual void StatDisplayChanged()
Definition: GEVPageAxisPropertiesEditor.cpp:712
TGCheckButton * w_stat_entries
Affichage de l&#39;intégrale.
Definition: GEVPageAxisPropertiesEditor.hh:82
static Bool_t logx
Axe X logarithmique.
Definition: GEVPageAxisPropertiesEditor.hh:47
virtual void Quit()
Definition: GEVPageAxisPropertiesEditor.cpp:591