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

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