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

Last change on this file since 9195 was 9132, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 3.2 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 *fMsgZd;
66 TGLabel *fMsgAz;
67
68 TGLabel *fUtc;
69 TGLabel *fMjd;
70
71 TGLabel *fWeather;
72
73 MStarList fPreDefList;
74 MStarList fStarList;
75
76 MGCoordinates *fCZdAz;
77 MGCoordinates *fCRaDec;
78 MGCoordinates *fCCalib;
79
80 MGSkyPosition *fSkyPosition;
81 MGAccuracy *fAccuracy;
82 MGVelocity *fVelocity;
83 MGVelocity *fOffset;
84
85 MGImage *fImage;
86
87 MsgQueue *fQueue;
88
89 TGTab *fTab;
90
91 TGLabel *fArmed;
92 TGLabel *fError;
93 TGLabel *fMoving;
94 TGLabel *fTracking;
95 TGLabel *fStopping;
96 TGLabel *fStopped;
97 //TGLabel *fAvailDkc1;
98 //TGLabel *fAvailDkc2;
99 TGLabel *fAvailTcp;
100
101 TGLabel *fDkcReady1;
102 TGLabel *fDkcReady2;
103 TGLabel *fDkcEmergency;
104 TGLabel *fDkcPcMode;
105 TGLabel *fDkcRF1;
106 TGLabel *fDkcRF2;
107 TGLabel *fDkcBrake;
108 TGLabel *fDkcPower;
109
110 TGTextView *fLog;
111
112 FontStruct_t fFont;
113
114 void CreateMenu();
115 void CreateLabel(TGCompositeFrame *f);
116 void CreateTabs();
117 void CreatePredefinedPos(TGCompositeFrame *tf1);
118 void CreateStarList(TGCompositeFrame *tf1);
119
120 void StartPos();
121 void StartTrack(bool track);
122 void StartTrackPos(Long_t mp1=0);
123 void StartDemo();
124 //void StartCalib();
125 void StartTPoint();
126
127 void EnableLabel(TGLabel *label, Bool_t stat);
128 void SetLabelColor(TGLabel *label, Bool_t col);
129 //void UpdateOffset(ZdAz &off);
130 void UpdateZdAz(ZdAz &off);
131 void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
132 double UpdateTime();
133
134public:
135 MGCosy(MObservatory::LocationName_t key, MsgQueue *q);
136 ~MGCosy();
137
138 void CloseWindow();
139
140 TGLabel *GetLabel1() const { return fLabel1; }
141 TGLabel *GetLabel2() const { return fLabel2; }
142 //TGLabel *GetLabel3() const { return fLabel3; }
143
144 TGTextView *GetLog() const { return fLog; }
145 MGImage *GetImage() { return fImage; }
146
147 void Update(ZdAz pos, ZdAz acc, /*ZdAz vel, ZdAz off,*/ RaDec radec, ZdAz soll, UInt_t stat, UInt_t pdo3, UInt_t stat2, Bool_t armed, const TString &statzd, const TString &stataz);
148 void UpdateWeather(const MCeCoCom &com);
149
150 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
151
152 ClassDef(MGCosy, 0)
153};
154
155#endif
156
157
Note: See TracBrowser for help on using the repository browser.