17 #include <qstatusbar.h>
30 setAcceptDrops(
false);
31 fxRunMovie =
new QMovie(
":/icons/go4logorun4.gif");
33 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
34 LCDCurrentRate->setDigitCount(8);
35 LCDAverageRate->setDigitCount(8);
36 LCDTime->setDigitCount(8);
37 LCDProcessedEvents->setDigitCount(9);
39 LCDCurrentRate->setNumDigits(8);
40 LCDAverageRate->setNumDigits(8);
41 LCDTime->setNumDigits(8);
42 LCDProcessedEvents->setNumDigits(9);
63 QStatusBar* guistatusbar=
dynamic_cast<QStatusBar*
>(parentWidget());
65 guistatusbar->clearMessage();
68 if ((status==0) && (rate==0)) {
70 if (obj) LCDCurrentRate->setStyleSheet(
"QFrame { background-color:rgb(127,127,127) }");
75 if (Rate>10) LCDCurrentRate->display(floor(Rate));
76 else LCDCurrentRate->display(Rate);
79 if(AvRate>10) LCDAverageRate->display(floor(AvRate));
80 else LCDAverageRate->display(AvRate);
82 int stime = status ? (int) status->
GetTime() : (int) rate->
GetTime();
83 LCDTime->display(stime);
84 ulong hh = stime/3600;
85 ulong mm = (stime-hh*3600)/60;
86 ulong ss = (stime-hh*3600-mm*60);
87 QString tooltip = QString(
"Time since last reset [sec] = %1:%2:%3 [hours:min:sec]").arg(hh).arg(mm).arg(ss);
88 LCDTime->setToolTip(tooltip);
92 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
93 if (scnt.length() > LCDProcessedEvents->digitCount())
94 LCDProcessedEvents->setDigitCount(scnt.length());
96 if (scnt.length() > LCDProcessedEvents->numDigits())
97 LCDProcessedEvents->setNumDigits(scnt.length());
100 LCDProcessedEvents->display(scnt);
102 const char* color =
"QFrame { background-color:rgb(255,0,0) }";
107 Go4Pix->setWindowIcon( QIcon(
":/icons/go4logo2.png"));
110 color =
"QFrame { background-color:rgb(0,255,0) }";
116 LCDCurrentRate->setStyleSheet(color);
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
const char * GetCurrentSource() const
const char * GetDateTime() const
Double_t GetAvRate() const
Bool_t IsAnalysisRunning()
virtual void linkedObjectRemoved(const char *linkname)
ULong64_t GetCurrentCount() const
Double_t GetAvRate() const
virtual ~TGo4AnalysisStatusMonitor()
TGo4AnalysisStatusMonitor(QWidget *parent=0, const char *name=0)
const char * GetDateTime() const
ULong64_t GetCurrentCount() const
virtual void WorkWithRatemeter(TGo4Slot *slot)
const char * GetCurrentSource() const