Changeset 1758 for trunk/MagicSoft/Cosy/gui
- Timestamp:
- 02/14/03 23:18:37 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGCosy.cc
r1727 r1758 311 311 TGCompositeFrame *tf2 = fTab->AddTab("Track"); 312 312 TGCompositeFrame *tf4 = fTab->AddTab("Calibration"); 313 TGCompositeFrame *tf3 = fTab->AddTab("Demo"); 313 TGCompositeFrame *tf5 = fTab->AddTab("Test SE"); 314 /*TGCompositeFrame *tf3 =*/ fTab->AddTab("Demo"); 314 315 315 316 fCZdAz = new MGCoordinates(tf1, kETypeZdAz); … … 359 360 l3 = new TGLabel(tf4, "the TPoint button. To set the Shaftencoder offset"); 360 361 l4 = new TGLabel(tf4, "use the Calib SE button."); 362 l1->Move(x, y); 363 l2->Move(x, y+h); 364 l3->Move(x, y+2*h); 365 l4->Move(x, y+3*h); 366 fList->Add(l1); 367 fList->Add(l2); 368 fList->Add(l3); 369 fList->Add(l4); 370 371 l1 = new TGLabel(tf5, "START starts histograming the differences of"); 372 l2 = new TGLabel(tf5, "the two shaftencoders at the elevation axis."); 373 l3 = new TGLabel(tf5, "Use STOP to stop histograming and display the"); 374 l4 = new TGLabel(tf5, "results on the screen."); 361 375 l1->Move(x, y); 362 376 l2->Move(x, y+h); … … 569 583 } 570 584 571 MGCosy::MGCosy(M sgQueue *q, const TGWindow *p, UInt_t w, UInt_t h)572 : TGMainFrame(p, w, h), f Queue(q)585 MGCosy::MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h) 586 : TGMainFrame(p, w, h), fObservatory(key), fQueue(q) 573 587 { 574 588 fList = new MGList; … … 596 610 cout << "MGCosy: Creating MGSkyPosition" << endl; 597 611 #endif 598 fSkyPosition = new MGSkyPosition(f 1, 300);612 fSkyPosition = new MGSkyPosition(fObservatory, f1, 300); 599 613 #ifdef DEBUG 600 614 cout << "MGCosy: Creating MGAccuracy" << endl; … … 750 764 static Int_t decs=~0; 751 765 752 static SlaStars sla ;766 static SlaStars sla(fObservatory); 753 767 sla.SetMjd(mjd); 754 768 … … 863 877 fUtc->SetText(new TGString(text)); 864 878 865 double mjd = time. CalcMjd();879 double mjd = time.GetMjd(); 866 880 867 881 sprintf(text, "%12.6f", mjd); … … 1114 1128 return kTRUE; 1115 1129 case 3: 1130 fQueue->Proc(WM_TESTSE, (void*)1); 1131 return kTRUE; 1132 case 4: 1116 1133 StartDemo(); 1117 1134 return kTRUE; … … 1123 1140 StopDemo(); 1124 1141 fQueue->PostMsg(WM_STOP, 0, 0); 1142 if (fTab->GetCurrent()==3) 1143 fQueue->Proc(WM_TESTSE, NULL); 1125 1144 cout << "PostMsg (WM_Stop) returned." << endl; 1126 1145 return kTRUE; -
trunk/MagicSoft/Cosy/gui/MGCosy.h
r1702 r1758 4 4 #ifndef ROOT_TGFrame 5 5 #include <TGFrame.h> 6 #endif 7 8 #ifndef MARS_MObservatory 9 #include <MObservatory.h> 6 10 #endif 7 11 … … 31 35 { 32 36 private: 37 const MObservatory::LocationName_t fObservatory; 33 38 34 39 // … … 104 109 105 110 public: 106 MGCosy(M sgQueue *q, const TGWindow *p, UInt_t w, UInt_t h);111 MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h); 107 112 ~MGCosy(); 108 113 -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r1727 r1758 43 43 // Neptun 7.8 44 44 // 45 fSlaPlanet = new SlaPlanets ;46 fSlaStar = new SlaStars ;45 fSlaPlanet = new SlaPlanets(fObservatory); 46 fSlaStar = new SlaStars(fObservatory); 47 47 48 48 // … … 177 177 } 178 178 179 MGSkyPosition::MGSkyPosition( const TGWindow* p, const UInt_t w)180 : MGEmbeddedCanvas("SkyPosition", p, w, 110) 179 MGSkyPosition::MGSkyPosition(MObservatory::LocationName_t key, const TGWindow* p, const UInt_t w) 180 : MGEmbeddedCanvas("SkyPosition", p, w, 110), fObservatory(key) 181 181 { 182 182 DrawCoordinateSystem(); -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.h
r1727 r1758 11 11 #ifndef MGEMBEDDEDCANVAS_H 12 12 #include "MGEmbeddedCanvas.h" 13 #endif 14 15 #ifndef MARS_MObservatory 16 #include "MObservatory.h" 13 17 #endif 14 18 … … 46 50 SlaPlanets *fSlaPlanet; 47 51 52 const MObservatory::LocationName_t fObservatory; 53 48 54 Int_t fX[9]; 49 55 Int_t fY[9]; … … 66 72 67 73 public: 68 MGSkyPosition( const TGWindow* p, const UInt_t w);74 MGSkyPosition(MObservatory::LocationName_t key, const TGWindow* p, const UInt_t w); 69 75 ~MGSkyPosition(); 70 76 -
trunk/MagicSoft/Cosy/gui/MGStarguider.cc
r1690 r1758 72 72 #define kZOOM 96 73 73 74 MGStarguider::MGStarguider( )75 : Camera(), TGMainFrame(gClient->GetRoot(), 768, 700), f Dx((768-kZOOM)/2), fDy((512-kZOOM)/2)74 MGStarguider::MGStarguider(MObservatory::LocationName_t key) 75 : Camera(), TGMainFrame(gClient->GetRoot(), 768, 700), fObservatory(key), fDx((768-kZOOM)/2), fDy((512-kZOOM)/2) 76 76 { 77 77 gVirtualX->GrabButton(fId, kButton2, /*kButtonPressMask|kButtonReleaseMask|*/kNone, kNone, kNone, kNone); … … 80 80 fList = new MGList; 81 81 82 fSao = new StarCatalog ;82 fSao = new StarCatalog(fObservatory); 83 83 fRaDec = new RaDec(180, 40); 84 84 … … 612 612 613 613 MStarList stars; 614 fSao->GetStars(stars, time. CalcMjd(), *fRaDec);614 fSao->GetStars(stars, time.GetMjd(), *fRaDec); 615 615 fSao->GetImg(c, cimg, stars); 616 616 //fSao->GetImg(c, cimg, time.CalcMjd(), *fRaDec); -
trunk/MagicSoft/Cosy/gui/MGStarguider.h
r1690 r1758 11 11 #include "MGList.h" 12 12 #include "MGImage.h" 13 14 #ifndef MARS_MObservatory 15 #include "MObservatory.h" 16 #endif 13 17 14 18 class AltAz; … … 56 60 TTimer *fTimer; 57 61 62 const MObservatory::LocationName_t fObservatory; 63 58 64 Int_t fDx; 59 65 Int_t fDy; … … 70 76 71 77 public: 72 MGStarguider( );78 MGStarguider(MObservatory::LocationName_t key); 73 79 virtual ~MGStarguider(); 74 80
Note:
See TracChangeset
for help on using the changeset viewer.