Changeset 1793 for trunk/MagicSoft/Cosy/gui
- Timestamp:
- 02/25/03 21:07:13 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGCosy.cc
r1760 r1793 48 48 kPB_TPOINT, 49 49 kPB_START, 50 kPB_DISPLAY1, 51 kPB_DISPLAY2, 50 52 kPB_RAp, 51 53 kPB_RAm, … … 345 347 TGCompositeFrame *tf1 = fTab->AddTab("Position"); 346 348 TGCompositeFrame *tf2 = fTab->AddTab("Track"); 347 TGCompositeFrame *tf4 = fTab->AddTab("Calib ration");349 TGCompositeFrame *tf4 = fTab->AddTab("Calib"); 348 350 TGCompositeFrame *tf5 = fTab->AddTab("Test SE"); 351 TGCompositeFrame *tf6 = fTab->AddTab("Gear"); 349 352 /*TGCompositeFrame *tf3 =*/ fTab->AddTab("Demo"); 350 353 … … 418 421 fList->Add(l3); 419 422 fList->Add(l4); 423 424 l1 = new TGLabel(tf6, "FIXME Text missing / Only one axis?"); 425 l1->Move(x, y); 426 fList->Add(l1); 420 427 421 428 // … … 465 472 fList->Add(but); 466 473 474 but = new TGTextButton(tf5, "Display", kPB_DISPLAY1); 475 but->Resize(80, 25); 476 but->Move(160, 197); 477 but->SetToolTipText("Display Histogram."); 478 but->Associate(this); 479 fList->Add(but); 480 481 but = new TGTextButton(tf6, "Display", kPB_DISPLAY2); 482 but->Resize(80, 25); 483 but->Move(160, 197); 484 but->SetToolTipText("Display Histogram."); 485 but->Associate(this); 486 fList->Add(but); 487 467 488 but= new TGTextButton(tf2, "Calc Zd/Az", kPB_CALCALTAZ); 468 489 but->Resize(80, 25); … … 1190 1211 return kTRUE; 1191 1212 case 4: 1213 fQueue->Proc(WM_GEAR, (void*)1); 1214 return kTRUE; 1215 case 5: 1192 1216 StartDemo(); 1193 1217 return kTRUE; … … 1201 1225 if (fTab->GetCurrent()==3) 1202 1226 fQueue->Proc(WM_TESTSE, NULL); 1227 if (fTab->GetCurrent()==4) 1228 fQueue->Proc(WM_GEAR, NULL); 1203 1229 cout << "PostMsg (WM_Stop) returned." << endl; 1204 1230 return kTRUE; … … 1256 1282 fQueue->PostMsg(WM_HOME, 0, 0); 1257 1283 return kTRUE; 1284 case kPB_DISPLAY1: 1285 case kPB_DISPLAY2: 1286 fQueue->PostMsg(WM_DISPLAY, 0, 0); 1287 return kTRUE; 1258 1288 1259 1289 default: -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r1784 r1793 97 97 // Reset 'static' positions of planets 98 98 // 99 /* 99 100 for (int i=0; i<9; i++) 100 101 { 101 fX[i] = ~0; 102 fY[i] = ~0; 103 } 102 fPlanetX[i] = ~0; 103 fPlanetY[i] = ~0; 104 } 105 for (int i=0; i<13; i++) 106 { 107 fStarX[i] = ~0; 108 fStarY[i] = ~0; 109 }*/ 104 110 } 105 111 … … 253 259 const float c = cos(zdaz.Az()); 254 260 255 const float x = s*zdaz.Zd()*kRad2Deg; // [deg] 256 const float y = c*zdaz.Zd()*kRad2Deg; // [deg] 261 float x = s*zdaz.Zd()*kRad2Deg; // [deg] 262 float y = c*zdaz.Zd()*kRad2Deg; // [deg] 263 264 if (x>95 || x<-95 || y>95 || y<-95) 265 { 266 if (arc->GetX1()==10 && arc->GetY1()==100) 267 return; 268 269 x=-100; 270 y= 100; 271 } 272 273 const int pixx = (int)(x/fPix); 274 const int pixy = (int)(y/fPix); 275 276 const int oldx = (int)(arc->GetX1()/fPix); 277 const int oldy = (int)(arc->GetY1()/fPix); 278 279 if (pixx==oldx && pixy==oldy) 280 return; 257 281 258 282 arc->SetX1(x); 259 283 arc->SetY1(y); 260 284 261 //SetModified();***MEMORY LEAK!!!***285 SetModified(); //***MEMORY LEAK!!!*** 262 286 } 263 287 … … 302 326 SetLin2(x+dy, y-dx, x-dy, y+dx); 303 327 304 if (zd<80)305 {328 //if (zd<80) 329 //{ 306 330 for(int i=0; i<3; i++) 307 331 SetDot(fDot[i], radec, i-3); 308 332 for(int i=3; i<6; i++) 309 333 SetDot(fDot[i], radec, i-2); 310 }334 //} 311 335 312 336 SetModified(); … … 363 387 364 388 RaDec radec = fSlaStar->CalcRaDecFast(pos*kDeg2Rad); 365 366 389 UpdatePosition(radec, pos.Zd(), pos.Az()); 367 390 UpdateText(pos.Zd(), pos.Az()); … … 387 410 const float deg = zdaz.Zd()*kRad2Deg; 388 411 389 const float x = s*deg; 390 const float y = c*deg; 412 float x = s*deg; 413 float y = c*deg; 414 415 if (x>95 || x<-95 || y>95 || y<-95) 416 { 417 if (arc->GetX1()==10 && arc->GetY1()==100) 418 return; 419 420 x=-100; 421 y= 100; 422 } 391 423 392 424 const int pixx = (int)(x/fPix); 393 425 const int pixy = (int)(y/fPix); 394 426 395 if (fX[planet]==pixx && fY[planet]==pixy) 427 const int oldx = (int)(arc->GetX1()/fPix); 428 const int oldy = (int)(arc->GetY1()/fPix); 429 430 if (oldx==pixx && oldy==pixy) 396 431 return; 397 398 fX[planet] = pixx;399 fY[planet] = pixy;400 432 401 433 // -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.h
r1784 r1793 54 54 const MObservatory::LocationName_t fObservatory; 55 55 56 Int_t fX[9]; 57 Int_t fY[9]; 56 // Int_t fStarX[13]; 57 // Int_t fStarY[13]; 58 59 // Int_t fPlanetX[9]; 60 // Int_t fPlanetY[9]; 58 61 59 62 void InitArc(TArc *arc, Int_t fillstyle, Int_t fillcolor, Int_t linecolor);
Note:
See TracChangeset
for help on using the changeset viewer.