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

TGo4WidgetProxy.cxx

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 "TGo4WidgetProxy.h"
00017 
00018 #include "TPad.h"
00019 #include "TGo4Slot.h"
00020 #include "QGo4Widget.h"
00021 
00022 Bool_t TGo4WidgetProxy::ProcessEvent(TGo4Slot* slot, TGo4Slot* source, Int_t id, void* param)
00023 {
00024    if (fWidget==0) return kTRUE;
00025 
00026    TGo4Slot* src = (TGo4Slot*) source;
00027 
00028    if ((id==TGo4Slot::evObjAssigned) ||
00029        (id==TGo4Slot::evObjUpdated))
00030          fWidget->ProcessSignal(src->GetName(), true, src->GetAssignedObject(), src);
00031    else
00032    if (id==TGo4Slot::evDelete) {
00033       fWidget->ProcessSignal(src->GetName(), false, 0, src);
00034    }
00035    else
00036    if (id==TGo4Slot::evObjDeleted)
00037       fWidget->ProcessSignal(src->GetName(), false, (TObject*)param, src);
00038    else
00039    if (id==TGo4Slot::evSubslotUpdated)
00040       fWidget->ProcessSignal("TGo4Slot::evSubslotUpdated", true, (TObject*)param, src);
00041 
00042    // process further events which important for data management
00043    return (id==TGo4Slot::evDelete);
00044 }
00045 
00046 void TGo4WidgetProxy::ConnectPad(TPad* pad)
00047 {
00048    if (pad!=0) {
00049       pad->Connect("RangeAxisChanged()","TGo4WidgetProxy",this,"PadRangeAxisChanged()");
00050       pad->Connect("Modified()","TGo4WidgetProxy",this,"PadModified()");
00051    }
00052 }
00053 
00054 void TGo4WidgetProxy::PadRangeAxisChanged()
00055 {
00056    if (fWidget)
00057      fWidget->ProcessSignal("PadRangeAxisChanged", true, 0, 0);
00058 }
00059 
00060 void TGo4WidgetProxy::PadModified()
00061 {
00062    if (fWidget)
00063      fWidget->ProcessSignal("PadModified", true, 0, 0);
00064 }
00065 
00066 //----------------------------END OF GO4 SOURCE FILE ---------------------

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