qt_psrParameter.h
1 /***************************************************************************
2  *
3  * Copyright (C) 1999 by Willem van Straten
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 /* ///////////////////////////////////////////////////////////////////////
8  The Qt psrParameter Widgets
9 
10  qt_psrParameter - abstract base class from which each element of the
11  qt_psrParams widget is derived.
12 
13  The following derived classes are defined in qt_psrParameter.C
14  qt_ephemString
15  qt_ephemDouble
16  qt_ephemMJD
17  qt_ephemAngle
18 
20 
21 #ifndef __QT_EPHEMVAL_H
22 #define __QT_EPHEMVAL_H
23 
24 #include <qhbox.h>
25 #include <qcheckbox.h>
26 #include <qlabel.h>
27 
28 #include "psrParameter.h"
29 
30 class qt_psrParameter : public QHBox, public psrParameter
31 {
32  friend class qt_psrephem;
33 
34  public:
35  // constructor used by derived classes only
36  qt_psrParameter (int ephio_index, QWidget* parent=0, const char* name=0);
37 
38  // virtual destructor
39  virtual ~qt_psrParameter () {};
40 
41  void setFit (bool infit);
42  bool getFit () const;
43 
44  void setLabel (const char* textval);
45  void setLabel (const QPixmap& ulabel);
46 
47  virtual Angle getAngle () const { return Angle(); };
48  virtual MJD getMJD () const { return MJD(); };
49  virtual double getDouble () const { return 0.0; };
50  virtual std::string getString () const { return std::string(); };
51  virtual double getError () const { return 0.0; };
52 
53  virtual void setAngle (const Angle&) { };
54  virtual void setMJD (const MJD&) { };
55  virtual void setDouble (double) { };
56  virtual void setString (const std::string&) { };
57  virtual void setError (double) { };
58 
59  void setValue (psrParameter* eph);
60 
61  // factory returns pointer to one of derived classes.
62  static qt_psrParameter* factory (int ephio_index, QWidget* parent=0);
63 
64  static int v_precision; // precision displayed in the value
65  static int e_precision; // precision displayed in the error
66 
67  static bool verbose;
68 
69  protected:
70  QCheckBox checkfit; // the check-box
71  QLabel label; // if no check-box, then some text
72  QHBox body; // the body into which derived classes place data
73 
74  // basically a dynamic copy constructor
75  psrParameter* duplicate ();
76 };
77 
78 #endif
static unsigned verbose
A verbosity flag that can be set for debugging purposes.
Definition: IntegrationManager.h:38

Generated using doxygen 1.8.17