Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4AnalysisStatusMonitor.ui.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include <math.h>
00017 
00018 
00019 void TGo4AnalysisStatusMonitor::init()
00020 {
00021    setAcceptDrops(FALSE);
00022    QString moviepath=gSystem->Getenv("GO4SYS");
00023    moviepath+="/images/go4logorun4.gif";
00024    fxRunMovie=QMovie(moviepath);
00025 }
00026 
00027 void TGo4AnalysisStatusMonitor::WorkWithRatemeter(TGo4Slot* slot)
00028 {
00029    AddLink(slot, "Ratemeter");
00030 }
00031 
00032 void TGo4AnalysisStatusMonitor::linkedObjectUpdated( const char * linkname, TObject * obj )
00033 {
00034    TGo4AnalysisClientStatus* status = dynamic_cast<TGo4AnalysisClientStatus*> (obj);
00035    if (status==0) return;
00036    SourceLabel->setText(status->GetCurrentSource());
00037    double Rate = status->GetRate();
00038    if(Rate>10) LCDCurrentRate->display(floor(Rate));
00039           else LCDCurrentRate->display(Rate);
00040    //if(Rate<=0)
00041    if(!status->IsAnalysisRunning())
00042     {
00043         LCDCurrentRate->setPaletteBackgroundColor(QColor(255,0,0));
00044         Go4Pix->setPixmap(QPixmap::fromMimeSource( "go4logo2.png" ));
00045     }
00046     else
00047      {
00048         LCDCurrentRate->setPaletteBackgroundColor(QColor(0,255,0));
00049         Go4Pix->clear();
00050         Go4Pix->setMovie(fxRunMovie);
00051      }
00052    if(status->GetAvRate()>10)
00053       LCDAverageRate->display(floor(status->GetAvRate()));
00054    else
00055       LCDAverageRate->display(status->GetAvRate());
00056 
00057    LCDTime->display((int)status->GetTime());
00058 
00059    LCDProcessedEvents->display((int)status->GetCurrentCount());
00060 
00061    DateLabel->setText(status->GetDateTime());
00062 }
00063 
00064 void TGo4AnalysisStatusMonitor::linkedObjectRemoved(const char * linkname)
00065 {
00066    // in any case deletion of this slot means closing of widget
00067 
00068    if (Browser())
00069       Browser()->ToggleMonitoring(0);
00070 
00071    ShootCloseWidget();
00072 }
00073 
00074 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:20 2008 for Go4-v3.04-1 by  doxygen 1.4.2