source: trunk/MagicSoft/Cosy/gui/MGCosy.h@ 2023

Last change on this file since 2023 was 1953, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.8 KB
Line 
1#ifndef MGCOSY_H
2#define MGCOSY_H
3
4#ifndef ROOT_TGFrame
5#include <TGFrame.h>
6#endif
7
8#ifndef MARS_MObservatory
9#include "MObservatory.h"
10#endif
11
12#ifndef COSY_MStarList
13#include "MStarList.h"
14#endif
15
16class TIterator;
17
18class TGLabel;
19class TGPopupMenu;
20class TGMenuBar;
21class TGHorizontal3DLine;
22class TGLayoutHints;
23class TGCompositeFrame;
24class TGTab;
25class TGListBox;
26
27class ZdAz;
28class RaDec;
29class MsgQueue;
30
31class MGImage;
32class MGList;
33class MGCoordinates;
34class MGSkyPosition;
35class MGAccuracy;
36class MGVelocity;
37
38class MGCosy : public TGMainFrame
39{
40private:
41 const MObservatory::LocationName_t fObservatory;
42
43 //
44 // Create a main frame with a number of different buttons.
45 //
46 TGLayoutHints *fLayMenuBar;
47 TGLayoutHints *fLayMenuItem;
48
49 MGList *fList;
50
51 TGLabel *fLabel1;
52 TGLabel *fLabel2;
53 TGLabel *fLabel3;
54
55 TGLabel *fOffsetZd;
56 TGLabel *fOffsetAz;
57
58 TGLabel *fRaEst;
59 TGLabel *fDecEst;
60
61 TGLabel *fRaSoll;
62 TGLabel *fDecSoll;
63
64 TGLabel *fZdSoll;
65 TGLabel *fAzSoll;
66
67 TGLabel *fUtc;
68 TGLabel *fMjd;
69
70 MStarList fStarList;
71
72 MGCoordinates *fCZdAz;
73 MGCoordinates *fCRaDec;
74 MGCoordinates *fCCalib;
75
76 MGSkyPosition *fSkyPosition;
77 MGAccuracy *fAccuracy;
78 MGVelocity *fVelocity;
79 MGVelocity *fOffset;
80
81 MsgQueue *fQueue;
82
83 TGTab *fTab;
84
85 TGLabel *fError;
86 TGLabel *fMoving;
87 TGLabel *fTracking;
88 TGLabel *fStopping;
89 TGLabel *fStopped;
90 TGLabel *fAvailMac1;
91 TGLabel *fAvailMac2;
92 TGLabel *fAvailMac3;
93 TGLabel *fAvailSe1;
94 TGLabel *fAvailSe2;
95 TGLabel *fAvailSe3;
96
97 TGListBox *fLog;
98
99 void CreateMenu();
100 void CreateLabel(TGCompositeFrame *f);
101 void CreateTabs(TGTab *fTab);
102 void CreatePredefinedPos(TGCompositeFrame *tf1);
103
104 void StartPos();
105 void StartTrack();
106 void StartTrackPos();
107 void StartDemo();
108 //void StartCalib();
109 void StartTPoint();
110
111 void EnableLabel(TGLabel *label, Bool_t stat);
112 void SetLabelColor(TGLabel *label, Bool_t col);
113 void UpdateOffset(ZdAz &off);
114 void UpdateZdAz(ZdAz &off);
115 void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
116 double UpdateTime();
117
118public:
119 MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h);
120 ~MGCosy();
121
122 void CloseWindow();
123
124 TGLabel *GetLabel1() const { return fLabel1; }
125 TGLabel *GetLabel2() const { return fLabel2; }
126 TGLabel *GetLabel3() const { return fLabel3; }
127
128 TGListBox *GetLog() const { return fLog; }
129
130 void Update(ZdAz pos, ZdAz acc, ZdAz vel, ZdAz off, RaDec radec, ZdAz soll, UInt_t stat, UInt_t stat2);
131
132 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
133
134 ClassDef(MGCosy, 0)
135};
136
137#endif
138
139
Note: See TracBrowser for help on using the repository browser.