/[PAMELA software]/eventviewer/flight/src/FEVpamevcontrol.cpp
ViewVC logotype

Diff of /eventviewer/flight/src/FEVpamevcontrol.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Fri Jul 14 14:18:05 2006 UTC revision 1.2 by mocchiut, Mon Feb 26 17:30:32 2007 UTC
# Line 140  PAMevcontrol::PAMevcontrol(const TGWindo Line 140  PAMevcontrol::PAMevcontrol(const TGWindo
140    fText2->SetText(cvar->thefilter.Data());    fText2->SetText(cvar->thefilter.Data());
141    TGTextButton *Load2 = new TGTextButton(htext2,"Load");    TGTextButton *Load2 = new TGTextButton(htext2,"Load");
142    Load2->Connect("Clicked()","TGTextEntry",fText2,"ReturnPressed()");    Load2->Connect("Clicked()","TGTextEntry",fText2,"ReturnPressed()");
143      Load2->SetToolTipText("Clear box and click to unload file");
144    fText2->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilter()");    fText2->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilter()");
145    fText2->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");    fText2->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");
146    htext2->AddFrame(fText2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));    htext2->AddFrame(fText2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));
# Line 149  PAMevcontrol::PAMevcontrol(const TGWindo Line 150  PAMevcontrol::PAMevcontrol(const TGWindo
150    //    //
151    cframe2->AddFrame(inputf,new TGLayoutHints(kLHintsExpandX,5,5,5,5));    cframe2->AddFrame(inputf,new TGLayoutHints(kLHintsExpandX,5,5,5,5));
152    //    //
153    TGCheckButton *fchktof = new TGCheckButton(hframe1, "TOF");      fchktof = new TGCheckButton(hframe1, "TOF");  
154    fchktof->Connect("Clicked()","PAMevcontrol", this,"chktof()");    fchktof->Connect("Clicked()","PAMevcontrol", this,"chktof()");
155    if ( cvar->TOF ) fchktof->SetState(kButtonDown);    if ( cvar->TOF ) fchktof->SetState(kButtonDown);
156    hframe1->AddFrame(fchktof, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));    hframe1->AddFrame(fchktof, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));
157    //    //
158    TGCheckButton *fchkac = new TGCheckButton(hframe1, "AC");      fchkac = new TGCheckButton(hframe1, "AC");  
159    fchkac->Connect("Clicked()","PAMevcontrol", this,"chkac()");      fchkac->Connect("Clicked()","PAMevcontrol", this,"chkac()");  
160    if ( cvar->AC ) fchkac->SetState(kButtonDown);    if ( cvar->AC ) fchkac->SetState(kButtonDown);
161    hframe1->AddFrame(fchkac, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));    hframe1->AddFrame(fchkac, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));
162    //    //
163    TGCheckButton *fchktrk = new TGCheckButton(hframe1, "Tracker");      fchktrk = new TGCheckButton(hframe1, "Tracker");  
164    fchktrk->Connect("Clicked()","PAMevcontrol",this,"chktrk()");      fchktrk->Connect("Clicked()","PAMevcontrol",this,"chktrk()");  
165    if ( cvar->TRK ) fchktrk->SetState(kButtonDown);    if ( cvar->TRK ) fchktrk->SetState(kButtonDown);
166    hframe1->AddFrame(fchktrk, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));    hframe1->AddFrame(fchktrk, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));
167    //    //
168    gf->AddFrame(hframe1, new TGLayoutHints(kLHintsExpandX));    gf->AddFrame(hframe1, new TGLayoutHints(kLHintsExpandX));
169    //    //
170    TGCheckButton *fchks4 = new TGCheckButton(hframe2, "S4");      fchks4 = new TGCheckButton(hframe2, "S4");  
171    fchks4->Connect("Clicked()","PAMevcontrol",this,"chks4()");      fchks4->Connect("Clicked()","PAMevcontrol",this,"chks4()");  
172    if ( cvar->S4 ) fchks4->SetState(kButtonDown);    if ( cvar->S4 ) fchks4->SetState(kButtonDown);
173    hframe2->AddFrame(fchks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,15,5,5));    hframe2->AddFrame(fchks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,15,5,5));
174    //    //
175    TGCheckButton *fchknd = new TGCheckButton(hframe2, "ND");      fchknd = new TGCheckButton(hframe2, "ND");  
176    fchknd->Connect("Clicked()","PAMevcontrol",this,"chknd()");      fchknd->Connect("Clicked()","PAMevcontrol",this,"chknd()");  
177    if ( cvar->ND ) fchknd->SetState(kButtonDown);    if ( cvar->ND ) fchknd->SetState(kButtonDown);
178    hframe2->AddFrame(fchknd, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));    hframe2->AddFrame(fchknd, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));
179    //    //
180    TGCheckButton *fchkcalo = new TGCheckButton(hframe2, "Calorimeter");      fchkcalo = new TGCheckButton(hframe2, "Calorimeter");  
181    fchkcalo->Connect("Clicked()","PAMevcontrol",this,"chkcalo()");      fchkcalo->Connect("Clicked()","PAMevcontrol",this,"chkcalo()");  
182    if ( cvar->CALO ) fchkcalo->SetState(kButtonDown);    if ( cvar->CALO ) fchkcalo->SetState(kButtonDown);
183    hframe2->AddFrame(fchkcalo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,2,5,5));    hframe2->AddFrame(fchkcalo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,2,5,5));
184    //    //
185    gf->AddFrame(hframe2, new TGLayoutHints(kLHintsExpandX));    gf->AddFrame(hframe2, new TGLayoutHints(kLHintsExpandX));
186    //    //
187    TGCheckButton *fchkinfo = new TGCheckButton(hframe3, "Infos");      fchkinfo = new TGCheckButton(hframe3, "Infos");  
188    fchkinfo->Connect("Clicked()","PAMevcontrol",this,"chkinfo()");      fchkinfo->Connect("Clicked()","PAMevcontrol",this,"chkinfo()");  
189    if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown);    if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown);
190    hframe3->AddFrame(fchkinfo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));    hframe3->AddFrame(fchkinfo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));
191    //    //
192    TGCheckButton *fchknames = new TGCheckButton(hframe3, "Names");      fchknames = new TGCheckButton(hframe3, "Names");  
193    fchknames->Connect("Clicked()","PAMevcontrol",this,"chknames()");      fchknames->Connect("Clicked()","PAMevcontrol",this,"chknames()");  
194    if ( cvar->VINFOS ) fchknames->SetState(kButtonDown);    if ( cvar->VINFOS ) fchknames->SetState(kButtonDown);
195    hframe3->AddFrame(fchknames, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,5,5,5));    hframe3->AddFrame(fchknames, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,5,5,5));
196    TGCheckButton *fchkpalette = new TGCheckButton(hframe3, "Palette");      fchkpalette = new TGCheckButton(hframe3, "Palette");  
197    fchkpalette->Connect("Clicked()","PAMevcontrol",this,"chkpalette()");      fchkpalette->Connect("Clicked()","PAMevcontrol",this,"chkpalette()");  
198    if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown);    if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown);
199    hframe3->AddFrame(fchkpalette, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));    hframe3->AddFrame(fchkpalette, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));
200    gf->AddFrame(hframe3, new TGLayoutHints(kLHintsExpandX));    gf->AddFrame(hframe3, new TGLayoutHints(kLHintsExpandX));
201    //    //
202    TGVButtonGroup *group = new TGVButtonGroup(hframe4);    TGVButtonGroup *group = new TGVButtonGroup(hframe4);
   TGRadioButton *bwc0;  
   TGRadioButton *bwc1;  
