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

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