Changeset 1702 for trunk/MagicSoft/Cosy/gui/MGCosy.cc
- Timestamp:
- 01/13/03 18:18:15 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGCosy.cc
r1701 r1702 238 238 fList->Add(fAzSoll); 239 239 240 241 fError = new TGLabel(f, "Error"); 242 fMoving = new TGLabel(f, "Moving"); 243 fTracking = new TGLabel(f, "Tracking"); 244 fStopping = new TGLabel(f, "Stopping"); 245 fStopped = new TGLabel(f, "Stopped"); 246 240 fError = new TGLabel(f, "Error"); 241 fMoving = new TGLabel(f, "Moving"); 242 fTracking = new TGLabel(f, "Tracking"); 243 fStopping = new TGLabel(f, "Stopping"); 244 fStopped = new TGLabel(f, "Stopped"); 245 fAvailMac1 = new TGLabel(f, "- MAC1 -"); 246 fAvailMac2 = new TGLabel(f, "- MAC2 -"); 247 fAvailMac3 = new TGLabel(f, "- MAC3 -"); 248 fAvailSe1 = new TGLabel(f, "-SE/Zd1-"); 249 fAvailSe2 = new TGLabel(f, "-SE/Zd2-"); 250 fAvailSe3 = new TGLabel(f, "- SE/Az -"); 247 251 248 252 ULong_t color; … … 250 254 gClient->GetColorByName("Red", color); 251 255 fError->SetBackgroundColor(color); 256 fAvailMac1->SetBackgroundColor(color); 257 fAvailMac2->SetBackgroundColor(color); 258 fAvailMac3->SetBackgroundColor(color); 259 fAvailSe1->SetBackgroundColor(color); 260 fAvailSe2->SetBackgroundColor(color); 261 fAvailSe3->SetBackgroundColor(color); 252 262 gClient->GetColorByName("LightBlue", color); 253 263 fMoving->SetBackgroundColor(color); … … 264 274 fStopping->Move(10, 25+60); 265 275 fStopped ->Move(10, 25+80); 276 fAvailMac1->Move(10, 25+120); 277 fAvailMac2->Move(10, 25+140); 278 fAvailMac3->Move(10, 25+160); 279 fAvailSe1->Move(10, 25+180); 280 fAvailSe2->Move(10, 25+200); 281 fAvailSe3->Move(10, 25+220); 266 282 267 283 fError ->Resize(60, 20); … … 270 286 fStopping->Resize(60, 20); 271 287 fStopped ->Resize(60, 20); 288 fAvailMac1->Resize(60, 20); 289 fAvailMac2->Resize(60, 20); 290 fAvailMac3->Resize(60, 20); 291 fAvailSe1->Resize(60, 20); 292 fAvailSe2->Resize(60, 20); 293 fAvailSe3->Resize(60, 20); 272 294 273 295 fList->Add(fError); … … 276 298 fList->Add(fStopping); 277 299 fList->Add(fStopped); 300 fList->Add(fAvailMac1); 301 fList->Add(fAvailMac2); 302 fList->Add(fAvailMac3); 303 fList->Add(fAvailSe1); 304 fList->Add(fAvailSe2); 305 fList->Add(fAvailSe3); 278 306 } 279 307 … … 679 707 cout << "MGCosy::~MGCosy done." << endl; 680 708 } 709 710 void MGCosy::SetLabelColor(TGLabel *label, Bool_t col) 711 { 712 ULong_t red, green; 713 714 gClient->GetColorByName("Red", red); 715 gClient->GetColorByName("Green", green); 716 717 if (col && label->TestBit(BIT(14))) 718 return; 719 720 if (!col && !label->TestBit(BIT(14))) 721 return; 722 723 col ? label->SetBit(BIT(14)) : label->ResetBit(BIT(14)); 724 725 label->UnmapWindow(); 726 label->SetBackgroundColor(col ? green : red); 727 label->MapWindow(); 728 } 729 681 730 // ====================================================================== 682 731 void MGCosy::EnableLabel(TGLabel *label, Bool_t stat) … … 823 872 824 873 void MGCosy::Update(ZdAz pos, ZdAz acc, ZdAz vel, ZdAz off, RaDec radec, 825 ZdAz soll, UInt_t stat )874 ZdAz soll, UInt_t stat, UInt_t stat2) 826 875 { 827 876 double mjd = UpdateTime(); … … 848 897 EnableLabel(fZdSoll, stat&kMoving); 849 898 EnableLabel(fAzSoll, stat&kMoving); 899 900 SetLabelColor(fAvailMac1, stat2&0x01); 901 SetLabelColor(fAvailMac2, stat2&0x02); 902 SetLabelColor(fAvailMac3, stat2&0x04); 903 SetLabelColor(fAvailSe1, stat2&0x08); 904 SetLabelColor(fAvailSe2, stat2&0x10); 905 SetLabelColor(fAvailSe3, stat2&0x20); 850 906 851 907 stat&kTracking ? fAccuracy->MapWindow() : fAccuracy->UnmapWindow();
Note:
See TracChangeset
for help on using the changeset viewer.