203    bwc0 = new TGRadioButton(group, "Colour");    bwc0 = new TGRadioButton(group, "Colour");
204    bwc1 = new TGRadioButton(group, "B/W");    bwc1 = new TGRadioButton(group, "B/W");
205    if ( cvar->bw ){    if ( cvar->bw ){
# Line 229  PAMevcontrol::PAMevcontrol(const TGWindo Line 228  PAMevcontrol::PAMevcontrol(const TGWindo
228    cframe1->AddFrame(gf, new TGLayoutHints(kLHintsExpandX));    cframe1->AddFrame(gf, new TGLayoutHints(kLHintsExpandX));
229    //    //
230    TGHButtonGroup *jgroup = new TGHButtonGroup(htext4);    TGHButtonGroup *jgroup = new TGHButtonGroup(htext4);
   TGRadioButton *jbwc0;  
   TGRadioButton *jbwc1;  
231    jbwc0 = new TGRadioButton(jgroup, "packet     ");    jbwc0 = new TGRadioButton(jgroup, "packet     ");
232    jbwc1 = new TGRadioButton(jgroup, "progressive");    jbwc1 = new TGRadioButton(jgroup, "progressive");
233    jbwc1->SetState(kButtonDown);    jbwc1->SetState(kButtonDown);
# Line 388  void PAMevcontrol::StopSearching() { Line 385  void PAMevcontrol::StopSearching() {
385    bstop->SetState(kButtonDisabled);    bstop->SetState(kButtonDisabled);
386  };  };
387    
388    void PAMevcontrol::RefreshButtons() {
389      if ( cvar->jumprog ){
390        jbwc1->SetState(kButtonDown);
391      } else {
392        jbwc0->SetState(kButtonDown);
393      };
394      if ( cvar->fl0 ){
395        ffl0->SetState(kButtonDown);
396      } else {
397        ffl0->SetState(kButtonUp);
398      };
399      if ( cvar->tracknds4) ftrks4->SetState(kButtonDown);
400      if ( cvar->bw ){
401        bwc1->SetState(kButtonDown);
402      } else {
403        bwc0->SetState(kButtonDown);
404      };
405      if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown); else fchkpalette->SetState(kButtonUp);
406      if ( cvar->VINFOS ) fchknames->SetState(kButtonDown); else fchknames->SetState(kButtonUp);
407      if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown); else fchkinfo->SetState(kButtonUp);
408      if ( cvar->CALO ) fchkcalo->SetState(kButtonDown); else fchkcalo->SetState(kButtonUp);
409      if ( cvar->ND ) fchknd->SetState(kButtonDown); else fchknd->SetState(kButtonUp);
410      if ( cvar->S4 ) fchks4->SetState(kButtonDown); else fchks4->SetState(kButtonUp);
411      if ( cvar->TRK ) fchktrk->SetState(kButtonDown); else fchktrk->SetState(kButtonUp);
412      if ( cvar->AC ) fchkac->SetState(kButtonDown); else fchkac->SetState(kButtonUp);
413      if ( cvar->TOF ) fchktof->SetState(kButtonDown); else fchktof->SetState(kButtonUp);
414    };
415    
416  void PAMevcontrol::SetFilter() {  void PAMevcontrol::SetFilter() {
417      TGTextEntry *entry = (TGTextEntry*)gTQSender;      TGTextEntry *entry = (TGTextEntry*)gTQSender;
418      TString text = entry->GetText();      TString text = entry->GetText();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23